[Cmake-commits] CMake branch, next, updated. v2.8.11-2332-g524a12a
Stephen Kelly
steveire at gmail.com
Thu May 30 09:52:39 EDT 2013
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 524a12ae74bcd4c1598776ab67b960a884a935bb (commit)
via aeff2c53f74195936ff54eed970e3edc1d459ca5 (commit)
from 0186e444917cb95d3589897d785931d83f6d905d (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=524a12ae74bcd4c1598776ab67b960a884a935bb
commit 524a12ae74bcd4c1598776ab67b960a884a935bb
Merge: 0186e44 aeff2c5
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu May 30 09:52:36 2013 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu May 30 09:52:36 2013 -0400
Merge topic 'fix-INCLUDE_DIRECTORIES-genex-read' into next
aeff2c5 Revert the fix-INCLUDE_DIRECTORIES-genex-read topic.
diff --cc Source/cmGeneratorExpressionEvaluator.cxx
index 8451491,93d881e..218d41d
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@@ -495,63 -397,8 +495,9 @@@ static const struct JoinNode : public c
static const char* targetPropertyTransitiveWhitelist[] = {
"INTERFACE_INCLUDE_DIRECTORIES"
, "INTERFACE_COMPILE_DEFINITIONS"
+ , "INTERFACE_COMPILE_OPTIONS"
};
- std::string getLinkedTargetsContent(const std::vector<std::string> &libraries,
- cmTarget *target,
- cmGeneratorExpressionContext *context,
- cmGeneratorExpressionDAGChecker *dagChecker,
- const std::string &interfacePropertyName)
- {
- cmGeneratorExpression ge(context->Backtrace);
-
- std::string sep;
- std::string depString;
- for (std::vector<std::string>::const_iterator
- it = libraries.begin();
- it != libraries.end(); ++it)
- {
- if (*it == target->GetName())
- {
- // Broken code can have a target in its own link interface.
- // Don't follow such link interface entries so as not to create a
- // self-referencing loop.
- continue;
- }
- if (context->Makefile->FindTargetToUse(it->c_str()))
- {
- depString +=
- sep + "$<TARGET_PROPERTY:" + *it + "," + interfacePropertyName + ">";
- sep = ";";
- }
- }
- cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(depString);
- std::string linkedTargetsContent = cge->Evaluate(context->Makefile,
- context->Config,
- context->Quiet,
- context->HeadTarget,
- target,
- dagChecker);
- if (cge->GetHadContextSensitiveCondition())
- {
- context->HadContextSensitiveCondition = true;
- }
- return linkedTargetsContent;
- }
-
- //----------------------------------------------------------------------------
- struct TransitiveWhitelistCompare
- {
- explicit TransitiveWhitelistCompare(const std::string &needle)
- : Needle(needle) {}
- bool operator() (const char *item)
- { return strcmp(item, this->Needle.c_str()) == 0; }
- private:
- std::string Needle;
- };
-
-
//----------------------------------------------------------------------------
static const struct TargetPropertyNode : public cmGeneratorExpressionNode
{
@@@ -724,18 -570,9 +670,14 @@@
{
interfacePropertyName = "INTERFACE_COMPILE_DEFINITIONS";
}
+ else if (propertyName == "INTERFACE_COMPILE_OPTIONS"
+ || propertyName == "COMPILE_OPTIONS")
+ {
+ interfacePropertyName = "INTERFACE_COMPILE_OPTIONS";
+ }
- const char **transBegin = targetPropertyTransitiveWhitelist;
- const char **transEnd = targetPropertyTransitiveWhitelist
- + (sizeof(targetPropertyTransitiveWhitelist) /
- sizeof(*targetPropertyTransitiveWhitelist));
- if (std::find_if(transBegin, transEnd,
- TransitiveWhitelistCompare(propertyName)) != transEnd)
+ if (interfacePropertyName == "INTERFACE_INCLUDE_DIRECTORIES"
+ || interfacePropertyName == "INTERFACE_COMPILE_DEFINITIONS")
{
const cmTarget::LinkInterface *iface = target->GetLinkInterface(
context->Config,
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aeff2c53f74195936ff54eed970e3edc1d459ca5
commit aeff2c53f74195936ff54eed970e3edc1d459ca5
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu May 30 15:49:07 2013 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Thu May 30 15:51:57 2013 +0200
Revert the fix-INCLUDE_DIRECTORIES-genex-read topic.
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index d076cc1..93d881e 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -399,60 +399,6 @@ static const char* targetPropertyTransitiveWhitelist[] = {
, "INTERFACE_COMPILE_DEFINITIONS"
};
-std::string getLinkedTargetsContent(const std::vector<std::string> &libraries,
- cmTarget *target,
- cmGeneratorExpressionContext *context,
- cmGeneratorExpressionDAGChecker *dagChecker,
- const std::string &interfacePropertyName)
-{
- cmGeneratorExpression ge(context->Backtrace);
-
- std::string sep;
- std::string depString;
- for (std::vector<std::string>::const_iterator
- it = libraries.begin();
- it != libraries.end(); ++it)
- {
- if (*it == target->GetName())
- {
- // Broken code can have a target in its own link interface.
- // Don't follow such link interface entries so as not to create a
- // self-referencing loop.
- continue;
- }
- if (context->Makefile->FindTargetToUse(it->c_str()))
- {
- depString +=
- sep + "$<TARGET_PROPERTY:" + *it + "," + interfacePropertyName + ">";
- sep = ";";
- }
- }
- cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(depString);
- std::string linkedTargetsContent = cge->Evaluate(context->Makefile,
- context->Config,
- context->Quiet,
- context->HeadTarget,
- target,
- dagChecker);
- if (cge->GetHadContextSensitiveCondition())
- {
- context->HadContextSensitiveCondition = true;
- }
- return linkedTargetsContent;
-}
-
-//----------------------------------------------------------------------------
-struct TransitiveWhitelistCompare
-{
- explicit TransitiveWhitelistCompare(const std::string &needle)
- : Needle(needle) {}
- bool operator() (const char *item)
- { return strcmp(item, this->Needle.c_str()) == 0; }
-private:
- std::string Needle;
-};
-
-
//----------------------------------------------------------------------------
static const struct TargetPropertyNode : public cmGeneratorExpressionNode
{
@@ -625,36 +571,49 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
interfacePropertyName = "INTERFACE_COMPILE_DEFINITIONS";
}
- const char **transBegin = targetPropertyTransitiveWhitelist;
- const char **transEnd = targetPropertyTransitiveWhitelist
- + (sizeof(targetPropertyTransitiveWhitelist) /
- sizeof(*targetPropertyTransitiveWhitelist));
- if (std::find_if(transBegin, transEnd,
- TransitiveWhitelistCompare(propertyName)) != transEnd)
+ if (interfacePropertyName == "INTERFACE_INCLUDE_DIRECTORIES"
+ || interfacePropertyName == "INTERFACE_COMPILE_DEFINITIONS")
{
const cmTarget::LinkInterface *iface = target->GetLinkInterface(
context->Config,
context->HeadTarget);
if(iface)
{
- linkedTargetsContent =
- getLinkedTargetsContent(iface->Libraries, target,
- context, &dagChecker,
- interfacePropertyName);
- }
- }
- else if (std::find_if(transBegin, transEnd,
- TransitiveWhitelistCompare(interfacePropertyName)) != transEnd)
- {
- const cmTarget::LinkImplementation *impl = target->GetLinkImplementation(
- context->Config,
- context->HeadTarget);
- if(impl)
- {
- linkedTargetsContent =
- getLinkedTargetsContent(impl->Libraries, target,
- context, &dagChecker,
- interfacePropertyName);
+ cmGeneratorExpression ge(context->Backtrace);
+
+ std::string sep;
+ std::string depString;
+ for (std::vector<std::string>::const_iterator
+ it = iface->Libraries.begin();
+ it != iface->Libraries.end(); ++it)
+ {
+ if (*it == target->GetName())
+ {
+ // Broken code can have a target in its own link interface.
+ // Don't follow such link interface entries so as not to create a
+ // self-referencing loop.
+ continue;
+ }
+ if (context->Makefile->FindTargetToUse(it->c_str()))
+ {
+ depString +=
+ sep + "$<TARGET_PROPERTY:" + *it + ","
+ + interfacePropertyName + ">";
+ sep = ";";
+ }
+ }
+ cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
+ ge.Parse(depString);
+ linkedTargetsContent = cge->Evaluate(context->Makefile,
+ context->Config,
+ context->Quiet,
+ context->HeadTarget,
+ target,
+ &dagChecker);
+ if (cge->GetHadContextSensitiveCondition())
+ {
+ context->HadContextSensitiveCondition = true;
+ }
}
}
diff --git a/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt
index e9dd4df..50f12ee 100644
--- a/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt
+++ b/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt
@@ -144,21 +144,3 @@ set_property(TARGET TargetIncludeDirectories_C
"$<$<LINK_LANGUAGE:C>:${CMAKE_CURRENT_BINARY_DIR}/good>"
"$<$<STREQUAL:$<LINK_LANGUAGE>,C>:${CMAKE_CURRENT_BINARY_DIR}/othergood/>"
)
-
-add_library(includes_source_good ../empty.cpp)
-target_include_directories(includes_source_good
- INTERFACE
- "${CMAKE_CURRENT_BINARY_DIR}/good"
- "${CMAKE_CURRENT_BINARY_DIR}/othergood/"
-)
-add_library(includes_source_bad ../empty.cpp)
-target_include_directories(includes_source_bad
- INTERFACE
- "${CMAKE_CURRENT_BINARY_DIR}/bad"
-)
-
-add_library(includes_proxy SHARED ../empty.cpp)
-target_link_libraries(includes_proxy includes_source_good)
-target_link_libraries(includes_proxy LINK_INTERFACE_LIBRARIES includes_source_bad)
-add_executable(copy_includes copy_includes.cpp)
-target_include_directories(copy_includes PRIVATE $<TARGET_PROPERTY:includes_proxy,INCLUDE_DIRECTORIES>)
diff --git a/Tests/IncludeDirectories/TargetIncludeDirectories/copy_includes.cpp b/Tests/IncludeDirectories/TargetIncludeDirectories/copy_includes.cpp
deleted file mode 100644
index fed4c03..0000000
--- a/Tests/IncludeDirectories/TargetIncludeDirectories/copy_includes.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-
-#include "common.h"
-
-int main()
-{
- return 0;
-}
-----------------------------------------------------------------------
Summary of changes:
Source/cmGeneratorExpressionEvaluator.cxx | 115 +++++++-------------
.../TargetIncludeDirectories/CMakeLists.txt | 18 ---
.../TargetIncludeDirectories/copy_includes.cpp | 7 --
3 files changed, 37 insertions(+), 103 deletions(-)
delete mode 100644 Tests/IncludeDirectories/TargetIncludeDirectories/copy_includes.cpp
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list