[Cmake-commits] CMake branch, next, updated. v3.3.0-2111-g979cf19

Brad King brad.king at kitware.com
Mon Aug 10 09:02:26 EDT 2015


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  979cf19aa17a4f7f4662b43d17b06cec9c32ad45 (commit)
       via  b695b3b9853fbb03fb135c391593d90298cc17f0 (commit)
      from  8618bdc60bfe0f81fe5ce1e1c31afdcf69eb692e (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=979cf19aa17a4f7f4662b43d17b06cec9c32ad45
commit 979cf19aa17a4f7f4662b43d17b06cec9c32ad45
Merge: 8618bdc b695b3b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Aug 10 09:02:26 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Aug 10 09:02:26 2015 -0400

    Merge topic 'add-global-link-static-properties' into next
    
    b695b3b9 Revert "Allow LINK_SEARCH_{START,END}_STATIC props to have default values."


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b695b3b9853fbb03fb135c391593d90298cc17f0
commit b695b3b9853fbb03fb135c391593d90298cc17f0
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Aug 10 09:02:05 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Aug 10 09:02:05 2015 -0400

    Revert "Allow LINK_SEARCH_{START,END}_STATIC props to have default values."
    
    This reverts commit 542160830ac3284eea8fc988d3103cdb5b99a56e.
    The LinkStatic test fails on many machines.

diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 70edf54..9066d97 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -139,8 +139,6 @@ Variables that Change Behavior
    /variable/CMAKE_INSTALL_MESSAGE
    /variable/CMAKE_INSTALL_PREFIX
    /variable/CMAKE_LIBRARY_PATH
-   /variable/CMAKE_LINK_SEARCH_END_STATIC
-   /variable/CMAKE_LINK_SEARCH_START_STATIC
    /variable/CMAKE_MFC_FLAG
    /variable/CMAKE_MODULE_PATH
    /variable/CMAKE_NOT_USING_CONFIG_FLAGS
diff --git a/Help/prop_tgt/LINK_SEARCH_END_STATIC.rst b/Help/prop_tgt/LINK_SEARCH_END_STATIC.rst
index cf9c871..fe105bd 100644
--- a/Help/prop_tgt/LINK_SEARCH_END_STATIC.rst
+++ b/Help/prop_tgt/LINK_SEARCH_END_STATIC.rst
@@ -10,9 +10,5 @@ paths are not known or (in some cases) are in implicit link
 directories for the platform.  By default CMake adds an option at the
 end of the library list (if necessary) to set the linker search type
 back to its starting type.  This property switches the final linker
-search type to -Bstatic regardless of how it started.
-
-This property is initialized by the value of the variable
-CMAKE_LINK_SEARCH_END_STATIC if it is set when a target is created.
-
-See also LINK_SEARCH_START_STATIC.
+search type to -Bstatic regardless of how it started.  See also
+LINK_SEARCH_START_STATIC.
diff --git a/Help/prop_tgt/LINK_SEARCH_START_STATIC.rst b/Help/prop_tgt/LINK_SEARCH_START_STATIC.rst
index 2e0f9bd..ca899fe 100644
--- a/Help/prop_tgt/LINK_SEARCH_START_STATIC.rst
+++ b/Help/prop_tgt/LINK_SEARCH_START_STATIC.rst
@@ -11,9 +11,4 @@ directories for the platform.  By default the linker search type is
 assumed to be -Bdynamic at the beginning of the library list.  This
 property switches the assumption to -Bstatic.  It is intended for use
 when linking an executable statically (e.g.  with the GNU -static
-option).
-
-This property is initialized by the value of the variable
-CMAKE_LINK_SEARCH_START_STATIC if it is set when a target is created.
-
-See also LINK_SEARCH_END_STATIC.
+option).  See also LINK_SEARCH_END_STATIC.
diff --git a/Help/variable/CMAKE_LINK_SEARCH_END_STATIC.rst b/Help/variable/CMAKE_LINK_SEARCH_END_STATIC.rst
deleted file mode 100644
index 8a9951d..0000000
--- a/Help/variable/CMAKE_LINK_SEARCH_END_STATIC.rst
+++ /dev/null
@@ -1,18 +0,0 @@
-CMAKE_LINK_SEARCH_END_STATIC
-----------------------------
-
-End a link line such that static system libraries are used.
-
-Some linkers support switches such as -Bstatic and -Bdynamic to
-determine whether to use static or shared libraries for -lXXX options.
-CMake uses these options to set the link type for libraries whose full
-paths are not known or (in some cases) are in implicit link
-directories for the platform.  By default CMake adds an option at the
-end of the library list (if necessary) to set the linker search type
-back to its starting type.  This property switches the final linker
-search type to -Bstatic regardless of how it started.
-
-This variable is used to initialize the target property
-LINK_SEARCH_END_STATIC for all targets.
-
-See also CMAKE_LINK_SEARCH_START_STATIC.
diff --git a/Help/variable/CMAKE_LINK_SEARCH_START_STATIC.rst b/Help/variable/CMAKE_LINK_SEARCH_START_STATIC.rst
deleted file mode 100644
index 715db4b..0000000
--- a/Help/variable/CMAKE_LINK_SEARCH_START_STATIC.rst
+++ /dev/null
@@ -1,19 +0,0 @@
-CMAKE_LINK_SEARCH_START_STATIC
-------------------------------
-
-Assume the linker looks for static libraries by default.
-
-Some linkers support switches such as -Bstatic and -Bdynamic to
-determine whether to use static or shared libraries for -lXXX options.
-CMake uses these options to set the link type for libraries whose full
-paths are not known or (in some cases) are in implicit link
-directories for the platform.  By default the linker search type is
-assumed to be -Bdynamic at the beginning of the library list.  This
-property switches the assumption to -Bstatic.  It is intended for use
-when linking an executable statically (e.g.  with the GNU -static
-option).
-
-This variable is used to initialize the target property
-LINK_SEARCH_START_STATIC for all targets.
-
-See also CMAKE_LINK_SEARCH_END_STATIC.
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index dff223f..c3f36af 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -520,10 +520,9 @@ bool cmComputeLinkInformation::Compute()
   // libraries are found.
   const char* lss =
       this->Target->Target->GetProperty("LINK_SEARCH_END_STATIC");
