summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileLibraryTargetGenerator.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2023-04-25 17:54:23 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2023-04-29 07:54:31 (GMT)
commit241304190ffdf9cc7d4ede0601da370b111468cc (patch)
treee35dd7fe5c89da1eed3abe10f37abe3586e64df7 /Source/cmMakefileLibraryTargetGenerator.cxx
parent87fe031a0703f07b8636f8ea59b6746788e71869 (diff)
downloadCMake-241304190ffdf9cc7d4ede0601da370b111468cc.zip
CMake-241304190ffdf9cc7d4ede0601da370b111468cc.tar.gz
CMake-241304190ffdf9cc7d4ede0601da370b111468cc.tar.bz2
CMake code rely on cmList class for CMake lists management (part. 2)
Diffstat (limited to 'Source/cmMakefileLibraryTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx26
1 files changed, 14 insertions, 12 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 43062d9..691edf4 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -305,7 +305,7 @@ void cmMakefileLibraryTargetGenerator::WriteNvidiaDeviceLibraryRules(
vars.Language = linkLanguage.c_str();
// Expand the rule variables.
- std::vector<std::string> real_link_commands;
+ cmList real_link_commands;
{
// Set path conversion for link script shells.
this->LocalGenerator->SetLinkScriptShell(useLinkScript);
@@ -376,10 +376,10 @@ void cmMakefileLibraryTargetGenerator::WriteNvidiaDeviceLibraryRules(
// Construct the main link rule and expand placeholders.
rulePlaceholderExpander->SetTargetImpLib(targetOutput);
std::string linkRule = this->GetLinkRule(linkRuleVar);
- cmExpandList(linkRule, real_link_commands);
+ real_link_commands.append(linkRule);
// Expand placeholders.
- for (std::string& real_link_command : real_link_commands) {
+ for (auto& real_link_command : real_link_commands) {
real_link_command = cmStrCat(launcher, real_link_command);
rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator,
real_link_command, vars);
@@ -641,9 +641,9 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
// For static libraries there might be archiving rules.
bool haveStaticLibraryRule = false;
- std::vector<std::string> archiveCreateCommands;
- std::vector<std::string> archiveAppendCommands;
- std::vector<std::string> archiveFinishCommands;
+ cmList archiveCreateCommands;
+ cmList archiveAppendCommands;
+ cmList archiveFinishCommands;
std::string::size_type archiveCommandLimit = std::string::npos;
if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY) {
haveStaticLibraryRule = this->Makefile->IsDefinitionSet(linkRuleVar);
@@ -653,21 +653,23 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
arCreateVar = this->GeneratorTarget->GetFeatureSpecificLinkRuleVariable(
arCreateVar, linkLanguage, this->GetConfigName());
- this->Makefile->GetDefExpandList(arCreateVar, archiveCreateCommands);
+ archiveCreateCommands.assign(this->Makefile->GetDefinition(arCreateVar));
+
std::string arAppendVar =
cmStrCat("CMAKE_", linkLanguage, "_ARCHIVE_APPEND");
arAppendVar = this->GeneratorTarget->GetFeatureSpecificLinkRuleVariable(
arAppendVar, linkLanguage, this->GetConfigName());
- this->Makefile->GetDefExpandList(arAppendVar, archiveAppendCommands);
+ archiveAppendCommands.assign(this->Makefile->GetDefinition(arAppendVar));
+
std::string arFinishVar =
cmStrCat("CMAKE_", linkLanguage, "_ARCHIVE_FINISH");
arFinishVar = this->GeneratorTarget->GetFeatureSpecificLinkRuleVariable(
arFinishVar, linkLanguage, this->GetConfigName());
- this->Makefile->GetDefExpandList(arFinishVar, archiveFinishCommands);
+ archiveFinishCommands.assign(this->Makefile->GetDefinition(arFinishVar));
}
// Decide whether to use archiving rules.
@@ -695,7 +697,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
this->LocalGenerator->CreateRulePlaceholderExpander());
bool useWatcomQuote =
this->Makefile->IsOn(linkRuleVar + "_USE_WATCOM_QUOTE");
- std::vector<std::string> real_link_commands;
+ cmList real_link_commands;
{
// Set path conversion for link script shells.
this->LocalGenerator->SetLinkScriptShell(useLinkScript);
@@ -880,7 +882,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
} else {
// Get the set of commands.
std::string linkRule = this->GetLinkRule(linkRuleVar);
- cmExpandList(linkRule, real_link_commands);
+ real_link_commands.append(linkRule);
if (this->UseLWYU) {
cmValue lwyuCheck =
this->Makefile->GetDefinition("CMAKE_LINK_WHAT_YOU_USE_CHECK");
@@ -896,7 +898,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
}
// Expand placeholders.
- for (std::string& real_link_command : real_link_commands) {
+ for (auto& real_link_command : real_link_commands) {
real_link_command = cmStrCat(launcher, real_link_command);
rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator,
real_link_command, vars);