[Cmake-commits] CMake branch, next, updated. v3.0.1-4785-ged40f50
Brad King
brad.king at kitware.com
Wed Aug 6 10:20:08 EDT 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via ed40f502eccba0087c460e5fb5c246d061254630 (commit)
via 3f476beaf7ffc20a27d97fbf04f6699791996f7f (commit)
from 978e9ed4cfc55cbd1c253a863e50dbd18dde4acd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed40f502eccba0087c460e5fb5c246d061254630
commit ed40f502eccba0087c460e5fb5c246d061254630
Merge: 978e9ed 3f476be
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Aug 6 10:20:07 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Aug 6 10:20:07 2014 -0400
Merge topic 'genex-build-property-no-head' into next
3f476bea Genex: Do not consider 'head' when evaluating build properties
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3f476beaf7ffc20a27d97fbf04f6699791996f7f
commit 3f476beaf7ffc20a27d97fbf04f6699791996f7f
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Aug 6 09:51:08 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Aug 6 10:13:04 2014 -0400
Genex: Do not consider 'head' when evaluating build properties
When $<TARGET_PROPERTY> names a build property like COMPILE_DEFINITIONS
but not the usage requirement (INTERFACE_) version of it, the value
should be that used to build the target. It should not be influenced by
a dependent 'head' target like usage requirements are.
Extend the CompileDefinitions test with a case covering the corrected
behavior.
Reviewed-by: Stephen Kelly <steveire at gmail.com>
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 35a9fcb..1c9cfac 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -1081,7 +1081,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)
@@ -1103,7 +1103,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; }
-----------------------------------------------------------------------
Summary of changes:
Source/cmGeneratorExpressionEvaluator.cxx | 4 ++--
Tests/CompileDefinitions/target_prop/CMakeLists.txt | 5 +++++
Tests/CompileDefinitions/target_prop/usetgt.c | 10 ++++++++++
3 files changed, 17 insertions(+), 2 deletions(-)
create mode 100644 Tests/CompileDefinitions/target_prop/usetgt.c
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list