[Cmake-commits] CMake branch, next, updated. v2.8.10.2-2329-g64ca954

Stephen Kelly steveire at gmail.com
Mon Feb 25 11:09:47 EST 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  64ca9549f1c8d0a357c99bcb3867298f52abc25c (commit)
       via  6e954854c1afeefcf8621f213dda55e66cea42d1 (commit)
       via  02aa1e4be3c45a22f27394d0dadc12667ce1430d (commit)
      from  17bfe720a97c51ad1e6cc1268c5ef6e1b57a71e2 (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=64ca9549f1c8d0a357c99bcb3867298f52abc25c
commit 64ca9549f1c8d0a357c99bcb3867298f52abc25c
Merge: 17bfe72 6e95485
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Feb 25 11:09:40 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Feb 25 11:09:40 2013 -0500

    Merge topic 'add-CMAKE_LINK_DEPENDS_SHARED_LIBRARIES-variable' into next
    
    6e95485 Don't relink shared libraries by default if dependencies files change.
    02aa1e4 Cover both cases of shared lib depends in the BuildDepends test.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e954854c1afeefcf8621f213dda55e66cea42d1
commit 6e954854c1afeefcf8621f213dda55e66cea42d1
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Feb 25 16:59:53 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Feb 25 17:05:39 2013 +0100

    Don't relink shared libraries by default if dependencies files change.
    
    This replaces the LINK_DEPENDS_NO_SHARED target property and associated
    variable introduced in commit ed976313 (Optionally skip link dependencies
    on shared library files, 2012-10-26) with LINK_DEPENDS_SHARED_LIBRARIES
    which is the logical opposite.

diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 84714f3..28c7b09 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -281,7 +281,7 @@ cmComputeLinkInformation
 
   // Check whether we should skip dependencies on shared library files.
   this->LinkDependsNoShared =
-    this->Target->GetPropertyAsBool("LINK_DEPENDS_NO_SHARED");
+    !this->Target->GetPropertyAsBool("LINK_DEPENDS_SHARED_LIBRARIES");
 
   // On platforms without import libraries there may be a special flag
   // to use when creating a plugin (module) that obtains symbols from
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index 204bd9a..5fe1f28 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -1260,9 +1260,9 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
      "Variables that Control the Build");
 
   cm->DefineProperty
