diff options
author | Brad King <brad.king@kitware.com> | 2014-05-21 13:38:24 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-05-21 13:38:24 (GMT) |
commit | 5d12b87b9d505b8c9d0d4363e33636078c7510e7 (patch) | |
tree | 48c4659cb56b304b70058b9ce5926cd2b2682d0e /Source/cmGeneratorTarget.cxx | |
parent | c2eeb08b06d422c7b72aa9e6431e6e7584ce8c74 (diff) | |
download | CMake-5d12b87b9d505b8c9d0d4363e33636078c7510e7.zip CMake-5d12b87b9d505b8c9d0d4363e33636078c7510e7.tar.gz CMake-5d12b87b9d505b8c9d0d4363e33636078c7510e7.tar.bz2 |
cmGeneratorTarget: Improve GetCreateRuleVariable API
Pass the language and configuration to the method so it can return the
complete rule variable name.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index ec5ce9e..20f2d96 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -943,18 +943,20 @@ void cmGeneratorTarget::GetAppleArchs(const std::string& config, } //---------------------------------------------------------------------------- -const char* cmGeneratorTarget::GetCreateRuleVariable() const +std::string +cmGeneratorTarget::GetCreateRuleVariable(std::string const& lang, + std::string const&) const { switch(this->GetType()) { case cmTarget::STATIC_LIBRARY: - return "_CREATE_STATIC_LIBRARY"; + return "CMAKE_" + lang + "_CREATE_STATIC_LIBRARY"; case cmTarget::SHARED_LIBRARY: - return "_CREATE_SHARED_LIBRARY"; + return "CMAKE_" + lang + "_CREATE_SHARED_LIBRARY"; case cmTarget::MODULE_LIBRARY: - return "_CREATE_SHARED_MODULE"; + return "CMAKE_" + lang + "_CREATE_SHARED_MODULE"; case cmTarget::EXECUTABLE: - return "_LINK_EXECUTABLE"; + return "CMAKE_" + lang + "_LINK_EXECUTABLE"; default: break; } |