diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-09-15 23:19:54 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2012-09-19 13:31:32 (GMT) |
commit | 9facfd133654098ac59c0df957555ea5b5ed9a5a (patch) | |
tree | d50e9f2e2e7a61ddf8f534a22225943024d67b4d /Source | |
parent | 78bfee35d5bd5cba879d92eda4310d25bc54b30e (diff) | |
download | CMake-9facfd133654098ac59c0df957555ea5b5ed9a5a.zip CMake-9facfd133654098ac59c0df957555ea5b5ed9a5a.tar.gz CMake-9facfd133654098ac59c0df957555ea5b5ed9a5a.tar.bz2 |
Move GetCreateRuleVariable to cmGeneratorTarget.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 19 | ||||
-rw-r--r-- | Source/cmGeneratorTarget.h | 5 | ||||
-rw-r--r-- | Source/cmLocalGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 19 | ||||
-rw-r--r-- | Source/cmTarget.h | 4 |
5 files changed, 25 insertions, 24 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 96f0ee8..03f511f 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -336,3 +336,22 @@ void cmGeneratorTarget::GetAppleArchs(const char* config, cmSystemTools::ExpandListArgument(std::string(archs), archVec); } } + +//---------------------------------------------------------------------------- +const char* cmGeneratorTarget::GetCreateRuleVariable() +{ + switch(this->GetType()) + { + case cmTarget::STATIC_LIBRARY: + return "_CREATE_STATIC_LIBRARY"; + case cmTarget::SHARED_LIBRARY: + return "_CREATE_SHARED_LIBRARY"; + case cmTarget::MODULE_LIBRARY: + return "_CREATE_SHARED_MODULE"; + case cmTarget::EXECUTABLE: + return "_LINK_EXECUTABLE"; + default: + break; + } + return ""; +} diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index ad1aa62..d4640b6 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -69,6 +69,11 @@ public: void GetAppleArchs(const char* config, std::vector<std::string>& archVec); + + ///! Return the rule variable used to create this type of target, + // need to add CMAKE_(LANG) for full name. + const char* GetCreateRuleVariable(); + private: void ClassifySources(); void LookupObjectLibraries(); diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 62b0f5e..006be05 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -670,7 +670,7 @@ void cmLocalGenerator::AddBuildTargetRule(const char* llang, } std::string createRule = "CMAKE_"; createRule += llang; - createRule += target.Target->GetCreateRuleVariable(); + createRule += target.GetCreateRuleVariable(); std::string targetName = target.Target->GetFullName(); // Executable : // Shared Library: diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index c556813..8241d75 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -2953,25 +2953,6 @@ void cmTarget::ComputeLinkClosure(const char* config, LinkClosure& lc) } //---------------------------------------------------------------------------- -const char* cmTarget::GetCreateRuleVariable() -{ - switch(this->GetType()) - { - case cmTarget::STATIC_LIBRARY: - return "_CREATE_STATIC_LIBRARY"; - case cmTarget::SHARED_LIBRARY: - return "_CREATE_SHARED_LIBRARY"; - case cmTarget::MODULE_LIBRARY: - return "_CREATE_SHARED_MODULE"; - case cmTarget::EXECUTABLE: - return "_LINK_EXECUTABLE"; - default: - break; - } - return ""; -} - -//---------------------------------------------------------------------------- const char* cmTarget::GetSuffixVariableInternal(bool implib) { switch(this->GetType()) diff --git a/Source/cmTarget.h b/Source/cmTarget.h index f5ef72c..7a7b34f 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -320,10 +320,6 @@ public: ///! Return the preferred linker language for this target const char* GetLinkerLanguage(const char* config = 0); - ///! Return the rule variable used to create this type of target, - // need to add CMAKE_(LANG) for full name. - const char* GetCreateRuleVariable(); - /** Get the full name of the target according to the settings in its makefile. */ std::string GetFullName(const char* config=0, bool implib = false); |