-    ("CMAKE_LINK_DEPENDS_NO_SHARED", cmProperty::VARIABLE,
+    ("CMAKE_LINK_DEPENDS_SHARED_LIBRARIES", cmProperty::VARIABLE,
      "Whether to skip link dependencies on shared library files.",
-     "This variable initializes the LINK_DEPENDS_NO_SHARED "
+     "This variable initializes the LINK_DEPENDS_SHARED_LIBRARIES "
      "property on targets when they are created.  "
      "See that target property for additional information.",
      false,
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 003f3d8..c92004c 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -706,19 +706,19 @@ void cmTarget::DefineProperties(cmake *cm)
      "custom Makefile link rules.");
 
   cm->DefineProperty
-    ("LINK_DEPENDS_NO_SHARED", cmProperty::TARGET,
-     "Do not depend on linked shared library files.",
-     "Set this property to true to tell CMake generators not to add "
+    ("LINK_DEPENDS_SHARED_LIBRARIES", cmProperty::TARGET,
+     "Depend on linked shared library files.",
+     "Set this property to true to tell CMake generators to add "
      "file-level dependencies on the shared library files linked by "
      "this target.  "
-     "Modification to the shared libraries will not be sufficient to "
+     "Modification to the shared libraries will then be sufficient to "
      "re-link this target.  "
      "Logical target-level dependencies will not be affected so the "
      "linked shared libraries will still be brought up to date before "
      "this target is built."
      "\n"
      "This property is initialized by the value of the variable "
-     "CMAKE_LINK_DEPENDS_NO_SHARED if it is set when a target is "
+     "CMAKE_LINK_DEPENDS_SHARED_LIBRARIES if it is set when a target is "
      "created.");
 
   cm->DefineProperty
@@ -1451,7 +1451,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
   this->SetPropertyDefault("OSX_ARCHITECTURES", 0);
   this->SetPropertyDefault("AUTOMOC", 0);
   this->SetPropertyDefault("AUTOMOC_MOC_OPTIONS", 0);
-  this->SetPropertyDefault("LINK_DEPENDS_NO_SHARED", 0);
+  this->SetPropertyDefault("LINK_DEPENDS_SHARED_LIBRARIES", 0);
   this->SetPropertyDefault("LINK_INTERFACE_LIBRARIES", 0);
   this->SetPropertyDefault("WIN32_EXECUTABLE", 0);
   this->SetPropertyDefault("MACOSX_BUNDLE", 0);
diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt
index 671dd1e..a6b58f0 100644
--- a/Tests/BuildDepends/Project/CMakeLists.txt
+++ b/Tests/BuildDepends/Project/CMakeLists.txt
@@ -115,11 +115,11 @@ add_library(link_depends_no_shared_lib SHARED link_depends_no_shared_lib.c
 add_executable(link_depends_no_shared_exe_no_relink link_depends_no_shared_exe.c
   ${CMAKE_CURRENT_BINARY_DIR}/link_depends_no_shared_exe.h)
 target_link_libraries(link_depends_no_shared_exe_no_relink link_depends_no_shared_lib)
-set_property(TARGET link_depends_no_shared_exe_no_relink PROPERTY LINK_DEPENDS_NO_SHARED 1)
 
 add_executable(link_depends_no_shared_exe_relink link_depends_no_shared_exe.c
   ${CMAKE_CURRENT_BINARY_DIR}/link_depends_no_shared_exe.h)
 target_link_libraries(link_depends_no_shared_exe_relink link_depends_no_shared_lib)
+set_property(TARGET link_depends_no_shared_exe_relink PROPERTY LINK_DEPENDS_SHARED_LIBRARIES 1)
 
 add_custom_target(link_depends_no_shared_check ALL
   COMMAND ${CMAKE_COMMAND}

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=02aa1e4be3c45a22f27394d0dadc12667ce1430d
commit 02aa1e4be3c45a22f27394d0dadc12667ce1430d
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Feb 25 16:53:49 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Feb 25 17:04:54 2013 +0100

    Cover both cases of shared lib depends in the BuildDepends test.
    
    The commit 306796e8 (Teach BuildDepends test to cover
    LINK_DEPENDS_NO_SHARED, 2012-11-09) did not cover both cases.

diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt
index 2792751..1caa17e 100644
--- a/Tests/BuildDepends/CMakeLists.txt
+++ b/Tests/BuildDepends/CMakeLists.txt
@@ -133,15 +133,18 @@ endif()
 
 if(EXISTS "${link_depends_no_shared_check_txt}")
   file(STRINGS "${link_depends_no_shared_check_txt}" link_depends_no_shared_check LIMIT_COUNT 1)
-  if("${link_depends_no_shared_check}" STREQUAL "1")
-    message(STATUS "link_depends_no_shared_exe is newer than link_depends_no_shared_lib as expected.")
-  else()
-    message(SEND_ERROR "Project did not initially build properly: "
-      "link_depends_no_shared_exe is older than link_depends_no_shared_lib.")
+  if("${link_depends_no_shared_check}" STREQUAL "11")
+    message(STATUS "link_depends_no_shared_exe_relink and link_depends_no_shared_exe_no_relink are both newer than link_depends_no_shared_lib as expected.")
+  elseif("${link_depends_no_shared_check}" STREQUAL "01")
+    message(SEND_ERROR "link_depends_no_shared_exe_relink is erroneously older than link_depends_no_shared_lib (though link_depends_no_shared_exe_no_relink is newer than link_depends_no_shared_lib as expected).")
+  elseif("${link_depends_no_shared_check}" STREQUAL "10")
+    message(SEND_ERROR "link_depends_no_shared_exe_no_relink is erroneously older than link_depends_no_shared_lib (though link_depends_no_shared_exe_relink is newer than link_depends_no_shared_lib as expected).")
+  elseif("${link_depends_no_shared_check}" STREQUAL "00")
+    message(SEND_ERROR "link_depends_no_shared_exe_relink and link_depends_no_shared_exe_no_relink are both erroneously older than link_depends_no_shared_lib.")
   endif()
 else()
   message(SEND_ERROR "Project did not initially build properly: "
-    "Targets link_depends_no_shared_lib and link_depends_no_shared_exe not both built.")
+    "Targets link_depends_no_shared_lib, link_depends_no_shared_exe_relink and link_depends_no_shared_exe_no_relink not all built.")
 endif()
 
 message("Waiting 3 seconds...")
@@ -244,12 +247,16 @@ endif()
 
 if(EXISTS "${link_depends_no_shared_check_txt}")
   file(STRINGS "${link_depends_no_shared_check_txt}" link_depends_no_shared_check LIMIT_COUNT 1)
-  if("${link_depends_no_shared_check}" STREQUAL "0")
-    message(STATUS "link_depends_no_shared_exe is older than link_depends_no_shared_lib as expected.")
-  else()
-    message(SEND_ERROR "Project did not rebuild properly: link_depends_no_shared_exe is newer than link_depends_no_shared_lib.")
+  if("${link_depends_no_shared_check}" STREQUAL "10")
+    message(STATUS "link_depends_no_shared_exe_relink is newer than link_depends_no_shared_lib and link_depends_no_shared_exe_no_relink is older than link_depends_no_shared_lib as expected.")
+  elseif("${link_depends_no_shared_check}" STREQUAL "11")
+    message(SEND_ERROR "link_depends_no_shared_exe_relink is newer than link_depends_no_shared_lib as expected, but link_depends_no_shared_exe_no_relink is erroneously newer than link_depends_no_shared_lib.")
+  elseif("${link_depends_no_shared_check}" STREQUAL "00")
+    message(SEND_ERROR "link_depends_no_shared_exe_relink is erroneously older than link_depends_no_shared_lib, but link_depends_no_shared_exe_no_relink is older than link_depends_no_shared_lib as expected.")
+  elseif("${link_depends_no_shared_check}" STREQUAL "01")
+    message(SEND_ERROR "link_depends_no_shared_exe_relink is erroneously older than link_depends_no_shared_lib and link_depends_no_shared_exe_no_relink is erroneously newer than link_depends_no_shared_lib.")
   endif()
 else()
-  message(SEND_ERROR "Project did not rebuild properly.  "
-    "Targets link_depends_no_shared_lib and link_depends_no_shared_exe not both built.")
+  message(SEND_ERROR "Project did not rebuild properly: "
+    "Targets link_depends_no_shared_lib, link_depends_no_shared_exe_relink and link_depends_no_shared_exe_no_relink not all built.")
 endif()
diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt
index f8a3d15..671dd1e 100644
--- a/Tests/BuildDepends/Project/CMakeLists.txt
+++ b/Tests/BuildDepends/Project/CMakeLists.txt
@@ -111,15 +111,25 @@ endif()
 
 add_library(link_depends_no_shared_lib SHARED link_depends_no_shared_lib.c
   ${CMAKE_CURRENT_BINARY_DIR}/link_depends_no_shared_lib.h)
-add_executable(link_depends_no_shared_exe link_depends_no_shared_exe.c
+
+add_executable(link_depends_no_shared_exe_no_relink link_depends_no_shared_exe.c
+  ${CMAKE_CURRENT_BINARY_DIR}/link_depends_no_shared_exe.h)
+target_link_libraries(link_depends_no_shared_exe_no_relink link_depends_no_shared_lib)
+set_property(TARGET link_depends_no_shared_exe_no_relink PROPERTY LINK_DEPENDS_NO_SHARED 1)
+
+add_executable(link_depends_no_shared_exe_relink link_depends_no_shared_exe.c
   ${CMAKE_CURRENT_BINARY_DIR}/link_depends_no_shared_exe.h)
-target_link_libraries(link_depends_no_shared_exe link_depends_no_shared_lib)
-set_property(TARGET link_depends_no_shared_exe PROPERTY LINK_DEPENDS_NO_SHARED 1)
+target_link_libraries(link_depends_no_shared_exe_relink link_depends_no_shared_lib)
+
 add_custom_target(link_depends_no_shared_check ALL
   COMMAND ${CMAKE_COMMAND}
    -Dlib=$<TARGET_FILE:link_depends_no_shared_lib>
-   -Dexe=$<TARGET_FILE:link_depends_no_shared_exe>
+   -Dexe_relink=$<TARGET_FILE:link_depends_no_shared_exe_relink>
+   -Dexe_no_relink=$<TARGET_FILE:link_depends_no_shared_exe_no_relink>
    -Dout=${CMAKE_CURRENT_BINARY_DIR}/link_depends_no_shared_check.txt
    -P ${CMAKE_CURRENT_SOURCE_DIR}/link_depends_no_shared_check.cmake
   )
-add_dependencies(link_depends_no_shared_check link_depends_no_shared_exe)
+add_dependencies(link_depends_no_shared_check
+  link_depends_no_shared_exe_no_relink
+  link_depends_no_shared_exe_relink
+)
diff --git a/Tests/BuildDepends/Project/link_depends_no_shared_check.cmake b/Tests/BuildDepends/Project/link_depends_no_shared_check.cmake
index 3a61137..a9626b6 100644
--- a/Tests/BuildDepends/Project/link_depends_no_shared_check.cmake
+++ b/Tests/BuildDepends/Project/link_depends_no_shared_check.cmake
@@ -1,7 +1,14 @@
-if(NOT EXISTS "${lib}" OR NOT EXISTS "${exe}")
+if(NOT EXISTS "${lib}" OR NOT EXISTS "${exe_relink}" OR NOT EXISTS "${exe_no_relink}")
   file(REMOVE "${out}")
-elseif("${exe}" IS_NEWER_THAN "${lib}")
-  file(WRITE "${out}" "1\n")
 else()
-  file(WRITE "${out}" "0\n")
+  if("${exe_relink}" IS_NEWER_THAN "${lib}")
+    file(WRITE "${out}" "1")
+  else()
+    file(WRITE "${out}" "0")
+  endif()
+  if("${exe_no_relink}" IS_NEWER_THAN "${lib}")
+    file(APPEND "${out}" "1\n")
+  else()
+    file(APPEND "${out}" "0\n")
+  endif()
 endif()

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

Summary of changes:
 Source/cmComputeLinkInformation.cxx                |    2 +-
 Source/cmDocumentVariables.cxx                     |    4 +-
 Source/cmTarget.cxx                                |   12 ++++----
 Tests/BuildDepends/CMakeLists.txt                  |   31 ++++++++++++-------
 Tests/BuildDepends/Project/CMakeLists.txt          |   20 +++++++++---
 .../Project/link_depends_no_shared_check.cmake     |   15 +++++++--
 6 files changed, 54 insertions(+), 30 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list