summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-05-21 13:38:24 (GMT)
committerBrad King <brad.king@kitware.com>2014-05-21 13:38:24 (GMT)
commit5d12b87b9d505b8c9d0d4363e33636078c7510e7 (patch)
tree48c4659cb56b304b70058b9ce5926cd2b2682d0e /Source/cmGeneratorTarget.cxx
parentc2eeb08b06d422c7b72aa9e6431e6e7584ce8c74 (diff)
downloadCMake-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.cxx12
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;
}