summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx
index 0dab6bf..1131e83 100644
--- a/Source/cmLocalUnixMakefileGenerator.cxx
+++ b/Source/cmLocalUnixMakefileGenerator.cxx
@@ -342,8 +342,19 @@ std::string cmLocalUnixMakefileGenerator::GetBaseTargetName(const char* n,
}
// if there is no prefix on the target use the cmake definition
if(!targetPrefix && prefixVar)
- {
- targetPrefix = m_Makefile->GetSafeDefinition(prefixVar);
+ {
+ // first check for a language specific suffix var
+ const char* ll = t.GetLinkerLanguage(this->GetGlobalGenerator());
+ if(ll)
+ {
+ std::string langPrefix = prefixVar + std::string("_") + ll;
+ targetPrefix = m_Makefile->GetDefinition(langPrefix.c_str());
+ }
+ // if there not a language specific suffix then use the general one
+ if(!targetPrefix)
+ {
+ targetPrefix = m_Makefile->GetSafeDefinition(prefixVar);
+ }
}
std::string name = pathPrefix + (targetPrefix?targetPrefix:"");
name += n;