[Cmake-commits] CMake branch, next, updated. v2.8.9-1214-g3c84971

Brad King brad.king at kitware.com
Fri Oct 26 10:31:24 EDT 2012


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  3c849715b594ef736dd0ae0e31106d52da10bbb3 (commit)
       via  ed9763136acdb8594e4b85ab7b2e4e2828d8b775 (commit)
       via  259cff94ff81f7b95b7375905fe0e0a292f70dda (commit)
      from  ed8aca6e5363fd9c5a3a486673d37fd6f51db09a (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=3c849715b594ef736dd0ae0e31106d52da10bbb3
commit 3c849715b594ef736dd0ae0e31106d52da10bbb3
Merge: ed8aca6 ed97631
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Oct 26 10:31:19 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Oct 26 10:31:19 2012 -0400

    Merge topic 'link-depends-no-shared' into next
    
    ed97631 Optionally skip link dependencies on shared library files
    259cff9 CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed9763136acdb8594e4b85ab7b2e4e2828d8b775
commit ed9763136acdb8594e4b85ab7b2e4e2828d8b775
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Oct 26 08:25:36 2012 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Oct 26 08:28:16 2012 -0400

    Optionally skip link dependencies on shared library files
    
    Add target property LINK_DEPENDS_NO_SHARED and initialization variable
    CMAKE_LINK_DEPENDS_NO_SHARED to enable this behavior.
    
    Suggested-by: Leif Walsh <leif.walsh at gmail.com>

diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index cd3ef59..d8ffb5e 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -277,6 +277,10 @@ cmComputeLinkInformation
   this->UseImportLibrary =
     this->Makefile->GetDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX")?true:false;
 
+  // Check whether we should skip dependencies on shared library files.
+  this->LinkDependsNoShared =
+    this->Target->GetPropertyAsBool("LINK_DEPENDS_NO_SHARED");
+
   // On platforms without import libraries there may be a special flag
   // to use when creating a plugin (module) that obtains symbols from
   // the program that will load it.
@@ -650,7 +654,11 @@ void cmComputeLinkInformation::AddItem(std::string const& item, cmTarget* tgt)
 
       // Pass the full path to the target file.
       std::string lib = tgt->GetFullPath(config, implib, true);
-      this->Depends.push_back(lib);
+      if(!this->LinkDependsNoShared ||
+         tgt->GetType() != cmTarget::SHARED_LIBRARY)
+        {
+        this->Depends.push_back(lib);
+        }
 
       this->AddTargetItem(lib, tgt);
       this->AddLibraryRuntimeInfo(lib, tgt);
diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h
index f60f8d3..e0078af 100644
--- a/Source/cmComputeLinkInformation.h
+++ b/Source/cmComputeLinkInformation.h
@@ -82,6 +82,7 @@ private:
   // Configuration information.
   const char* Config;
   const char* LinkLanguage;
+  bool LinkDependsNoShared;
 
   // Modes for dealing with dependent shared libraries.
   enum SharedDepMode
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index 8db0e8f..55d70f8 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -1222,6 +1222,15 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
      "Variables that Control the Build");
 
   cm->DefineProperty
+    ("CMAKE_LINK_DEPENDS_NO_SHARED", cmProperty::VARIABLE,
+     "Whether to skip link dependencies on shared library files.",
+     "This variable initializes the LINK_DEPENDS_NO_SHARED "
+     "property on targets when they are created.  "
+     "See that target property for additional information.",
+     false,
+     "Variables that Control the Build");
+
+  cm->DefineProperty
     ("CMAKE_AUTOMOC", cmProperty::VARIABLE,
      "Whether to handle moc automatically for Qt targets.",
      "This variable is used to initialize the "
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 423b350..9cfcb63 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -651,6 +651,22 @@ 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 "
+     "file-level dependencies on the shared library files linked by "
+     "this target.  "
+     "Modification to the shared libraries will not 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 "
+     "created.");
+
+  cm->DefineProperty
     ("LINK_INTERFACE_LIBRARIES", cmProperty::TARGET,
      "List public interface libraries for a shared library or executable.",
      "By default linking to a shared library target transitively "
@@ -1314,6 +1330,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_INTERFACE_LIBRARIES", 0);
   this->SetPropertyDefault("WIN32_EXECUTABLE", 0);
   this->SetPropertyDefault("MACOSX_BUNDLE", 0);

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

Summary of changes:
 Source/CMakeVersion.cmake           |    2 +-
 Source/cmComputeLinkInformation.cxx |   10 +++++++++-
 Source/cmComputeLinkInformation.h   |    1 +
 Source/cmDocumentVariables.cxx      |    9 +++++++++
 Source/cmTarget.cxx                 |   17 +++++++++++++++++
 5 files changed, 37 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list