mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
cmMakefile: add GetDefExpandList() that splits value into std::vector
Combines cmMakefile:GetDefinition() and cmExpandList()
This commit is contained in:
@@ -453,14 +453,12 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeDeviceLinkCmd()
|
||||
case cmStateEnums::STATIC_LIBRARY:
|
||||
case cmStateEnums::SHARED_LIBRARY:
|
||||
case cmStateEnums::MODULE_LIBRARY: {
|
||||
const std::string cudaLinkCmd(
|
||||
this->GetMakefile()->GetDefinition("CMAKE_CUDA_DEVICE_LINK_LIBRARY"));
|
||||
cmExpandList(cudaLinkCmd, linkCmds);
|
||||
this->GetMakefile()->GetDefExpandList("CMAKE_CUDA_DEVICE_LINK_LIBRARY",
|
||||
linkCmds);
|
||||
} break;
|
||||
case cmStateEnums::EXECUTABLE: {
|
||||
const std::string cudaLinkCmd(this->GetMakefile()->GetDefinition(
|
||||
"CMAKE_CUDA_DEVICE_LINK_EXECUTABLE"));
|
||||
cmExpandList(cudaLinkCmd, linkCmds);
|
||||
this->GetMakefile()->GetDefExpandList(
|
||||
"CMAKE_CUDA_DEVICE_LINK_EXECUTABLE", linkCmds);
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
@@ -557,9 +555,8 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd(
|
||||
case cmStateEnums::EXECUTABLE:
|
||||
if (this->TargetLinkLanguage(config) == "Swift") {
|
||||
if (this->GeneratorTarget->IsExecutableWithExports()) {
|
||||
const std::string flags =
|
||||
this->Makefile->GetSafeDefinition("CMAKE_EXE_EXPORTS_Swift_FLAG");
|
||||
cmExpandList(flags, linkCmds);
|
||||
this->Makefile->GetDefExpandList("CMAKE_EXE_EXPORTS_Swift_FLAG",
|
||||
linkCmds);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user