[Cmake-commits] CMake branch, next, updated. v3.5.0-rc1-33-g405dcbb

Brad King brad.king at kitware.com
Fri Feb 5 09:46:33 EST 2016


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  405dcbb37c9a442a92d5df52f6f6ecf387cd7cb7 (commit)
       via  47460f3e152a59af81edd816cdfe6e0d54e38090 (commit)
       via  e86383e135e4cae9d54575445d945df1f6272b3a (commit)
      from  09bc2bc7260d7fcc1767da7de6e7b063628e03c3 (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=405dcbb37c9a442a92d5df52f6f6ecf387cd7cb7
commit 405dcbb37c9a442a92d5df52f6f6ecf387cd7cb7
Merge: 09bc2bc 47460f3
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Feb 5 09:46:32 2016 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Feb 5 09:46:32 2016 -0500

    Merge topic 'fix-install-EXPORT-crash' into next
    
    47460f3e install(EXPORT): Fix crash on target in another directory
    e86383e1 Tests: Use newer policy settings in RunCMake.install test


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=47460f3e152a59af81edd816cdfe6e0d54e38090
commit 47460f3e152a59af81edd816cdfe6e0d54e38090
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Feb 4 11:45:54 2016 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Feb 5 09:45:16 2016 -0500

    install(EXPORT): Fix crash on target in another directory
    
    Refactoring merged by commit v3.5.0-rc1~299 (Merge topic
    'use-generator-target', 2015-10-20) in and around
    commit v3.5.0-rc1~299^2~13 (cmExportSet: Store a cmGeneratorTarget,
    2015-10-17) changed export sets to delay looking up actual targets and
    stores only their names.  However, in InstallCommand::HandleExportMode
    we need to lookup targets immediately to check them for
    EXPORT_LINK_INTERFACE_LIBRARIES.  The check was accidentally made local
    to the current directory, so if an export set contains a target from
    another directory the lookup fails and CMake crashes.  Fix the check to
    look up the target name globally, and tolerate when no target is found
    just in case.
    
    Reported-by: Kelly Thompson <kgt at lanl.gov>

diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index 15a83ee..2d78a41 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -1374,10 +1374,12 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
         tei != exportSet->GetTargetExports()->end(); ++tei)
       {
       cmTargetExport const* te = *tei;
-      cmTarget* tgt = this->Makefile->FindTarget(te->TargetName);
+      cmTarget* tgt =
+        this->Makefile->GetGlobalGenerator()->FindTarget(te->TargetName);
       const bool newCMP0022Behavior =
-                      tgt->GetPolicyStatusCMP0022() != cmPolicies::WARN
-                   && tgt->GetPolicyStatusCMP0022() != cmPolicies::OLD;
+        (tgt &&
+         tgt->GetPolicyStatusCMP0022() != cmPolicies::WARN &&
+         tgt->GetPolicyStatusCMP0022() != cmPolicies::OLD);
 
       if(!newCMP0022Behavior)
         {
diff --git a/Tests/RunCMake/install/EXPORT-OldIFace.cmake b/Tests/RunCMake/install/EXPORT-OldIFace.cmake
new file mode 100644
index 0000000..8dfb46b
--- /dev/null
+++ b/Tests/RunCMake/install/EXPORT-OldIFace.cmake
@@ -0,0 +1,6 @@
+enable_language(C)
+add_subdirectory(EXPORT-OldIFace)
+add_library(foo SHARED empty.c)
+target_link_libraries(foo bar)
+install(TARGETS foo DESTINATION lib EXPORT fooExport)
+install(EXPORT fooExport DESTINATION lib/cmake/foo EXPORT_LINK_INTERFACE_LIBRARIES)
diff --git a/Tests/RunCMake/install/EXPORT-OldIFace/CMakeLists.txt b/Tests/RunCMake/install/EXPORT-OldIFace/CMakeLists.txt
new file mode 100644
index 0000000..32292e2
--- /dev/null
+++ b/Tests/RunCMake/install/EXPORT-OldIFace/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_library(bar SHARED ../empty.c)
+install(TARGETS bar DESTINATION lib EXPORT fooExport)
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake
index 2c1b29d..c2347d8 100644
--- a/Tests/RunCMake/install/RunCMakeTest.cmake
+++ b/Tests/RunCMake/install/RunCMakeTest.cmake
@@ -10,6 +10,7 @@ run_cmake(DIRECTORY-DIRECTORY-bad)
 run_cmake(DIRECTORY-DESTINATION-bad)
 run_cmake(FILES-DESTINATION-bad)
 run_cmake(TARGETS-DESTINATION-bad)
+run_cmake(EXPORT-OldIFace)
 run_cmake(CMP0062-OLD)
 run_cmake(CMP0062-NEW)
 run_cmake(CMP0062-WARN)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e86383e135e4cae9d54575445d945df1f6272b3a
commit e86383e135e4cae9d54575445d945df1f6272b3a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Feb 5 09:40:13 2016 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Feb 5 09:44:26 2016 -0500

    Tests: Use newer policy settings in RunCMake.install test
    
    In particular, avoid CMP0042 warnings on OS X.

diff --git a/Tests/RunCMake/install/CMP0062-NEW.cmake b/Tests/RunCMake/install/CMP0062-NEW.cmake
index a696f56..9e7a5fb 100644
--- a/Tests/RunCMake/install/CMP0062-NEW.cmake
+++ b/Tests/RunCMake/install/CMP0062-NEW.cmake
@@ -1,4 +1,4 @@
-
+cmake_policy(VERSION 3.2)
 cmake_policy(SET CMP0062 NEW)
 
 add_library(iface INTERFACE)
diff --git a/Tests/RunCMake/install/CMP0062-OLD.cmake b/Tests/RunCMake/install/CMP0062-OLD.cmake
index 94b809a..8874923 100644
--- a/Tests/RunCMake/install/CMP0062-OLD.cmake
+++ b/Tests/RunCMake/install/CMP0062-OLD.cmake
@@ -1,4 +1,4 @@
-
+cmake_policy(VERSION 3.2)
 cmake_policy(SET CMP0062 OLD)
 
 add_library(iface INTERFACE)
diff --git a/Tests/RunCMake/install/CMP0062-WARN.cmake b/Tests/RunCMake/install/CMP0062-WARN.cmake
index 0435a64..018f822 100644
--- a/Tests/RunCMake/install/CMP0062-WARN.cmake
+++ b/Tests/RunCMake/install/CMP0062-WARN.cmake
@@ -1,3 +1,4 @@
+cmake_policy(VERSION 3.2)
 
 add_library(iface INTERFACE)
 export(TARGETS iface FILE "${CMAKE_CURRENT_BINARY_DIR}/exported.cmake")
diff --git a/Tests/RunCMake/install/CMakeLists.txt b/Tests/RunCMake/install/CMakeLists.txt
index 4b3de84..6dd8cdf 100644
--- a/Tests/RunCMake/install/CMakeLists.txt
+++ b/Tests/RunCMake/install/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.4)
 project(${RunCMake_TEST} NONE)
 include(${RunCMake_TEST}.cmake)

-----------------------------------------------------------------------

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list