[Cmake-commits] CMake branch, next, updated. v3.1.0-rc3-1094-g9a6d379
Stephen Kelly
steveire at gmail.com
Mon Dec 8 14:49:43 EST 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 9a6d37950af7a360578102c7d26d93c827e32d4d (commit)
via d8b6a60f55755da95774d796a7712d3e87056e43 (commit)
via a8edbcaec860a4405bb274a089e313f52236959c (commit)
via c8645a323f11242bf71a0c8c99750315721c1d70 (commit)
from 82cc543238b2b5735ccbfa6938d98a14634cad19 (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=9a6d37950af7a360578102c7d26d93c827e32d4d
commit 9a6d37950af7a360578102c7d26d93c827e32d4d
Merge: 82cc543 d8b6a60
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Dec 8 14:49:42 2014 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Dec 8 14:49:42 2014 -0500
Merge topic 'diagnose-invalid-_IMPORT_PREFIX-generation' into next
d8b6a60f fixup! Export: Issue error if generating unusable export file (#15258).
a8edbcae fixup! Export: Issue error if generating unusable export file (#15258).
c8645a32 fixup! Export: Diagnose issues in INCLUDES DESTINATION while
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d8b6a60f55755da95774d796a7712d3e87056e43
commit d8b6a60f55755da95774d796a7712d3e87056e43
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Dec 8 20:19:24 2014 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Dec 8 20:48:28 2014 +0100
fixup! Export: Issue error if generating unusable export file (#15258).
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index ebe5b85..9b1754f 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -346,12 +346,24 @@ cmExportInstallFileGenerator::ReplaceInstallPrefix(cmTarget* target,
if (input.find("${_IMPORT_PREFIX}") != std::string::npos
&& this->ImportPrefix.empty())
{
- if (!checkCMP0057(target, propName, input, this->IEGen->GetExportSet()))
+ std::string userFacingInput = input;
+ while((pos = userFacingInput.find("${_IMPORT_PREFIX}/", lastPos))
+ != userFacingInput.npos)
+ {
+ std::string::size_type endPos = pos + sizeof("${_IMPORT_PREFIX}/") - 1;
+ userFacingInput.erase(pos, endPos - pos);
+ lastPos = endPos;
+ }
+
+ if (!checkCMP0057(target, propName, userFacingInput, this->IEGen->GetExportSet()))
{
return;
}
}
+ pos = 0;
+ lastPos = pos;
+
while((pos = input.find("$<INSTALL_PREFIX>", lastPos)) != input.npos)
{
if (this->ImportPrefix.empty())
diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt
index 0084903..a11f06a 100644
--- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt
+++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-NEW-stderr.txt
@@ -2,7 +2,7 @@ CMake Error in CMakeLists.txt:
Target "somelib" is installed with a path relative to the installation
prefix
- "\${_IMPORT_PREFIX}/include"
+ "include"
in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of
export set "exp" which is installed with an absolute path as its
diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt
index 9cad673..32cc756 100644
--- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt
+++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-OLD-stderr.txt
@@ -2,7 +2,7 @@ CMake Warning \(dev\) in CMakeLists.txt:
Target "somelib" is installed with a path relative to the installation
prefix
- "\${_IMPORT_PREFIX}/include"
+ "include"
in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of
export set "exp" which is installed with an absolute path as its
diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt
index 2d2dc5b..1c2acb5 100644
--- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt
+++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt
@@ -6,7 +6,7 @@ CMake Warning \(dev\) in CMakeLists.txt:
Target "somelib" is installed with a path relative to the installation
prefix
- "\${_IMPORT_PREFIX}/include"
+ "include"
in its INTERFACE_INCLUDE_DIRECTORIES property. The target is part of
export set "exp" which is installed with an absolute path as its
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a8edbcaec860a4405bb274a089e313f52236959c
commit a8edbcaec860a4405bb274a089e313f52236959c
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Dec 8 20:15:50 2014 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Dec 8 20:48:26 2014 +0100
fixup! Export: Issue error if generating unusable export file (#15258).
diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt
index 1426fff..a5ece0d 100644
--- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt
+++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt
@@ -1,7 +1,7 @@
CMake Warning \(dev\) in CMakeLists.txt:
- Policy CMP0057 is not set: Error on export with bad INCLUDES DESTINATION.
- Run "cmake --help-policy CMP0057" for policy details. Use the cmake_policy
- command to set the policy and suppress this warning.
+ Policy CMP0057 is not set: Error on absolute export with relative usage
+ requirements. Run "cmake --help-policy CMP0057" for policy details. Use
+ the cmake_policy command to set the policy and suppress this warning.
Target "somelib" is installed with a path relative to the installation
prefix
diff --git a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt
index e0b4627..2d2dc5b 100644
--- a/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt
+++ b/Tests/RunCMake/export/RelativeIncludeDirectory-CMP0057-WARN-stderr.txt
@@ -1,7 +1,7 @@
CMake Warning \(dev\) in CMakeLists.txt:
- Policy CMP0057 is not set: Error on export with bad INCLUDES DESTINATION.
- Run "cmake --help-policy CMP0057" for policy details. Use the cmake_policy
- command to set the policy and suppress this warning.
+ Policy CMP0057 is not set: Error on absolute export with relative usage
+ requirements. Run "cmake --help-policy CMP0057" for policy details. Use
+ the cmake_policy command to set the policy and suppress this warning.
Target "somelib" is installed with a path relative to the installation
prefix
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8645a323f11242bf71a0c8c99750315721c1d70
commit c8645a323f11242bf71a0c8c99750315721c1d70
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Dec 8 20:02:01 2014 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Dec 8 20:47:41 2014 +0100
fixup! Export: Diagnose issues in INCLUDES DESTINATION while
diff --git a/Help/policy/CMP0057.rst b/Help/policy/CMP0057.rst
index 5a790b0..ddd2bf1 100644
--- a/Help/policy/CMP0057.rst
+++ b/Help/policy/CMP0057.rst
@@ -1,7 +1,7 @@
CMP0057
-------
-Error on export with bad INCLUDES DESTINATION.
+Error on absolute export with relative usage requirements.
CMake 3.1 and lower generated unusable files with the
:command:`install(EXPORT)` command if an absolute ``DESTINATION`` was used
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 8110f6e..d3061f3 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -377,7 +377,7 @@ cmPolicies::cmPolicies()
this->DefinePolicy(
CMP0057, "CMP0057",
- "Error on export with bad INCLUDES DESTINATION.",
+ "Error on absolute export with relative usage requirements.",
3,2,0, cmPolicies::WARN);
}
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 26c351f..c3866bd 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -112,7 +112,7 @@ public:
/// or keywords when unquoted.
CMP0055, ///< Strict checking for break() command.
CMP0056, ///< Honor link flags in try_compile() source-file signature.
- CMP0057, ///< Error on export with bad INCLUDES DESTINATION.
+ CMP0057, ///< Error on absolute export with relative usage requirements.
/** \brief Always the last entry.
*
diff --git a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-stderr.txt b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-stderr.txt
index fd9a743..c8e413c 100644
--- a/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-stderr.txt
+++ b/Tests/RunCMake/export/RelativeIncludeDestination-CMP0057-WARN-stderr.txt
@@ -1,7 +1,7 @@
CMake Warning \(dev\) in CMakeLists.txt:
- Policy CMP0057 is not set: Error on export with bad INCLUDES DESTINATION.
- Run "cmake --help-policy CMP0057" for policy details. Use the cmake_policy
- command to set the policy and suppress this warning.
+ Policy CMP0057 is not set: Error on absolute export with relative usage
+ requirements. Run "cmake --help-policy CMP0057" for policy details. Use
+ the cmake_policy command to set the policy and suppress this warning.
Target "somelib" is installed as part of export set "exp" with an INCLUDES
DESTINATION containing relative path
-----------------------------------------------------------------------
Summary of changes:
Help/policy/CMP0057.rst | 2 +-
Source/cmExportInstallFileGenerator.cxx | 14 +++++++++++++-
Source/cmPolicies.cxx | 2 +-
Source/cmPolicies.h | 2 +-
.../RelativeIncludeDestination-CMP0057-WARN-stderr.txt | 6 +++---
...cludeDirectory-CMP0057-INSTALL_PREFIX-WARN-stderr.txt | 6 +++---
.../RelativeIncludeDirectory-CMP0057-NEW-stderr.txt | 2 +-
.../RelativeIncludeDirectory-CMP0057-OLD-stderr.txt | 2 +-
.../RelativeIncludeDirectory-CMP0057-WARN-stderr.txt | 8 ++++----
9 files changed, 28 insertions(+), 16 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list