summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileLibraryTargetGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMakefileLibraryTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx32
1 files changed, 12 insertions, 20 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index d3f3a4f..5809b4a 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -141,8 +141,7 @@ void cmMakefileLibraryTargetGenerator::WriteStaticLibraryRules()
std::string extraFlags;
this->LocalGenerator->GetStaticLibraryFlags(
- extraFlags, cmSystemTools::UpperCase(this->GetConfigName()), linkLanguage,
- this->GeneratorTarget);
+ extraFlags, this->GetConfigName(), linkLanguage, this->GeneratorTarget);
this->WriteLibraryRules(linkRuleVar, extraFlags, false);
}
@@ -250,9 +249,14 @@ void cmMakefileLibraryTargetGenerator::WriteDeviceLibraryRules(
std::vector<std::string> depends;
this->AppendLinkDepends(depends, linkLanguage);
+ // Add language-specific flags.
+ std::string langFlags;
+ this->LocalGenerator->AddLanguageFlagsForLinking(
+ langFlags, this->GeneratorTarget, linkLanguage, this->GetConfigName());
+
// Create set of linking flags.
std::string linkFlags;
- this->GetTargetLinkFlags(linkFlags, linkLanguage);
+ this->GetDeviceLinkFlags(linkFlags, linkLanguage);
// Get the name of the device object to generate.
std::string const targetOutputReal =
@@ -345,16 +349,10 @@ void cmMakefileLibraryTargetGenerator::WriteDeviceLibraryRules(
vars.Target = target.c_str();
vars.LinkLibraries = linkLibs.c_str();
vars.ObjectsQuoted = buildObjs.c_str();
+ vars.LanguageCompileFlags = langFlags.c_str();
vars.LinkFlags = linkFlags.c_str();
vars.TargetCompilePDB = targetOutPathCompilePDB.c_str();
- // Add language-specific flags.
- std::string langFlags;
- this->LocalGenerator->AddLanguageFlagsForLinking(
- langFlags, this->GeneratorTarget, linkLanguage, this->GetConfigName());
-
- vars.LanguageCompileFlags = langFlags.c_str();
-
std::string launcher;
const char* val = this->LocalGenerator->GetRuleLauncher(
this->GeneratorTarget, "RULE_LAUNCH_LINK");
@@ -644,27 +642,21 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
arCreateVar = this->GeneratorTarget->GetFeatureSpecificLinkRuleVariable(
arCreateVar, linkLanguage, this->GetConfigName());
- if (const char* rule = this->Makefile->GetDefinition(arCreateVar)) {
- cmExpandList(rule, archiveCreateCommands);
- }
+ this->Makefile->GetDefExpandList(arCreateVar, archiveCreateCommands);
std::string arAppendVar =
cmStrCat("CMAKE_", linkLanguage, "_ARCHIVE_APPEND");
arAppendVar = this->GeneratorTarget->GetFeatureSpecificLinkRuleVariable(
arAppendVar, linkLanguage, this->GetConfigName());
- if (const char* rule = this->Makefile->GetDefinition(arAppendVar)) {
- cmExpandList(rule, archiveAppendCommands);
- }
+ this->Makefile->GetDefExpandList(arAppendVar, archiveAppendCommands);
std::string arFinishVar =
cmStrCat("CMAKE_", linkLanguage, "_ARCHIVE_FINISH");
arFinishVar = this->GeneratorTarget->GetFeatureSpecificLinkRuleVariable(
arFinishVar, linkLanguage, this->GetConfigName());
- if (const char* rule = this->Makefile->GetDefinition(arFinishVar)) {
- cmExpandList(rule, archiveFinishCommands);
- }
+ this->Makefile->GetDefExpandList(arFinishVar, archiveFinishCommands);
}
// Decide whether to use archiving rules.
@@ -756,7 +748,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
vars.CMTargetName = this->GeneratorTarget->GetName().c_str();
vars.CMTargetType =
- cmState::GetTargetTypeName(this->GeneratorTarget->GetType());
+ cmState::GetTargetTypeName(this->GeneratorTarget->GetType()).c_str();
vars.Language = linkLanguage.c_str();
vars.AIXExports = aixExports.c_str();
vars.Objects = buildObjs.c_str();