Merge topic 'genex-build-property-no-head'

3f476bea Genex: Do not consider 'head' when evaluating build properties
This commit is contained in:
Brad King 2014-08-07 10:07:51 -04:00 committed by CMake Topic Stage
commit 6f0d1a38c8
3 changed files with 17 additions and 2 deletions

View File

@ -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);
}

View File

@ -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>)

View File

@ -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; }