[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1681-g8855308
Stephen Kelly
steveire at gmail.com
Sun Jan 20 11:28:19 EST 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 8855308287f18b45d391dc9e022ffdd73282736f (commit)
via f774699f7004eb89816846c2e9bcf4ed4af11824 (commit)
via 68d3d02f74a390eee38884423e43fc316e7415d3 (commit)
from d1897e26af684dc7d23b27dbbf6d0020e0ebb4c3 (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=8855308287f18b45d391dc9e022ffdd73282736f
commit 8855308287f18b45d391dc9e022ffdd73282736f
Merge: d1897e2 f774699
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 20 11:28:17 2013 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Jan 20 11:28:17 2013 -0500
Merge topic 'fix-COMPATIBLE_INTERFACE-properties' into next
f774699 Export the COMPATIBLE_INTERFACE_BOOL content properties
68d3d02 Clear the link information in ClearLinkMaps.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f774699f7004eb89816846c2e9bcf4ed4af11824
commit f774699f7004eb89816846c2e9bcf4ed4af11824
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 20 17:09:29 2013 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 20 17:21:05 2013 +0100
Export the COMPATIBLE_INTERFACE_BOOL content properties
diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx
index 61e130d..7147f86 100644
--- a/Source/cmExportBuildFileGenerator.cxx
+++ b/Source/cmExportBuildFileGenerator.cxx
@@ -74,6 +74,7 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
properties, missingTargets);
this->PopulateInterfaceProperty("INTERFACE_POSITION_INDEPENDENT_CODE",
te, properties);
+ this->PopulateCompatibleInterfaceProperties(te, properties);
this->GenerateInterfaceProperties(te, os, properties);
}
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 4a7c6f9..4547d73 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -21,6 +21,7 @@
#include "cmTarget.h"
#include "cmTargetExport.h"
#include "cmVersion.h"
+#include "cmComputeLinkInformation.h"
#include <cmsys/auto_ptr.hxx>
@@ -177,6 +178,75 @@ void cmExportFileGenerator::PopulateInterfaceProperty(const char *propName,
properties, missingTargets);
}
+
+//----------------------------------------------------------------------------
+void getPropertyContents(cmTarget *tgt, const char *prop,
+ std::set<std::string> &ifaceProperties)
+{
+ const char *p = tgt->GetProperty(prop);
+ if (!p)
+ {
+ return;
+ }
+ std::vector<std::string> content;
+ cmSystemTools::ExpandListArgument(p, content);
+ ifaceProperties.insert(content.begin(), content.end());
+}
+
+//----------------------------------------------------------------------------
+void getCompatibleInterfaceProperties(cmTarget *target,
+ std::set<std::string> &ifaceProperties,
+ const char *config)
+{
+ cmComputeLinkInformation *info = target->GetLinkInformation(config);
+
+ const cmComputeLinkInformation::ItemVector &deps = info->GetItems();
+
+ for(cmComputeLinkInformation::ItemVector::const_iterator li =
+ deps.begin();
+ li != deps.end(); ++li)
+ {
+ if (!li->Target)
+ {
+ continue;
+ }
+ getPropertyContents(li->Target,
+ "COMPATIBLE_INTERFACE_BOOL",
+ ifaceProperties);
+ }
+}
+
+//----------------------------------------------------------------------------
+void cmExportFileGenerator::PopulateCompatibleInterfaceProperties(
+ cmTarget *target,
+ ImportPropertyMap &properties)
+{
+ this->PopulateInterfaceProperty("COMPATIBLE_INTERFACE_BOOL",
+ target, properties);
+
+ std::set<std::string> ifaceProperties;
+
+ getPropertyContents(target, "COMPATIBLE_INTERFACE_BOOL", ifaceProperties);
+
+ getCompatibleInterfaceProperties(target, ifaceProperties, 0);
+
+ std::vector<std::string> configNames;
+ target->GetMakefile()->GetConfigurations(configNames);
+
+ for (std::vector<std::string>::const_iterator ci = configNames.begin();
+ ci != configNames.end(); ++ci)
+ {
+ getCompatibleInterfaceProperties(target, ifaceProperties, ci->c_str());
+ }
+
+ for (std::set<std::string>::const_iterator it = ifaceProperties.begin();
+ it != ifaceProperties.end(); ++it)
+ {
+ this->PopulateInterfaceProperty(("INTERFACE_" + *it).c_str(),
+ target, properties);
+ }
+}
+
//----------------------------------------------------------------------------
void cmExportFileGenerator::GenerateInterfaceProperties(cmTarget *target,
std::ostream& os,
diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h
index eb3f3c3..b39df0f 100644
--- a/Source/cmExportFileGenerator.h
+++ b/Source/cmExportFileGenerator.h
@@ -103,6 +103,8 @@ protected:
std::vector<std::string> &missingTargets);
void PopulateInterfaceProperty(const char *propName, cmTarget *target,
ImportPropertyMap &properties);
+ void PopulateCompatibleInterfaceProperties(cmTarget *target,
+ ImportPropertyMap &properties);
void GenerateInterfaceProperties(cmTarget *target, std::ostream& os,
const ImportPropertyMap &properties);
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index 965f63d..526a6be 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -91,6 +91,7 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
properties, missingTargets);
this->PopulateInterfaceProperty("INTERFACE_POSITION_INDEPENDENT_CODE",
te, properties);
+ this->PopulateCompatibleInterfaceProperties(te, properties);
this->GenerateInterfaceProperties(te, os, properties);
}
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index dd615d1..5992293 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -173,6 +173,15 @@ set_property(TARGET testSharedLibRequired APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}"
)
+set_property(TARGET testSharedLibRequired
+ APPEND PROPERTY
+ COMPATIBLE_INTERFACE_BOOL CUSTOM_PROP
+)
+set_property(TARGET testSharedLibRequired
+ PROPERTY
+ INTERFACE_CUSTOM_PROP ON
+)
+
add_library(testSharedLibDepends SHARED testSharedLibDepends.cpp)
set_property(TARGET testSharedLibDepends APPEND PROPERTY
diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt
index 83331cf..4df5771 100644
--- a/Tests/ExportImport/Import/A/CMakeLists.txt
+++ b/Tests/ExportImport/Import/A/CMakeLists.txt
@@ -169,6 +169,7 @@ target_compile_definitions(deps_shared_iface
PRIVATE
testSharedLibDepends
$<$<BOOL:$<TARGET_PROPERTY:POSITION_INDEPENDENT_CODE>>:PIC_PROPERTY_IS_ON>
+ $<$<BOOL:$<TARGET_PROPERTY:CUSTOM_PROP>>:CUSTOM_PROPERTY_IS_ON>
)
if (APPLE OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
@@ -199,4 +200,5 @@ target_include_directories(deps_shared_iface2 PRIVATE bld_testSharedLibDepends b
target_compile_definitions(deps_shared_iface2
PRIVATE bld_testSharedLibDepends TEST_SUBDIR_LIB
$<$<BOOL:$<TARGET_PROPERTY:POSITION_INDEPENDENT_CODE>>:PIC_PROPERTY_IS_ON>
+ $<$<BOOL:$<TARGET_PROPERTY:CUSTOM_PROP>>:CUSTOM_PROPERTY_IS_ON>
)
diff --git a/Tests/ExportImport/Import/A/deps_shared_iface.cpp b/Tests/ExportImport/Import/A/deps_shared_iface.cpp
index 8ed032e..a33f200 100644
--- a/Tests/ExportImport/Import/A/deps_shared_iface.cpp
+++ b/Tests/ExportImport/Import/A/deps_shared_iface.cpp
@@ -12,6 +12,10 @@
#error Expected PIC_PROPERTY_IS_ON
#endif
+#ifndef CUSTOM_PROPERTY_IS_ON
+#error Expected CUSTOM_PROPERTY_IS_ON
+#endif
+
#ifdef TEST_SUBDIR_LIB
#include "subdir.h"
#endif
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=68d3d02f74a390eee38884423e43fc316e7415d3
commit 68d3d02f74a390eee38884423e43fc316e7415d3
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 20 17:18:23 2013 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 20 17:21:05 2013 +0100
Clear the link information in ClearLinkMaps.
The cache here needs to be cleared if GetLinkInformation is called
at configure-time, such as during an export().
The next commit does exactly that, and without this patch,
the LinkLanguage test would fail.
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index c1c484b..8a39424 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1520,6 +1520,7 @@ void cmTarget::ClearLinkMaps()
this->Internal->LinkImplMap.clear();
this->Internal->LinkInterfaceMap.clear();
this->Internal->LinkClosureMap.clear();
+ this->LinkInformation.clear();
}
//----------------------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
Source/cmExportBuildFileGenerator.cxx | 1 +
Source/cmExportFileGenerator.cxx | 70 +++++++++++++++++++++
Source/cmExportFileGenerator.h | 2 +
Source/cmExportInstallFileGenerator.cxx | 1 +
Source/cmTarget.cxx | 1 +
Tests/ExportImport/Export/CMakeLists.txt | 9 +++
Tests/ExportImport/Import/A/CMakeLists.txt | 2 +
Tests/ExportImport/Import/A/deps_shared_iface.cpp | 4 +
8 files changed, 90 insertions(+), 0 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list