diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-06-26 17:05:27 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-06-26 17:05:27 (GMT) |
commit | f8261ff9f7085b8931da08a034569d81f87e83a5 (patch) | |
tree | 88fea472fc84df69fe1e4feb5879b92dead7fec9 /Source | |
parent | 5fb7dab5416a3444cae09f857794cca5e312b09f (diff) | |
download | CMake-f8261ff9f7085b8931da08a034569d81f87e83a5.zip CMake-f8261ff9f7085b8931da08a034569d81f87e83a5.tar.gz CMake-f8261ff9f7085b8931da08a034569d81f87e83a5.tar.bz2 |
STYLE: change global cmake variable CMAKE_TARGET_SUPPORTS_ONLY_STATIC_LIBS
to the first global cmake property TARGET_SUPPORTS_SHARED_LIBS
Alex
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmAddLibraryCommand.cxx | 5 | ||||
-rw-r--r-- | Source/cmake.cxx | 13 | ||||
-rw-r--r-- | Source/cmake.h | 3 |
3 files changed, 20 insertions, 1 deletions
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index cc55f80..bbfa5ce 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -16,6 +16,8 @@ =========================================================================*/ #include "cmAddLibraryCommand.h" +#include "cmake.h" + // cmLibraryCommand bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args) { @@ -82,7 +84,8 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args) 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]; diff --git a/Source/cmake.cxx b/Source/cmake.cxx index bbd0fb2..b6efa10 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -128,6 +128,7 @@ cmake::cmake() cmTarget::DefineProperties(this); cmMakefile::DefineProperties(this); cmTest::DefineProperties(this); + cmake::DefineProperties(this); #ifdef __APPLE__ struct rlimit rlp; @@ -2930,6 +2931,18 @@ int cmake::ExecuteLinkScript(std::vector<std::string>& args) 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, diff --git a/Source/cmake.h b/Source/cmake.h index 8f6b283..f61cf90 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -312,6 +312,9 @@ class cmake 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; |