[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1147-ga6cb4b3
Stephen Kelly
steveire at gmail.com
Fri Nov 30 10:05:44 EST 2012
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 a6cb4b32e30afe07206efa8544b7ed014b91865e (commit)
via 42c1669cb5901d47a8a7606c984d7f15d03aac93 (commit)
from 5cd0db5e541e7887c76b3c4957249ff8a7e3c22c (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=a6cb4b32e30afe07206efa8544b7ed014b91865e
commit a6cb4b32e30afe07206efa8544b7ed014b91865e
Merge: 5cd0db5 42c1669
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Nov 30 10:05:43 2012 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Nov 30 10:05:43 2012 -0500
Merge topic 'add-INTERFACE_LINK_LIBRARIES-property' into next
42c1669 Simplify logic of CMP0019.
diff --cc Source/cmDocumentGeneratorExpressions.h
index 4866f0d,2899e05..8e57659
--- a/Source/cmDocumentGeneratorExpressions.h
+++ b/Source/cmDocumentGeneratorExpressions.h
@@@ -26,8 -26,16 +26,17 @@@
"strings which contain a '>' for example.\n" \
" $<COMMA> = A literal ','. Used to compare " \
"strings which contain a ',' for example.\n" \
+ " $<INSTALL_INTERFACE:...> = content of \"...\" when the property " \
+ "is exported using install(EXPORT), and empty otherwise.\n" \
+ " $<BUILD_INTERFACE:...> = content of \"...\" when the property " \
+ "is exported using export(), or when the target is used by another " \
+ "target in the same buildsystem. Expands to the empty string " \
+ "otherwise.\n" \
+ " $<EXPORT_NAMESPACE> = The namespace used in an invokation " \
+ "of export() or install(EXPORT). Expands to empty in other " \
+ "contexts.\n" \
" $<TARGET_FILE:tgt> = main file (.exe, .so.1.2, .a)\n" \
+ " $<TARGET_DEFINED:tgt> = '1' if tgt is a target, else '0'\n" \
" $<TARGET_LINKER_FILE:tgt> = file used to link (.a, .lib, .so)\n" \
" $<TARGET_SONAME_FILE:tgt> = file with soname (.so.3)\n" \
"where \"tgt\" is the name of a target. " \
diff --cc Source/cmPolicies.cxx
index 13e36c8,d9bd803..3099021
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@@ -505,29 -507,14 +507,31 @@@ cmPolicies::cmPolicies(
"\n"
"The OLD behavior for this policy is to ignore the "
"INTERFACE_LINK_LIBRARIES property for all targets and use the "
- "value of (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? instead."
+ "value of the appropriate property matching "
+ "(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? instead."
"\n"
"The NEW behavior for this policy is to ignore "
- "the value of the (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? target "
- "property",
+ "the value of the property matching "
+ "(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? and use "
+ "INTERFACE_LINK_LIBRARIES instead.",
2,8,11,0, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0020, "CMP0020",
+ "Use INCLUDE_DIRECTORIES order implied by target_link_libraries.",
+ "CMake 2.8.11 introduced a feature where using target_link_libraries "
+ "can read the INTERFACE_INCLUDE_DIRECTORIES property of a target and "
+ "use the value as include directories when compiling. Because the "
+ "target_link_libraries call might occur before the include_directories "
+ "call, this could change the order of includes in the compile step."
+ "\n"
+ "The OLD behavior for this policy is to let the include_directories call "
+ "determine the order of includes."
+ "\n"
+ "The NEW behavior for this policy is to use the order of includes "
+ "determined by the order of all calls to target_link_libraries and "
+ "include_directories",
+ 2,8,11,0, cmPolicies::WARN);
}
cmPolicies::~cmPolicies()
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=42c1669cb5901d47a8a7606c984d7f15d03aac93
commit 42c1669cb5901d47a8a7606c984d7f15d03aac93
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Nov 29 22:00:51 2012 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Nov 30 15:18:05 2012 +0100
Simplify logic of CMP0019.
It only needs to warn in cmTarget::ComputeLinkInterface because
cmTarget::ComputeImportInfo relates to the consumer of IMPORTED
targets, and should use the policy as set by the consumer.
diff --git a/Source/cmDocumentGeneratorExpressions.h b/Source/cmDocumentGeneratorExpressions.h
index 445fd0e..2899e05 100644
--- a/Source/cmDocumentGeneratorExpressions.h
+++ b/Source/cmDocumentGeneratorExpressions.h
@@ -26,6 +26,15 @@
"strings which contain a '>' for example.\n" \
" $<COMMA> = A literal ','. Used to compare " \
"strings which contain a ',' for example.\n" \
+ " $<INSTALL_INTERFACE:...> = content of \"...\" when the property " \
+ "is exported using install(EXPORT), and empty otherwise.\n" \
+ " $<BUILD_INTERFACE:...> = content of \"...\" when the property " \
+ "is exported using export(), or when the target is used by another " \
+ "target in the same buildsystem. Expands to the empty string " \
+ "otherwise.\n" \
+ " $<EXPORT_NAMESPACE> = The namespace used in an invokation " \
+ "of export() or install(EXPORT). Expands to empty in other " \
+ "contexts.\n" \
" $<TARGET_FILE:tgt> = main file (.exe, .so.1.2, .a)\n" \
" $<TARGET_LINKER_FILE:tgt> = file used to link (.a, .lib, .so)\n" \
" $<TARGET_SONAME_FILE:tgt> = file with soname (.so.3)\n" \
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index 55d70f8..2502b92 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -1397,6 +1397,14 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
false,
"Variables that Control the Build");
cm->DefineProperty
+ ("CMAKE_INTERFACE_LINK_LIBRARIES", cmProperty::VARIABLE,
+ "Default value for INTERFACE_LINK_LIBRARIES of targets.",
+ "This variable is used to initialize the "
+ "INTERFACE_LINK_LIBRARIES property on all the targets. "
+ "See that target property for additional information.",
+ false,
+ "Variables that Control the Build");
+ cm->DefineProperty
("CMAKE_WIN32_EXECUTABLE", cmProperty::VARIABLE,
"Default value for WIN32_EXECUTABLE of targets.",
"This variable is used to initialize the "
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 4c89dd6..d9bd803 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -494,22 +494,26 @@ cmPolicies::cmPolicies()
this->DefinePolicy(
CMP0019, "CMP0019",
- "Use INTERFACE_LINK_LIBRARIES instead of LINK_INTERFACE_LIBRARIES.",
- "CMake 2.8.10 used the (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? "
- "properties to determine the link interface. CMake 2.8.11 and higher "
+ "Use INTERFACE_LINK_LIBRARIES instead of "
+ "LINK_INTERFACE_LIBRARIES_<CONFIG>.",
+ "CMake 2.8.10 used properties matching "
+ "(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? "
+ "to determine the link interface. CMake 2.8.11 and higher "
"prefer instead to use the INTERFACE_LINK_LIBRARIES target property to "
- "determine the link interface, while ignoring "
+ "determine the link interface, while ignoring properties matching"
"(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? completely. The new "
"INTERFACE_LINK_LIBRARIES target property can use generator expressions "
"to specify config-specific link libraries."
"\n"
"The OLD behavior for this policy is to ignore the "
"INTERFACE_LINK_LIBRARIES property for all targets and use the "
- "value of (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? instead."
+ "value of the appropriate property matching "
+ "(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? instead."
"\n"
"The NEW behavior for this policy is to ignore "
- "the value of the (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? target "
- "property",
+ "the value of the property matching "
+ "(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? and use "
+ "INTERFACE_LINK_LIBRARIES instead.",
2,8,11,0, cmPolicies::WARN);
}
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 59b8f0a..50f74b9 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -373,7 +373,7 @@ void cmTarget::DefineProperties(cmake *cm)
"imported library. "
"The list "
"should be disjoint from the list of interface libraries in the "
- "IMPORTED_LINK_INTERFACE_LIBRARIES property. On platforms requiring "
+ "INTERFACE_LINK_LIBRARIES property. On platforms requiring "
"dependent shared libraries to be found at link time CMake uses this "
"list to add appropriate files or paths to the link command line. "
"Ignored for non-imported targets.");
@@ -394,7 +394,9 @@ void cmTarget::DefineProperties(cmake *cm)
"The libraries will be included on the link line for the target. "
"Unlike the LINK_INTERFACE_LIBRARIES property, this property applies "
"to all imported target types, including STATIC libraries. "
- "This property is ignored for non-imported targets.");
+ "This property is ignored for non-imported targets.\n"
+ "This property is deprecated. Use INTERFACE_LINK_LIBRARIES instead."
+ );
cm->DefineProperty
("IMPORTED_LINK_INTERFACE_LIBRARIES_<CONFIG>", cmProperty::TARGET,
@@ -402,7 +404,8 @@ void cmTarget::DefineProperties(cmake *cm)
"Configuration names correspond to those provided by the project "
"from which the target is imported. "
"If set, this property completely overrides the generic property "
- "for the named configuration.");
+ "for the named configuration."
+ "This property is deprecated. Use INTERFACE_LINK_LIBRARIES instead.");
cm->DefineProperty
("IMPORTED_LINK_INTERFACE_LANGUAGES", cmProperty::TARGET,
@@ -702,7 +705,8 @@ void cmTarget::DefineProperties(cmake *cm)
"This property is initialized by the value of the variable "
"CMAKE_LINK_INTERFACE_LIBRARIES if it is set when a target is "
"created. "
- "This property is ignored for STATIC libraries.");
+ "This property is ignored for STATIC libraries."
+ "This property is deprecated. Use INTERFACE_LINK_LIBRARIES instead.");
cm->DefineProperty
("LINK_INTERFACE_LIBRARIES_<CONFIG>", cmProperty::TARGET,
@@ -710,7 +714,29 @@ void cmTarget::DefineProperties(cmake *cm)
"This is the configuration-specific version of "
"LINK_INTERFACE_LIBRARIES. "
"If set, this property completely overrides the generic property "
- "for the named configuration.");
+ "for the named configuration."
+ "This property is deprecated. Use INTERFACE_LINK_LIBRARIES instead.");
+
+ cm->DefineProperty
+ ("INTERFACE_LINK_LIBRARIES", cmProperty::TARGET,
+ "List public interface libraries for a shared library or executable.",
+ "By default linking to a shared library target transitively "
+ "links to targets with which the library itself was linked. "
+ "For an executable with exports (see the ENABLE_EXPORTS property) "
+ "no default transitive link dependencies are used. "
+ "This property replaces the default transitive link dependencies with "
+ "an explicit list. "
+ "When the target is linked into another target the libraries "
+ "listed (and recursively their link interface libraries) will be "
+ "provided to the other target also. "
+ "If the list is empty then no transitive link dependencies will be "
+ "incorporated when this target is linked into another target even if "
+ "the default set is non-empty. "
+ "This property is initialized by the value of the variable "
+ "CMAKE_INTERFACE_LINK_LIBRARIES if it is set when a target is "
+ "created. "
+ "This property is ignored for STATIC libraries."
+ CM_DOCUMENT_COMMAND_GENERATOR_EXPRESSIONS);
cm->DefineProperty
("LINK_INTERFACE_MULTIPLICITY", cmProperty::TARGET,
@@ -1350,6 +1376,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
this->SetPropertyDefault("AUTOMOC_MOC_OPTIONS", 0);
this->SetPropertyDefault("LINK_DEPENDS_NO_SHARED", 0);
this->SetPropertyDefault("LINK_INTERFACE_LIBRARIES", 0);
+ this->SetPropertyDefault("INTERFACE_LINK_LIBRARIES", 0);
this->SetPropertyDefault("WIN32_EXECUTABLE", 0);
this->SetPropertyDefault("MACOSX_BUNDLE", 0);
@@ -4467,8 +4494,10 @@ void cmTarget::ComputeImportInfo(std::string const& desired_config,
// Get the link interface.
{
- std::vector<std::string> newInterfaceLibs;
- const char* newStyleLibsProp = this->GetProperty("INTERFACE_LINK_LIBRARIES");
+ std::vector<std::string> usedLinkLibraries;
+
+ const char* newStyleLibsProp = this->GetProperty(
+ "INTERFACE_LINK_LIBRARIES");
if(newStyleLibsProp)
{
cmListFileBacktrace lfbt;
@@ -4483,57 +4512,25 @@ void cmTarget::ComputeImportInfo(std::string const& desired_config,
false,
this,
&dagChecker),
- newInterfaceLibs);
- }
-
- std::string linkProp = "IMPORTED_LINK_INTERFACE_LIBRARIES";
- std::vector<std::string> oldInterfaceLibs;
- const char *oldProp = this->GetProperty((linkProp + suffix).c_str());
- if(oldProp)
- {
- linkProp += suffix;
- cmSystemTools::ExpandListArgument(oldProp,
- oldInterfaceLibs);
+ usedLinkLibraries);
}
else
{
- oldProp = this->GetProperty("IMPORTED_LINK_INTERFACE_LIBRARIES");
+ std::string linkProp = "IMPORTED_LINK_INTERFACE_LIBRARIES";
+ const char *oldProp = this->GetProperty((linkProp + suffix).c_str());
if(oldProp)
{
- cmSystemTools::ExpandListArgument(oldProp,
- oldInterfaceLibs);
+ linkProp += suffix;
+ cmSystemTools::ExpandListArgument(oldProp, usedLinkLibraries);
}
- }
-
- std::vector<std::string> usedLinkLibraries;
- switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0019))
- {
- case cmPolicies::WARN:
+ else
{
- if (newStyleLibsProp && oldProp
- && !handleCMP0019(newInterfaceLibs, oldInterfaceLibs))
+ oldProp = this->GetProperty("IMPORTED_LINK_INTERFACE_LIBRARIES");
+ if(oldProp)
{
- cmOStringStream e;
- e << "The " << linkProp << " and "
- "LINK_INTERFACE_LIBRARIES are not the same for target \""
- << this->GetName() << "\". NEW content is \""
- << (newStyleLibsProp ? newStyleLibsProp : "(unset)") << "\"\n"
- "OLD content is \""
- << (oldProp ? oldProp : "(unset)") << "\"\n"
- << this->Makefile->GetPolicies()->GetPolicyWarning(
- cmPolicies::CMP0019);
- this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, e.str());
+ cmSystemTools::ExpandListArgument(oldProp, usedLinkLibraries);
}
- // fall through to OLD behaviour
}
- case cmPolicies::OLD:
- usedLinkLibraries = oldInterfaceLibs;
- break;
- case cmPolicies::REQUIRED_IF_USED:
- case cmPolicies::REQUIRED_ALWAYS:
- case cmPolicies::NEW:
- default:
- usedLinkLibraries = newInterfaceLibs;
}
info.LinkInterface.Libraries.insert(info.LinkInterface.Libraries.end(),
usedLinkLibraries.begin(), usedLinkLibraries.end());
@@ -4689,7 +4686,7 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface)
}
{
- switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0019))
+ switch (this->PolicyStatusCMP0019)
{
case cmPolicies::WARN:
{
-----------------------------------------------------------------------
Summary of changes:
Source/cmDocumentGeneratorExpressions.h | 9 +++
Source/cmDocumentVariables.cxx | 8 +++
Source/cmPolicies.cxx | 18 ++++--
Source/cmTarget.cxx | 95 +++++++++++++++----------------
4 files changed, 74 insertions(+), 56 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list