-  if(lss)
+  if(cmSystemTools::IsOn(lss))
     {
-    this->SetCurrentLinkType(
-      cmSystemTools::IsOn(lss) ? LinkStatic : LinkShared);
+    this->SetCurrentLinkType(LinkStatic);
     }
   else
     {
@@ -865,8 +864,7 @@ void cmComputeLinkInformation::ComputeLinkTypeInfo()
   const char* lss =
       this->Target->Target->GetProperty("LINK_SEARCH_START_STATIC");
   this->StartLinkType = cmSystemTools::IsOn(lss)? LinkStatic : LinkShared;
-  this->CurrentLinkType = LinkUnknown;
-  this->SetCurrentLinkType(this->StartLinkType);
+  this->CurrentLinkType = this->StartLinkType;
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 51e6a66..1f8f07a 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -306,8 +306,6 @@ void cmTarget::SetMakefile(cmMakefile* mf)
     this->SetPropertyDefault("CXX_STANDARD", 0);
     this->SetPropertyDefault("CXX_STANDARD_REQUIRED", 0);
     this->SetPropertyDefault("CXX_EXTENSIONS", 0);
-    this->SetPropertyDefault("LINK_SEARCH_START_STATIC", 0);
-    this->SetPropertyDefault("LINK_SEARCH_END_STATIC", 0);
     }
 
   // Collect the set of configuration types.
diff --git a/Tests/LinkStatic/CMakeLists.txt b/Tests/LinkStatic/CMakeLists.txt
index 264c85f..200d4e5 100644
--- a/Tests/LinkStatic/CMakeLists.txt
+++ b/Tests/LinkStatic/CMakeLists.txt
@@ -25,39 +25,3 @@ set(LinkStatic_FLAG "-static" CACHE STRING "Flag to link statically")
 set_property(TARGET LinkStatic PROPERTY LINK_FLAGS "${LinkStatic_FLAG}")
 set_property(TARGET LinkStatic PROPERTY LINK_SEARCH_START_STATIC 1)
 #set_property(TARGET LinkStatic PROPERTY LINK_SEARCH_END_STATIC 1) # insufficient
-
-set(CMAKE_LINK_SEARCH_START_STATIC ON)
-add_executable(LinkStaticInitStart1 LinkStatic.c)
-get_property(LSSS TARGET LinkStaticInitStart1
-  PROPERTY LINK_SEARCH_START_STATIC)
-if(NOT LSSS)
-  message(FATAL_ERROR "Failed to correctly initialize LINK_SEARCH_START_STATIC")
-endif()
-
-set(CMAKE_LINK_SEARCH_START_STATIC OFF)
-add_executable(LinkStaticInitStart2 LinkStatic.c)
-get_property(LSSS TARGET LinkStaticInitStart2
-  PROPERTY LINK_SEARCH_START_STATIC)
-if(LSSS)
-  message(FATAL_ERROR "Failed to correctly initialize LINK_SEARCH_START_STATIC")
-endif()
-
-unset(CMAKE_LINK_SEARCH_START_STATIC)
-
-set(CMAKE_LINK_SEARCH_END_STATIC ON)
-add_executable(LinkStaticInitEnd1 LinkStatic.c)
-get_property(LSES TARGET LinkStaticInitEnd1
-  PROPERTY LINK_SEARCH_END_STATIC)
-if(NOT LSES)
-  message(FATAL_ERROR "Failed to correctly initialize LINK_SEARCH_END_STATIC")
-endif()
-
-set(CMAKE_LINK_SEARCH_END_STATIC OFF)
-add_executable(LinkStaticInitEnd2 LinkStatic.c)
-get_property(LSES TARGET LinkStaticInitEnd2
-  PROPERTY LINK_SEARCH_END_STATIC)
-if(LSES)
-  message(FATAL_ERROR "Failed to correctly initialize LINK_SEARCH_END_STATIC")
-endif()
-
-unset(CMAKE_LINK_SEARCH_END_STATIC)

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

Summary of changes:
 Help/manual/cmake-variables.7.rst                |    2 --
 Help/prop_tgt/LINK_SEARCH_END_STATIC.rst         |    8 ++---
 Help/prop_tgt/LINK_SEARCH_START_STATIC.rst       |    7 +----
 Help/variable/CMAKE_LINK_SEARCH_END_STATIC.rst   |   18 -----------
 Help/variable/CMAKE_LINK_SEARCH_START_STATIC.rst |   19 ------------
 Source/cmComputeLinkInformation.cxx              |    8 ++---
 Source/cmTarget.cxx                              |    2 --
 Tests/LinkStatic/CMakeLists.txt                  |   36 ----------------------
 8 files changed, 6 insertions(+), 94 deletions(-)
 delete mode 100644 Help/variable/CMAKE_LINK_SEARCH_END_STATIC.rst
 delete mode 100644 Help/variable/CMAKE_LINK_SEARCH_START_STATIC.rst


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list