diff options
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 091acd6..ee4fa90 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -610,7 +610,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile, std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeDeviceLinkCmd() { - std::vector<std::string> linkCmds; + cmList linkCmds; // this target requires separable cuda compilation // now build the correct command depending on if the target is @@ -619,23 +619,23 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeDeviceLinkCmd() case cmStateEnums::STATIC_LIBRARY: case cmStateEnums::SHARED_LIBRARY: case cmStateEnums::MODULE_LIBRARY: { - this->GetMakefile()->GetDefExpandList("CMAKE_CUDA_DEVICE_LINK_LIBRARY", - linkCmds); + linkCmds.assign( + this->GetMakefile()->GetDefinition("CMAKE_CUDA_DEVICE_LINK_LIBRARY")); } break; case cmStateEnums::EXECUTABLE: { - this->GetMakefile()->GetDefExpandList( - "CMAKE_CUDA_DEVICE_LINK_EXECUTABLE", linkCmds); + linkCmds.assign(this->GetMakefile()->GetDefinition( + "CMAKE_CUDA_DEVICE_LINK_EXECUTABLE")); } break; default: break; } - return linkCmds; + return std::move(linkCmds.data()); } std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd( const std::string& config) { - std::vector<std::string> linkCmds; + cmList linkCmds; cmMakefile* mf = this->GetMakefile(); { // If we have a rule variable prefer it. In the case of static libraries @@ -654,7 +654,7 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd( linkCmdStr += *rule; } } - cmExpandList(linkCmdStr, linkCmds); + linkCmds.assign(linkCmdStr); if (this->UseLWYU) { cmValue lwyuCheck = mf->GetDefinition("CMAKE_LINK_WHAT_YOU_USE_CHECK"); if (lwyuCheck) { @@ -673,7 +673,7 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd( linkCmds.push_back(std::move(cmakeCommand)); } } - return linkCmds; + return std::move(linkCmds.data()); } } switch (this->GetGeneratorTarget()->GetType()) { @@ -694,7 +694,7 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd( linkCmdVar, this->TargetLinkLanguage(config), config); std::string const& linkCmd = mf->GetRequiredDefinition(linkCmdVar); - cmExpandList(linkCmd, linkCmds); + linkCmds.append(linkCmd); } { std::string linkCmdVar = cmStrCat( @@ -704,7 +704,7 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd( linkCmdVar, this->TargetLinkLanguage(config), config); std::string const& linkCmd = mf->GetRequiredDefinition(linkCmdVar); - cmExpandList(linkCmd, linkCmds); + linkCmds.append(linkCmd); } #ifdef __APPLE__ // On macOS ranlib truncates the fractional part of the static archive @@ -728,7 +728,7 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd( default: assert(false && "Unexpected target type"); } - return linkCmds; + return std::move(linkCmds.data()); } void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement( |