[Cmake-commits] CMake branch, next, updated. v2.8.12-4804-g1acf71f

Brad King brad.king at kitware.com
Sat Nov 2 15:03:02 EDT 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  1acf71f292cdf14bcf1d9b7ed5441f15bf4cc8b9 (commit)
       via  e9f353ae5e69d045b2b077b0539e62fe0736a9c9 (commit)
       via  23d21b78e125c11a0d901eb987e5f616026ff8fd (commit)
      from  790c352f16625de9de52d8428f5dbceaaa8bf743 (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=1acf71f292cdf14bcf1d9b7ed5441f15bf4cc8b9
commit 1acf71f292cdf14bcf1d9b7ed5441f15bf4cc8b9
Merge: 790c352 e9f353a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Sat Nov 2 15:03:00 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Nov 2 15:03:00 2013 -0400

    Merge topic 'policy-CMP0022-fixes-for-master' into next
    
    e9f353a Merge branch 'policy-CMP0022-fixes' into policy-CMP0022-fixes-for-master
    23d21b7 Do not export INTERFACE_LINK_LIBRARIES from non-linkable targets


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e9f353ae5e69d045b2b077b0539e62fe0736a9c9
commit e9f353ae5e69d045b2b077b0539e62fe0736a9c9
Merge: 7d706e4 23d21b7
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Sat Nov 2 14:58:19 2013 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Sat Nov 2 14:58:19 2013 -0400

    Merge branch 'policy-CMP0022-fixes' into policy-CMP0022-fixes-for-master


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=23d21b78e125c11a0d901eb987e5f616026ff8fd
commit 23d21b78e125c11a0d901eb987e5f616026ff8fd
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Sat Nov 2 14:49:49 2013 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Sat Nov 2 14:51:07 2013 -0400

    Do not export INTERFACE_LINK_LIBRARIES from non-linkable targets
    
    When cmExportFileGenerator::SetImportLinkInterface exports the old
    LINK_INTERFACE_LIBRARIES property values it skips doing so for
    non-linkable targets because target->GetLinkInterface returns NULL for
    such targets.
    
    Since cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty
    looks at the INTERFACE_LINK_LIBRARIES property directly instead of using
    the computed link interface, teach it to skip exporting the property if
    target->IsLinkable returns false.
    
    Extend the RunCMake.CMP0022 test with a case covering this.  Simply
    export an executable target that links to a library that is not
    exported.

diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index a30c5e4..14be5cd 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -185,6 +185,10 @@ bool cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty(
                       ImportPropertyMap &properties,
                       std::vector<std::string> &missingTargets)
 {
+  if(!target->IsLinkable())
+    {
+    return false;
+    }
   const char *input = target->GetProperty("INTERFACE_LINK_LIBRARIES");
   if (input)
     {
diff --git a/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-export-exe.cmake b/Tests/RunCMake/CMP0022/CMP0022-export-exe.cmake
new file mode 100644
index 0000000..d832fac
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-export-exe.cmake
@@ -0,0 +1,9 @@
+enable_language(CXX)
+
+cmake_policy(SET CMP0022 NEW)
+
+add_library(testLib empty_vs6_1.cpp)
+add_executable(testExe empty_vs6_2.cpp)
+target_link_libraries(testExe testLib)
+
+export(TARGETS testExe FILE "${CMAKE_CURRENT_BINARY_DIR}/cmp0022NEW-exe.cmake")
diff --git a/Tests/RunCMake/CMP0022/RunCMakeTest.cmake b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
index 9123f6d..45b56e4 100644
--- a/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
@@ -8,4 +8,5 @@ run_cmake(CMP0022-NOWARN-shared)
 run_cmake(CMP0022-NOWARN-static)
 run_cmake(CMP0022-NOWARN-static-link_libraries)
 run_cmake(CMP0022-export)
+run_cmake(CMP0022-export-exe)
 run_cmake(CMP0022-install-export)

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

Summary of changes:
 Source/cmExportFileGenerator.cxx                   |    4 ++++
 ...ed-stderr.txt => CMP0022-export-exe-stderr.txt} |    0
 Tests/RunCMake/CMP0022/CMP0022-export-exe.cmake    |    9 +++++++++
 Tests/RunCMake/CMP0022/RunCMakeTest.cmake          |    1 +
 4 files changed, 14 insertions(+), 0 deletions(-)
 copy Tests/RunCMake/CMP0022/{CMP0022-NOWARN-shared-stderr.txt => CMP0022-export-exe-stderr.txt} (100%)
 create mode 100644 Tests/RunCMake/CMP0022/CMP0022-export-exe.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list