1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
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/.
10 define gb_CompilerTest_CompilerTest
11 $(call gb_CompilerTest__CompilerTest_impl
,$(1),$(call gb_CompilerTest_get_linktarget
,$(1)))
15 # call gb_CompilerTest__CompilerTest_impl,compilertest,linktarget
16 define gb_CompilerTest__CompilerTest_impl
17 $(call gb_LinkTarget_LinkTarget
,$(2),CompilerTest_
$(1),NONE
)
18 $(call gb_LinkTarget_set_targettype
,$(2),CompilerTest
)
19 $(call gb_LinkTarget_get_target
,$(2)): COMPILER_TEST
:= $(true
)
20 $(call gb_LinkTarget_get_target
,$(2)): ENABLE_WERROR
:= $(true
)
21 $(call gb_CompilerTest_get_target
,$(1)): $(call gb_LinkTarget_get_target
,$(2))
22 $(call gb_CompilerTest_get_clean_target
,$(1)): $(call gb_LinkTarget_get_clean_target
,$(2))
23 $$(eval
$$(call gb_Module_register_target
,$(call gb_CompilerTest_get_target
,$(1)),$(call gb_CompilerTest_get_clean_target
,$(1))))
24 $(call gb_Helper_make_userfriendly_targets
,$(1),CompilerTest
)
28 # forward the call to the gb_LinkTarget implementation
29 # (note: because the function name is in $(1), the other args are shifted by 1)
30 define gb_CompilerTest__forward_to_Linktarget
31 $(call gb_LinkTarget_
$(subst gb_CompilerTest_
,,$(1)),$(call gb_CompilerTest_get_linktarget
,$(2)),$(3),$(4),CompilerTest_
$(2))
35 # copy pasta for forwarding: this could be (and was) done more elegantly, but
36 # these here can be found by both git grep and ctags
37 gb_CompilerTest_add_cobject
= $(call gb_CompilerTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
38 gb_CompilerTest_add_cobjects
= $(call gb_CompilerTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
39 gb_CompilerTest_add_cxxobject
= $(call gb_CompilerTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
40 gb_CompilerTest_add_cxxobjects
= $(call gb_CompilerTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
41 gb_CompilerTest_add_exception_objects
= $(call gb_CompilerTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
42 gb_CompilerTest_add_objcobject
= $(call gb_CompilerTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
43 gb_CompilerTest_add_objcobjects
= $(call gb_CompilerTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
44 gb_CompilerTest_add_objcxxobject
= $(call gb_CompilerTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
45 gb_CompilerTest_add_objcxxobjects
= $(call gb_CompilerTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
46 gb_CompilerTest_add_cxxclrobject
= $(call gb_CompilerTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
47 gb_CompilerTest_add_cxxclrobjects
= $(call gb_CompilerTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
48 gb_CompilerTest_add_cxxflags
= $(call gb_CompilerTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
49 gb_CompilerTest_set_external_code
= $(call gb_CompilerTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
50 gb_CompilerTest_use_externals
= $(call gb_CompilerTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
51 gb_CompilerTest_use_udk_api
= $(call gb_CompilerTest__forward_to_Linktarget
,$(0),$(1),$(2),$(3))
53 # vim: set noet sw=4 ts=4: