diff options
author | Brad King <brad.king@kitware.com> | 2014-08-07 14:07:51 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-08-07 14:07:51 (GMT) |
commit | 6f0d1a38c8eee267cf16c4b6bae90ddf218f3088 (patch) | |
tree | 5636b9c3df1b893748b7f1e30daccdc99807210c | |
parent | df08d8575b56699c592ba8dec747dc7f6329b1b7 (diff) | |
parent | 3f476beaf7ffc20a27d97fbf04f6699791996f7f (diff) | |
download | CMake-6f0d1a38c8eee267cf16c4b6bae90ddf218f3088.zip CMake-6f0d1a38c8eee267cf16c4b6bae90ddf218f3088.tar.gz CMake-6f0d1a38c8eee267cf16c4b6bae90ddf218f3088.tar.bz2 |
Merge topic 'genex-build-property-no-head'
3f476bea Genex: Do not consider 'head' when evaluating build properties
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 4 | ||||
-rw-r--r-- | Tests/CompileDefinitions/target_prop/CMakeLists.txt | 5 | ||||
-rw-r--r-- | Tests/CompileDefinitions/target_prop/usetgt.c | 10 |
3 files changed, 17 insertions, 2 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 70f33b7..c1478df 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -1078,7 +1078,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode } } #undef POPULATE_INTERFACE_PROPERTY_NAME - cmTarget const* headTarget = context->HeadTarget + cmTarget const* headTarget = context->HeadTarget && isInterfaceProperty ? context->HeadTarget : target; if(isInterfaceProperty) @@ -1100,7 +1100,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode { linkedTargetsContent = getLinkedTargetsContent(impl->Libraries, target, - headTarget, + target, context, &dagChecker, interfacePropertyName); } diff --git a/Tests/CompileDefinitions/target_prop/CMakeLists.txt b/Tests/CompileDefinitions/target_prop/CMakeLists.txt index 2ca2869..311975c 100644 --- a/Tests/CompileDefinitions/target_prop/CMakeLists.txt +++ b/Tests/CompileDefinitions/target_prop/CMakeLists.txt @@ -53,3 +53,8 @@ set_property(TARGET target_prop_mixed_executable APPEND PROPERTY COMPILE_DEFINIT "LINK_LANGUAGE_IS_$<TARGET_PROPERTY:LINKER_LANGUAGE>" "C_EXECUTABLE_LINK_LANGUAGE_IS_$<TARGET_PROPERTY:target_prop_c_executable,LINKER_LANGUAGE>" ) + +add_library(tgt STATIC IMPORTED) +set_property(TARGET tgt APPEND PROPERTY COMPILE_DEFINITIONS TGT_DEF TGT_TYPE_$<TARGET_PROPERTY:TYPE>) +add_executable(usetgt usetgt.c) +target_compile_definitions(usetgt PRIVATE $<TARGET_PROPERTY:tgt,COMPILE_DEFINITIONS>) diff --git a/Tests/CompileDefinitions/target_prop/usetgt.c b/Tests/CompileDefinitions/target_prop/usetgt.c new file mode 100644 index 0000000..6672a3e --- /dev/null +++ b/Tests/CompileDefinitions/target_prop/usetgt.c @@ -0,0 +1,10 @@ +#ifndef TGT_DEF +# error TGT_DEF incorrectly not defined +#endif +#ifndef TGT_TYPE_STATIC_LIBRARY +# error TGT_TYPE_STATIC_LIBRARY incorrectly not defined +#endif +#ifdef TGT_TYPE_EXECUTABLE +# error TGT_TYPE_EXECUTABLE incorrectly defined +#endif +int main(void) { return 0; } |