[cmake-commits] king committed cmComputeLinkInformation.cxx 1.13 1.14
cmTarget.cxx 1.186 1.187
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Jan 31 08:05:36 EST 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv24945/Source
Modified Files:
cmComputeLinkInformation.cxx cmTarget.cxx
Log Message:
ENH: Add target property LINK_SEARCH_END_STATIC to help people building static binaries on some platforms.
Index: cmComputeLinkInformation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeLinkInformation.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- cmComputeLinkInformation.cxx 31 Jan 2008 12:50:40 -0000 1.13
+++ cmComputeLinkInformation.cxx 31 Jan 2008 13:05:34 -0000 1.14
@@ -340,7 +340,15 @@
// Restore the target link type so the correct system runtime
// libraries are found.
- this->SetCurrentLinkType(this->StartLinkType);
+ const char* lss = this->Target->GetProperty("LINK_SEARCH_END_STATIC");
+ if(cmSystemTools::IsOn(lss))
+ {
+ this->SetCurrentLinkType(LinkStatic);
+ }
+ else
+ {
+ this->SetCurrentLinkType(this->StartLinkType);
+ }
// Compute the linker search path.
this->ComputeLinkerSearchDirectories();
Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.186
retrieving revision 1.187
diff -u -d -r1.186 -r1.187
--- cmTarget.cxx 30 Jan 2008 22:25:52 -0000 1.186
+++ cmTarget.cxx 31 Jan 2008 13:05:34 -0000 1.187
@@ -285,6 +285,18 @@
"This is the configuration-specific version of LINK_FLAGS.");
cm->DefineProperty
+ ("LINK_SEARCH_END_STATIC", cmProperty::TARGET,
+ "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 the "
+ "linker search type is left at -Bdynamic by the end of the library "
+ "list. This property switches the final linker search type to "
+ "-Bstatic.");
+
+ cm->DefineProperty
("LINKER_LANGUAGE", cmProperty::TARGET,
"What tool to use for linking, based on language.",
"The LINKER_LANGUAGE property is used to change the tool "
More information about the Cmake-commits
mailing list