diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-05-30 12:00:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-05-30 12:59:20 (GMT) |
commit | 7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf (patch) | |
tree | b17167b762c3257baf362b515fbf1a8fece7b356 /Source/cmNinjaNormalTargetGenerator.cxx | |
parent | 6bb20b51c9af40372b6a818826613e965cde5f19 (diff) | |
download | CMake-7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf.zip CMake-7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf.tar.gz CMake-7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf.tar.bz2 |
cmMakefile: add GetDefExpandList() that splits value into std::vector
Combines cmMakefile:GetDefinition() and cmExpandList()
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index f87eba7..72e6c2d 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -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; |