1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 # This file incorporates work covered by the following license notice:
11 # Licensed to the Apache Software Foundation (ASF) under one or more
12 # contributor license agreements. See the NOTICE file distributed
13 # with this work for additional information regarding copyright
14 # ownership. The ASF licenses this file to you under the Apache
15 # License, Version 2.0 (the "License"); you may not use this file
16 # except in compliance with the License. You may obtain a copy of
17 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 gb_CppunitTest_UNITTESTFAILED ?
= $(GBUILDDIR
)/platform
/unittest-failed-default.sh
23 gb_CppunitTest_PYTHONDEPS ?
= $(call gb_Library_get_target
,pyuno_wrapper
) $(if
$(SYSTEM_PYTHON
),,$(call gb_Package_get_target
,python3
))
25 ifeq ($(WITH_COREDUMPCTL
),)
26 gb_CppunitTest_coredumpctl_setup
:=
27 gb_CppunitTest_coredumpctl_run
:=
29 gb_CppunitTest_coredumpctl_setup
= \
30 export LIBO_TEST_UNIT
=$$($(SYSTEMD_ESCAPE
) "$1:$$(date -u +%Y%m%d%H%M%S):$$$$$(if $2,:$2)" | cut
-b
-249) &&
31 gb_CppunitTest_coredumpctl_run
:= $(SYSTEMD_RUN
) --scope
--user
--unit
="$$LIBO_TEST_UNIT"
34 ifneq ($(strip $(CPPUNITTRACE
)),)
35 ifneq ($(filter gdb
,$(CPPUNITTRACE
)),)
36 # sneak (a) setting the LD_LIBRARY_PATH, and (b) setting malloc debug flags, into the "gdb --args" command line
37 gb_CppunitTest_GDBTRACE
:= $(subst gdb
,\
38 gdb
-return-child-result
-ex
"add-auto-load-safe-path $(INSTDIR)" -ex
"set environment $(subst =, ,$(gb_CppunitTest_CPPTESTPRECOMMAND))" $(if
$(PYTHONWARNINGS
),-ex
'set environment PYTHONWARNINGS $(PYTHONWARNINGS)') $(gb_CppunitTest_malloc_check
) $(gb_CppunitTest_DEBUGCPPUNIT
),\
40 gb_PythonTest_GDBTRACE
:= $(subst gdb
,\
41 gdb
-return-child-result
-ex
"add-auto-load-safe-path $(INSTDIR)" -ex
"set environment $(subst =, ,$(gb_PythonTest_PRECOMMAND))" $(if
$(PYTHONWARNINGS
),-ex
'set environment PYTHONWARNINGS $(PYTHONWARNINGS)') $(gb_CppunitTest_malloc_check
) $(gb_CppunitTest_DEBUGCPPUNIT
),\
43 else ifneq ($(filter lldb
,$(CPPUNITTRACE
)),)
44 gb_CppunitTest_GDBTRACE
:= $(subst lldb
,\
45 lldb
-o
"env $(gb_CppunitTest_CPPTESTPRECOMMAND)" $(gb_CppunitTest_malloc_check
),\
47 gb_PythonTest_GDBTRACE
:= $(gb_CppunitTest_GDBTRACE
)
49 gb_CppunitTest_GDBTRACE
:= $(CPPUNITTRACE
)
50 gb_PythonTest_GDBTRACE
:= $(gb_CppunitTest_GDBTRACE
)
52 ifneq ($(strip $(DEBUGCPPUNIT
)),TRUE
)
53 gb_CppunitTest__interactive
:= $(true
)
57 ifneq ($(strip $(VALGRIND
)),)
58 gb_CppunitTest_VALGRINDTOOL
:= valgrind
--tool
=$(VALGRIND
) --num-callers
=50 --error-exitcode
=1 --trace-children
=yes
--trace-children-skip
='*/java,*/gij'
59 ifneq ($(strip $(VALGRIND_GDB
)),)
60 gb_CppunitTest_VALGRINDTOOL
+= --vgdb
=yes
--vgdb-error
=0
62 ifeq ($(strip $(VALGRIND
)),memcheck
)
63 G_SLICE
:= always-malloc
64 GLIBCXX_FORCE_NEW
:= 1
68 ifneq (,$(filter perfcheck
,$(MAKECMDGOALS
)))
69 $(if
$(ENABLE_VALGRIND
),,$(call gb_Output_error
,Running performance tests with empty
$$(ENABLE_VALGRIND
) does not make sense. Please
install valgrind-dev and re-run autogen.
))
70 gb_CppunitTest_VALGRINDTOOL
:= valgrind
--tool
=callgrind
--dump-instr
=yes
--instr-atstart
=no
--simulate-cache
=yes
--dump-instr
=yes
--collect-bus
=yes
--branch-sim
=yes
71 ifneq ($(strip $(VALGRIND_GDB
)),)
72 gb_CppunitTest_VALGRINDTOOL
+= --vgdb
=yes
--vgdb-error
=0
76 ifneq ($(strip $(RR
)),)
77 gb_CppunitTest_RR
:= rr record
81 # gb_CppunitTest_get_filename
82 gb_CppunitTest_RUNTIMEDEPS
:= $(call gb_Executable_get_runtime_dependencies
,cppunittester
)
83 gb_CppunitTest_CPPTESTCOMMAND
:= $(call gb_Executable_get_target_for_build
,cppunittester
)
85 # i18npool dlopens localedata_* libraries.
86 gb_CppunitTest_RUNTIMEDEPS
+= \
87 $(call gb_Library_get_target
,localedata_en
) \
88 $(call gb_Library_get_target
,localedata_es
) \
89 $(call gb_Library_get_target
,localedata_euro
) \
90 $(call gb_Library_get_target
,localedata_others
) \
91 $(call gb_Package_get_target
,test_unittest
) \
93 define gb_CppunitTest__make_args
95 "-env:BRAND_BASE_DIR=$(call gb_Helper_make_url,$(INSTROOT))" \
96 "-env:BRAND_SHARE_SUBDIR=$(LIBO_SHARE_FOLDER)" \
97 "-env:BRAND_SHARE_RESOURCE_SUBDIR=$(LIBO_SHARE_RESOURCE_FOLDER)" \
98 "-env:UserInstallation=$(call gb_Helper_make_url,$(call gb_CppunitTest_get_target,$*).user)" \
100 $(if
$(strip $(CONFIGURATION_LAYERS
)),\
101 "-env:CONFIGURATION_LAYERS=$(strip $(CONFIGURATION_LAYERS))") \
102 $(if
$(strip $(UNO_TYPES
)),\
103 "-env:UNO_TYPES=$(foreach item,$(UNO_TYPES),$(call gb_Helper_make_url,$(item)))") \
104 $(if
$(strip $(UNO_SERVICES
)),\
105 "-env:UNO_SERVICES=$(foreach item,$(UNO_SERVICES),$(call gb_Helper_make_url,$(item)))" -env
:URE_BIN_DIR
=$(call gb_Helper_make_url
,$(INSTROOT
)/$(LIBO_URE_BIN_FOLDER
))) \
106 -env
:URE_INTERNAL_LIB_DIR
=$(call gb_Helper_make_url
,$(INSTROOT
)/$(LIBO_URE_LIB_FOLDER
)) \
107 -env
:LO_LIB_DIR
=$(call gb_Helper_make_url
,$(INSTROOT
)/$(LIBO_LIB_FOLDER
)) \
108 -env
:LO_JAVA_DIR
=$(call gb_Helper_make_url
,$(INSTROOT
)/$(LIBO_SHARE_JAVA_FOLDER
)) \
109 --protector
$(call gb_Library_get_target
,unoexceptionprotector
) unoexceptionprotector \
110 --protector
$(call gb_Library_get_target
,unobootstrapprotector
) unobootstrapprotector \
113 --protector
$(call gb_Library_get_target
,vclbootstrapprotector
) vclbootstrapprotector \
118 .PHONY
: $(call gb_CppunitTest_get_clean_target
,%)
119 $(call gb_CppunitTest_get_clean_target
,%) :
120 $(call gb_Helper_abbreviate_dirs
,\
121 rm -f
$(call gb_CppunitTest_get_target
,$*) $(call gb_CppunitTest_get_target
,$*).log
)
123 .PHONY
: $(call gb_CppunitTest_get_target
,%)
124 $(call gb_CppunitTest_get_target
,%) :|
$(gb_CppunitTest_RUNTIMEDEPS
)
125 ifneq ($(gb_SUPPRESS_TESTS
),)
128 $(call gb_Output_announce
,$*,$(true
),CUT
,2)
129 $(call gb_Trace_StartRange
,$*,CUT
)
130 $(call gb_Helper_abbreviate_dirs
,\
131 mkdir
-p
$(dir $@
) && \
132 rm -fr
$@.user
&& cp
-r
$(WORKDIR
)/unittest
$@.user
&& \
133 $(if
$(gb_CppunitTest__use_confpreinit
), \
134 $(INSTDIR
)/program
/lokconf_init
$(call gb_CppunitTest__make_args
) &&) \
135 $(if
$(gb_CppunitTest__interactive
),, \
136 $(if
$(value gb_CppunitTest_postprocess
), \
137 rm -fr
$@.core
&& mkdir
$@.core
&& cd
$@.core
&&)) \
139 $(if
$(gb_CppunitTest_localized
),for l in
$(WITH_LANG_LIST
) ; do \
140 printf
'LO_TEST_LOCALE=%s\n' "$$l" && ) \
141 $(call gb_CppunitTest_coredumpctl_setup
,$@
,$(if
$(gb_CppunitTest_localized
),$$l)) \
142 $(if
$(gb_CppunitTest_localized
),LO_TEST_LOCALE
="$$l") \
143 $(if
$(gb_CppunitTest__vcl_no_svp
), \
144 $(filter-out SAL_USE_VCLPLUGIN
=svp
,$(gb_TEST_ENV_VARS
)),$(gb_TEST_ENV_VARS
)) \
146 $(if
$(filter allow
,$(NON_APPLICATION_FONT_USE
)),, \
147 $(if
$(filter abort
,$(NON_APPLICATION_FONT_USE
)),SAL_NON_APPLICATION_FONT_USE
=abort
, \
148 $(if
$(filter deny
,$(NON_APPLICATION_FONT_USE
)),SAL_NON_APPLICATION_FONT_USE
=deny
))) \
149 $(if
$(filter gdb
,$(gb_CppunitTest_GDBTRACE
)),,$(gb_CppunitTest_CPPTESTPRECOMMAND
)) \
150 $(if
$(G_SLICE
),G_SLICE
=$(G_SLICE
)) \
151 $(if
$(GLIBCXX_FORCE_NEW
),GLIBCXX_FORCE_NEW
=$(GLIBCXX_FORCE_NEW
)) \
152 $(if
$(strip $(PYTHON_URE
)),\
153 PYTHONDONTWRITEBYTECODE
=1) \
154 $(if
$(filter gdb
,$(CPPUNITTRACE
)),\
155 PYTHONWARNINGS
=default
) \
156 $(ICECREAM_RUN
) $(gb_CppunitTest_coredumpctl_run
) $(gb_CppunitTest_GDBTRACE
) $(gb_CppunitTest_VALGRINDTOOL
) $(gb_CppunitTest_RR
) \
157 $(gb_CppunitTest_CPPTESTCOMMAND
) \
158 $(call gb_CppunitTest_get_linktarget_target
,$*) \
159 $(call gb_CppunitTest__make_args
) "-env:CPPUNITTESTTARGET=$@" \
160 $(if
$(gb_CppunitTest_localized
),|| exit
$$?
; done
) \
162 $(if
$(gb_CppunitTest__interactive
),, \
164 ||
($(if
$(value gb_CppunitTest_postprocess
), \
166 $(call gb_CppunitTest_postprocess
,$(gb_CppunitTest_CPPTESTCOMMAND
),$@.core
,$$RET) >> $@.log
2>&1;) \
167 cat
$@.log
; $(gb_CppunitTest_UNITTESTFAILED
) Cppunit
$*)))
168 $(call gb_Trace_EndRange
,$*,CUT
)
171 define gb_CppunitTest_CppunitTest
172 $(call gb_CppunitTest__CppunitTest_impl
,$(1),$(call gb_CppunitTest_get_linktarget
,$(1)))
176 define gb_CppunitTest_CppunitScreenShot
177 $(call gb_CppunitTest_get_target
,$(1)) : gb_CppunitTest_localized
:= $(true
)
178 $(call gb_CppunitTest__CppunitTest_impl
,$(1),$(call gb_CppunitTest_get_linktarget
,$(1)))
182 define gb_CppunitTest_register_target
185 # call gb_CppunitTest__CppunitTest_impl,cppunittest,linktarget
186 define gb_CppunitTest__CppunitTest_impl
187 $(call gb_CppunitTest_register_target
, $(1), $(2), "test")
188 $(call gb_LinkTarget_LinkTarget
,$(2),CppunitTest_
$(1),NONE
)
189 $(call gb_LinkTarget_set_targettype
,$(2),CppunitTest
)
190 $(call gb_LinkTarget_add_libs
,$(2),$(gb_STDLIBS
))
191 $(call gb_LinkTarget_add_defs
,$(2),\
192 $(gb_CppunitTest_DEFS
) \
194 $(call gb_LinkTarget_use_external
,$(2),cppunit
)
195 $(call gb_LinkTarget_set_include
,$(2),\
197 $(filter -I
%,$(CPPUNIT_CFLAGS
)) \
199 $(call gb_LinkTarget_add_defs
,$(2), \
200 $(filter-out -I
%,$(CPPUNIT_CFLAGS
)) \
201 -DCPPUNIT_PLUGIN_EXPORT
='extern "C" SAL_DLLPUBLIC_EXPORT' \
203 $(call gb_CppunitTest_get_target
,$(1)) : $(call gb_LinkTarget_get_target
,$(2))
204 $(call gb_CppunitTest_get_clean_target
,$(1)) : $(call gb_LinkTarget_get_clean_target
,$(2))
205 $(call gb_CppunitTest_CppunitTest_platform
,$(1),$(2),$(gb_CppunitTest_DLLDIR
)/$(call gb_CppunitTest_get_ilibfilename
,$(1)))
206 $(call gb_CppunitTest_get_target
,$(1)) : ARGS
:=
207 $(call gb_CppunitTest_get_target
,$(1)) : CONFIGURATION_LAYERS
:=
208 $(call gb_CppunitTest_get_target
,$(1)) : PYTHON_URE
:= $(false
)
209 $(call gb_CppunitTest_get_target
,$(1)) : URE
:= $(false
)
210 $(call gb_CppunitTest_get_target
,$(1)) : VCL
:= $(false
)
211 $(call gb_CppunitTest_get_target
,$(1)) : UNO_SERVICES
:=
212 $(call gb_CppunitTest_get_target
,$(1)) : UNO_TYPES
:=
213 $(call gb_CppunitTest_get_target
,$(1)) : HEADLESS
:= --headless
214 $(call gb_CppunitTest_get_target
,$(1)) : EXTRA_ENV_VARS
:=
215 $(call gb_CppunitTest_get_target
,$(1)) : NON_APPLICATION_FONT_USE
:=
216 $$(eval
$$(call gb_Module_register_target
,$(call gb_CppunitTest_get_target
,$(1)),$(call gb_CppunitTest_get_clean_target
,$(1))))
217 $(call gb_Helper_make_userfriendly_targets
,$(1),CppunitTest
)
221 # Add additional command line arguments for the test.
223 # You should practically never need to use this, as there are special
224 # functions for adding many commonly used arguments.
225 define gb_CppunitTest_add_arguments
226 $(call gb_CppunitTest_get_target
,$(1)) : ARGS
+= $(2)
230 define gb_CppunitTest_use_ure
231 $(call gb_CppunitTest_use_rdb
,$(1),ure
/services
)
232 $(call gb_CppunitTest_get_target
,$(1)) : URE
:= $(true
)
233 $(call gb_CppunitTest_get_target
,$(1)) : $(call gb_Library_get_target
,$(CPPU_ENV
)_uno
)
234 $(call gb_CppunitTest_get_target
,$(1)) : $(call gb_Library_get_target
,affine_uno
)
235 $(call gb_CppunitTest_get_target
,$(1)) : $(call gb_Library_get_target
,unobootstrapprotector
)
236 $(call gb_CppunitTest_get_target
,$(1)) : $(call gb_Library_get_target
,unoexceptionprotector
)
240 # $(2) == $(true) if headless:
241 define gb_CppunitTest__use_vcl
242 $(call gb_CppunitTest_get_target
,$(1)) : VCL
:= $(true
)
243 $(call gb_CppunitTest_get_target
,$(1)) : $(call gb_Library_get_target
,vclbootstrapprotector
)
244 ifeq ($(USING_X11
),TRUE
)
245 $(call gb_CppunitTest_get_target
,$(1)) : $(call gb_Library_get_target
,desktop_detector
)
246 $(call gb_CppunitTest_get_target
,$(1)) : $(if
$(filter $(2),$(true
)),, \
247 $(call gb_Library_get_target
,vclplug_gen
) \
248 $(if
$(ENABLE_GTK3
),$(call gb_Library_get_target
,vclplug_gtk3
)) \
249 $(if
$(ENABLE_GTK4
),$(call gb_Library_get_target
,vclplug_gtk4
)) \
250 $(if
$(ENABLE_QT5
),$(call gb_Library_get_target
,vclplug_qt5
)) \
251 $(if
$(ENABLE_QT6
),$(call gb_Library_get_target
,vclplug_qt6
)) \
253 else ifeq ($(OS
),MACOSX
)
254 $(call gb_CppunitTest_get_target
,$(1)): $(call gb_Library_get_target
,vclplug_osx
)
255 else ifeq ($(OS
),WNT
)
256 $(call gb_CppunitTest_get_target
,$(1)): $(call gb_Library_get_target
,vclplug_win
)
261 define gb_CppunitTest_use_confpreinit
262 $(call gb_CppunitTest_use_executable
,$(1),lokconf_init
)
263 $(call gb_CppunitTest_get_target
,$(1)) : gb_CppunitTest__use_confpreinit
:= TRUE
267 define gb_CppunitTest_use_vcl
268 $(call gb_CppunitTest__use_vcl
,$(1),$(true
))
272 define gb_CppunitTest_use_vcl_non_headless
273 $(call gb_CppunitTest_get_target
,$(1)) : gb_CppunitTest__vcl_no_svp
:= $(true
)
274 $(call gb_CppunitTest__use_vcl
,$(1),$(false
))
278 define gb_CppunitTest_use_vcl_non_headless_with_windows
279 $(call gb_CppunitTest_get_target
,$(1)) : HEADLESS
:=
280 $(call gb_CppunitTest_get_target
,$(1)) : gb_CppunitTest__vcl_no_svp
:= $(true
)
281 $(call gb_CppunitTest__use_vcl
,$(1),$(false
))
285 define gb_CppunitTest_localized_run
286 $(call gb_CppunitTest_get_target
,$(1)) : gb_CppunitTest_localized
:= $(true
)
290 define gb_CppunitTest__use_api
291 $(call gb_CppunitTest_get_target
,$(1)) : $(call gb_UnoApi_get_target
,$(2))
292 $(call gb_CppunitTest_get_target
,$(1)) : UNO_TYPES
+= $(call gb_UnoApi_get_target
,$(2))
296 define gb_CppunitTest_use_api
297 $(call gb_LinkTarget_use_api
,$(call gb_CppunitTest_get_linktarget
,$(1)),$(2))
298 $(foreach rdb
,$(2),$(call gb_CppunitTest__use_api
,$(1),$(rdb
)))
302 define gb_CppunitTest_use_udk_api
303 $(call gb_CppunitTest_use_api
,$(1),udkapi
)
307 define gb_CppunitTest_use_sdk_api
308 $(call gb_CppunitTest_use_api
,$(1),udkapi offapi
)
312 define gb_CppunitTest_use_rdb
313 $(call gb_CppunitTest_get_target
,$(1)) : $(call gb_Rdb_get_target_for_build
,$(2))
314 $(call gb_CppunitTest_get_target
,$(1)) : UNO_SERVICES
+= $(call gb_Rdb_get_target_for_build
,$(2))
318 define gb_CppunitTest_use_rdbs
319 $(foreach rdb
,$(2),$(call gb_CppunitTest_use_rdb
,$(1),$(rdb
)))
323 define gb_CppunitTest_use_component
324 $(call gb_CppunitTest_get_target
,$(1)) : \
325 $(call gb_ComponentTarget_get_target
,$(2))
326 $(call gb_CppunitTest_get_target
,$(1)) : \
327 UNO_SERVICES
+= $(call gb_ComponentTarget_get_target
,$(2))
331 define gb_CppunitTest_set_componentfile
332 $(call gb_ComponentTarget_ComponentTarget
,CppunitTest
/$(2),\
333 $(call gb_Helper_make_url
,$(gb_CppunitTest_DLLDIR
))/,\
334 $(call gb_CppunitTest_get_filename
,$(1)))
335 $(call gb_CppunitTest_get_target
,$(1)) : \
336 $(call gb_ComponentTarget_get_target
,CppunitTest
/$(2))
337 $(call gb_CppunitTest_get_clean_target
,$(1)) : \
338 $(call gb_ComponentTarget_get_clean_target
,CppunitTest
/$(2))
339 $(call gb_CppunitTest_use_component
,$(1),CppunitTest
/$(2))
343 # Given a list of component files, filter out those corresponding
344 # to libraries not built in this configuration.
345 define gb_CppunitTest__filter_not_built_components
347 $(if
$(filter SCRIPTING
,$(BUILD_TYPE
)),, \
350 scripting
/source
/basprov
/basprov \
351 scripting
/util
/scriptframe
) \
352 $(if
$(filter DBCONNECTIVITY
,$(BUILD_TYPE
)),, \
354 forms
/util
/frm
),$(1))
357 define gb_CppunitTest_use_components
358 $(foreach component
,$(call gb_CppunitTest__filter_not_built_components
,$(2)),$(call gb_CppunitTest_use_component
,$(1),$(component
)))
362 define gb_CppunitTest__use_configuration
363 $(call gb_CppunitTest_get_target
,$(1)) : CONFIGURATION_LAYERS
+= $(2):$(call gb_Helper_make_url
,$(3))
367 # Use instdir configuration
368 define gb_CppunitTest_use_instdir_configuration
369 $(call gb_CppunitTest_get_target
,$(1)) : $(call gb_Package_get_target
,postprocess_registry
)
370 $(call gb_CppunitTest__use_configuration
,$(1),xcsxcu
,$(INSTROOT
)/$(LIBO_SHARE_FOLDER
)/registry
)
374 # Use configuration in $(WORKDIR)/unittest/registry-common.
375 define gb_CppunitTest_use_common_configuration
376 $(call gb_CppunitTest_get_target
,$(1)) : $(call gb_Package_get_target
,test_unittest
)
377 $(call gb_CppunitTest__use_configuration
,$(1),xcsxcu
,$(WORKDIR
)/unittest
/registry-common
)
381 # Use configuration in $(WORKDIR)/unittest/registry-user-ui
382 define gb_CppunitTest_use_user_ui_configuration
383 $(call gb_CppunitTest_get_target
,$(1)) : $(call gb_Package_get_target
,test_unittest
)
384 $(call gb_CppunitTest__use_configuration
,$(1),xcsxcu
,$(WORKDIR
)/unittest
/registry-user-ui
)
388 # Use standard configuration: instdir config + common + user-ui config (in this order!)
389 define gb_CppunitTest_use_configuration
390 $(call gb_CppunitTest_use_instdir_configuration
,$(1))
391 $(call gb_CppunitTest_use_common_configuration
,$(1))
392 $(call gb_CppunitTest_use_user_ui_configuration
,$(1))
396 define gb_CppunitTest_use_executable
397 $(call gb_CppunitTest_get_target
,$(1)) : $(call gb_Executable_get_target
,$(2))
401 # One of allow, deny, abort:
402 define gb_CppunitTest_set_non_application_font_use
403 $(call gb_CppunitTest_get_target
,$(1)) : NON_APPLICATION_FONT_USE
+= $(2)
407 define gb_CppunitTest_use_more_fonts
408 ifneq ($(filter MORE_FONTS
,$(BUILD_TYPE
)),)
409 $(call gb_CppunitTest_get_target
,$(1)) : \
410 $(foreach font
,$(gb_Package_MODULE_ooo_fonts
),$(call gb_Package_get_target
,$(font
)))
411 $(call gb_CppunitTest_set_non_application_font_use
,$(1),deny
)
416 define gb_CppunitTest__use_java_ure
417 $(call gb_CppunitTest_get_target
,$(1)) : \
418 $(foreach jar
,java_uno libreoffice unoloader
,$(call gb_Jar_get_target
,$(jar
))) \
419 $(call gb_Library_get_target
,affine_uno_uno
) \
420 $(call gb_Library_get_target
,java_uno
) \
421 $(call gb_Library_get_target
,jpipe
) \
422 $(call gb_Library_get_target
,juhx
) \
423 $(call gb_Library_get_target
,juhx
) \
424 $(call gb_Library_get_target
,jvmaccess
) \
425 $(call gb_Library_get_target
,jvmfwk
) \
426 $(call gb_Package_get_target
,jvmfwk_javavendors
) \
427 $(call gb_Package_get_target
,jvmfwk_jreproperties
) \
428 $(call gb_Package_get_target
,jvmfwk_jvmfwk3_ini
) \
432 define gb_CppunitTest_use_jar
433 $(call gb_CppunitTest__use_java_ure
,$(1))
434 $(call gb_CppunitTest_get_target
,$(1)) : $(call gb_Jar_get_target
,$(2))
438 define gb_CppunitTest_use_jars
439 $(foreach jar
,$(2),$(call gb_CppunitTest_use_jar
,$(1),$(jar
)))
443 define gb_CppunitTest_use_python_ure
444 $(call gb_CppunitTest_get_target
,$(1)) : PYTHON_URE
:= $(true
)
445 $(call gb_CppunitTest_get_target
,$(1)) :\
446 $(call gb_Library_get_target
,pythonloader
) \
447 $(call gb_Library_get_target
,pyuno
) \
448 $(gb_CppunitTest_PYTHONDEPS
) \
449 $(call gb_Package_get_target
,pyuno_python_scripts
)
453 define gb_CppunitTest_use_uiconfig
454 $(call gb_CppunitTest_get_target
,$(1)) : $(call gb_UIConfig_get_target
,$(2))
458 define gb_CppunitTest_use_uiconfigs
459 $(foreach uiconfig
,$(2),$(call gb_CppunitTest_use_uiconfig
,$(1),$(uiconfig
)))
463 # forward the call to the gb_LinkTarget implementation
464 # (note: because the function name is in $(1), the other args are shifted by 1)
465 define gb_CppunitTest__forward_to_Linktarget
466 $(call gb_LinkTarget_
$(subst gb_CppunitTest_
,,$(1)),$(call gb_CppunitTest_get_linktarget
,$(2)),$(3),$(4),CppunitTest_
$(2))
470 # copy pasta for forwarding: this could be (and was) done more elegantly, but
471 # these here can be found by both git grep and ctags
472 gb_CppunitTest_add_cobject
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
473 gb_CppunitTest_add_cobjects
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
474 gb_CppunitTest_add_cxxobject
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
475 gb_CppunitTest_add_cxxobjects
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
476 gb_CppunitTest_add_exception_objects
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
477 gb_CppunitTest_use_executable_objects
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
478 gb_CppunitTest_use_library_objects
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
479 gb_CppunitTest_use_libraries
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
480 gb_CppunitTest_use_static_libraries
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
481 gb_CppunitTest_add_objcobject
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
482 gb_CppunitTest_add_objcobjects
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
483 gb_CppunitTest_add_objcxxobject
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
484 gb_CppunitTest_add_objcxxobjects
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
485 gb_CppunitTest_add_cxxclrobject
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
486 gb_CppunitTest_add_cxxclrobjects
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
487 gb_CppunitTest_add_asmobject
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
488 gb_CppunitTest_add_asmobjects
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
489 gb_CppunitTest_use_package
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
490 gb_CppunitTest_use_packages
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
491 gb_CppunitTest_set_precompiled_header
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
492 gb_CppunitTest_reuse_precompiled_header
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
493 gb_CppunitTest_use_common_precompiled_header
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
494 gb_CppunitTest_add_sdi_headers
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
495 gb_CppunitTest_add_cflags
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
496 gb_CppunitTest_set_cflags
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
497 gb_CppunitTest_add_cxxflags
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
498 gb_CppunitTest_set_yaccflags
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
499 gb_CppunitTest_add_objcflags
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
500 gb_CppunitTest_add_objcxxflags
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
501 gb_CppunitTest_add_cxxclrflags
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
502 gb_CppunitTest_add_defs
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
503 gb_CppunitTest_set_include
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
504 gb_CppunitTest_add_ldflags
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
505 gb_CppunitTest_set_ldflags
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
506 gb_CppunitTest_add_libs
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
507 gb_CppunitTest_disable_standard_system_libs
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
508 gb_CppunitTest_use_system_darwin_frameworks
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
509 gb_CppunitTest_use_system_win32_libs
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
510 gb_CppunitTest_use_internal_api
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
511 gb_CppunitTest_use_internal_bootstrap_api
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
512 gb_CppunitTest_use_internal_comprehensive_api
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
513 gb_CppunitTest_set_library_path_flags
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
514 gb_CppunitTest_use_external
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
515 gb_CppunitTest_use_externals
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
516 gb_CppunitTest_use_custom_headers
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
517 gb_CppunitTest_set_visibility_default
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
518 gb_CppunitTest_set_warnings_not_errors
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
519 gb_CppunitTest_set_warnings_disabled
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
520 gb_CppunitTest_set_external_code
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
521 gb_CppunitTest_set_generated_cxx_suffix
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
522 gb_CppunitTest_use_clang
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
523 gb_CppunitTest_set_clang_precompiled_header
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
524 gb_CppunitTest_use_vclmain
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
525 gb_CppunitTest_add_prejs
= $(call gb_CppunitTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
527 # vim: set noet sw=4: