[Cmake-commits] CMake branch, master, updated. v3.14.0-rc3-322-gc2a3a94
Kitware Robot
kwrobot at kitware.com
Fri Mar 8 07:33:17 EST 2019
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, master has been updated
via c2a3a945a5d57dd6630ec0a51434f6e3bdc0e274 (commit)
via b7a861647ec5584e23d3730edddf18ad45a2e465 (commit)
via 4ca5a815f2dfe9e1116cc2ccd5ddb56d0d00d12e (commit)
via 47389c5641b821813f3f236bfbc179f52a2c95d7 (commit)
from b90cab5bff63902818cc3cc6268a7f96157c1381 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c2a3a945a5d57dd6630ec0a51434f6e3bdc0e274
commit c2a3a945a5d57dd6630ec0a51434f6e3bdc0e274
Merge: b7a8616 47389c5
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Mar 8 12:32:40 2019 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Mar 8 07:32:48 2019 -0500
Merge topic 'install-no-imported-global'
47389c5641 install: Do not crash on imported global target
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !3071
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b7a861647ec5584e23d3730edddf18ad45a2e465
commit b7a861647ec5584e23d3730edddf18ad45a2e465
Merge: b90cab5 4ca5a81
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Mar 8 12:31:28 2019 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Mar 8 07:31:36 2019 -0500
Merge topic 'cxx-checks-warning-match'
4ca5a815f2 C++ feature checks: Match warnings more strictly
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !3075
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ca5a815f2dfe9e1116cc2ccd5ddb56d0d00d12e
commit 4ca5a815f2dfe9e1116cc2ccd5ddb56d0d00d12e
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Mar 7 14:55:54 2019 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Mar 7 14:55:54 2019 -0500
C++ feature checks: Match warnings more strictly
Require the word "warning" to appear at the start of a line, after
whitespace, or after a `:`. This is the same that CTest launchers use
to match warnings. It avoids matching "warning" inside file paths.
Fixes: #19019
diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake
index d941c16..fb68ed7 100644
--- a/Source/Checks/cm_cxx_features.cmake
+++ b/Source/Checks/cm_cxx_features.cmake
@@ -27,7 +27,7 @@ function(cm_check_cxx_feature name)
# Filter out xcodebuild warnings.
string(REGEX REPLACE "[^\n]* xcodebuild\\[[0-9]*:[0-9]*\\] warning: [^\n]*" "" check_output "${check_output}")
# If using the feature causes warnings, treat it as broken/unavailable.
- if(check_output MATCHES "[Ww]arning")
+ if(check_output MATCHES "(^|[ :])[Ww][Aa][Rr][Nn][Ii][Nn][Gg]")
set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE)
endif()
if(CMake_HAVE_CXX_${FEATURE})
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=47389c5641b821813f3f236bfbc179f52a2c95d7
commit 47389c5641b821813f3f236bfbc179f52a2c95d7
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Mar 7 08:52:18 2019 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Mar 7 09:00:56 2019 -0500
install: Do not crash on imported global target
Since commit e89ad0f94e (install: Allow installing targets created in
another directory, 2018-06-18, v3.13.0-rc1~407^2) the `install(TARGETS)`
command may find a global-scoped target outside the calling directory.
Ignore an `IMPORTED GLOBAL` target if it is found in this way. Imported
targets cannot be installed, and trying to do so violates internal
invariants.
Fixes: #19022
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index 8ef6441..20d1a31 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -402,7 +402,11 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
cmTarget* target = this->Makefile->FindLocalNonAliasTarget(tgt);
if (!target) {
// If no local target has been found, find it in the global scope.
- target = this->Makefile->GetGlobalGenerator()->FindTarget(tgt, true);
+ cmTarget* const global_target =
+ this->Makefile->GetGlobalGenerator()->FindTarget(tgt, true);
+ if (global_target && !global_target->IsImported()) {
+ target = global_target;
+ }
}
if (target) {
// Found the target. Check its type.
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake
index 28e8ec4..c637db1 100644
--- a/Tests/RunCMake/install/RunCMakeTest.cmake
+++ b/Tests/RunCMake/install/RunCMakeTest.cmake
@@ -66,6 +66,7 @@ run_cmake(CMP0062-WARN)
run_cmake(CMP0087-OLD)
run_cmake(CMP0087-NEW)
run_cmake(CMP0087-WARN)
+run_cmake(TARGETS-ImportedGlobal)
run_cmake(TARGETS-NAMELINK_COMPONENT-bad-all)
run_cmake(TARGETS-NAMELINK_COMPONENT-bad-exc)
run_cmake(FILES-DESTINATION-TYPE)
diff --git a/Tests/RunCMake/install/TARGETS-ImportedGlobal-result.txt b/Tests/RunCMake/install/TARGETS-ImportedGlobal-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-ImportedGlobal-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/install/TARGETS-ImportedGlobal-stderr.txt b/Tests/RunCMake/install/TARGETS-ImportedGlobal-stderr.txt
new file mode 100644
index 0000000..d67802b
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-ImportedGlobal-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at TARGETS-ImportedGlobal.cmake:[0-9]+ \(install\):
+ install TARGETS given target "imported_global" which does not exist.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/install/TARGETS-ImportedGlobal.cmake b/Tests/RunCMake/install/TARGETS-ImportedGlobal.cmake
new file mode 100644
index 0000000..08c20bd
--- /dev/null
+++ b/Tests/RunCMake/install/TARGETS-ImportedGlobal.cmake
@@ -0,0 +1,3 @@
+add_library(imported_global STATIC IMPORTED GLOBAL)
+set_property(TARGET imported_global PROPERTY IMPORTED_LOCATION /does_not_exist)
+install(TARGETS imported_global DESTINATION bin)
-----------------------------------------------------------------------
Summary of changes:
Source/Checks/cm_cxx_features.cmake | 2 +-
Source/cmInstallCommand.cxx | 6 +++++-
Tests/RunCMake/install/RunCMakeTest.cmake | 1 +
.../TARGETS-ImportedGlobal-result.txt} | 0
Tests/RunCMake/install/TARGETS-ImportedGlobal-stderr.txt | 4 ++++
Tests/RunCMake/install/TARGETS-ImportedGlobal.cmake | 3 +++
6 files changed, 14 insertions(+), 2 deletions(-)
copy Tests/RunCMake/{while/MissingArgument-result.txt => install/TARGETS-ImportedGlobal-result.txt} (100%)
create mode 100644 Tests/RunCMake/install/TARGETS-ImportedGlobal-stderr.txt
create mode 100644 Tests/RunCMake/install/TARGETS-ImportedGlobal.cmake
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list