[cmake-commits] alex committed cmake.h 1.84 1.85 cmake.cxx 1.303 1.304 cmAddLibraryCommand.cxx 1.30 1.31

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Jun 26 13:05:28 EDT 2007


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv4423/Source

Modified Files:
	cmake.h cmake.cxx cmAddLibraryCommand.cxx 
Log Message:

STYLE: change global cmake variable CMAKE_TARGET_SUPPORTS_ONLY_STATIC_LIBS
to the first global cmake property TARGET_SUPPORTS_SHARED_LIBS

Alex


Index: cmake.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.h,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- cmake.h	25 Jun 2007 14:34:21 -0000	1.84
+++ cmake.h	26 Jun 2007 17:05:26 -0000	1.85
@@ -312,6 +312,9 @@
   bool IsPropertyDefined(const char *name, cmProperty::ScopeType scope);
   bool IsPropertyChained(const char *name, cmProperty::ScopeType scope);
 
+  // Define the properties
+  static void DefineProperties(cmake *cm);
+
 protected:
   cmPropertyMap Properties;
 

Index: cmAddLibraryCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmAddLibraryCommand.cxx,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- cmAddLibraryCommand.cxx	22 Jun 2007 13:58:10 -0000	1.30
+++ cmAddLibraryCommand.cxx	26 Jun 2007 17:05:26 -0000	1.31
@@ -16,6 +16,8 @@
 =========================================================================*/
 #include "cmAddLibraryCommand.h"
 
+#include "cmake.h"
+
 // cmLibraryCommand
 bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args)
 {
@@ -82,7 +84,8 @@
     STATIC. But at this point we know only the name of the target, but not 
     yet its linker language. */
   if ((type != cmTarget::STATIC_LIBRARY) && 
-       (this->Makefile->IsOn("CMAKE_TARGET_SUPPORTS_ONLY_STATIC_LIBS")))
+       (this->Makefile->GetCMakeInstance()->GetPropertyAsBool(
+                                      "TARGET_SUPPORTS_SHARED_LIBS") == false))
     {
     std::string msg = "ADD_LIBRARY for library ";
     msg += args[0];

Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.303
retrieving revision 1.304
diff -u -d -r1.303 -r1.304
--- cmake.cxx	25 Jun 2007 14:34:21 -0000	1.303
+++ cmake.cxx	26 Jun 2007 17:05:26 -0000	1.304
@@ -128,6 +128,7 @@
   cmTarget::DefineProperties(this);
   cmMakefile::DefineProperties(this);
   cmTest::DefineProperties(this);
+  cmake::DefineProperties(this);
 
 #ifdef __APPLE__
   struct rlimit rlp;
@@ -2930,6 +2931,18 @@
   return result;
 }
 
+void cmake::DefineProperties(cmake *cm)
+{
+  cm->DefineProperty
+    ("TARGET_SUPPORTS_SHARED_LIBS", cmProperty::GLOBAL, 
+     "Does the target platform support shared libraries.",
+     "TARGET_SUPPORTS_SHARED_LIBS is a boolean specifying whether the target "
+     "platform supports shared libraries. Basically all current general "
+     "general purpose OS do so, the exception are usually embedded systems "
+     "with no or special OSs.");
+}
+
+
 void cmake::DefineProperty(const char *name, cmProperty::ScopeType scope,
                            const char *ShortDescription,
                            const char *FullDescription,



More information about the Cmake-commits mailing list