summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-06-27 11:29:50 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-06-27 11:30:01 (GMT)
commit6ddc0b443896e3be1c9e2ba5a67cf5231ab1249e (patch)
tree58a1e6a453ba164186daf205b3eb4608631a948a /Source
parent454a6250cafd7857d444f393791a239863afb12b (diff)
parent8fbd25772f7db4c6f152a28b0050e6b263951049 (diff)
downloadCMake-6ddc0b443896e3be1c9e2ba5a67cf5231ab1249e.zip
CMake-6ddc0b443896e3be1c9e2ba5a67cf5231ab1249e.tar.gz
CMake-6ddc0b443896e3be1c9e2ba5a67cf5231ab1249e.tar.bz2
Merge topic 'cuda-msvc-runtime-library'
8fbd25772f CUDA: Implement MSVC runtime library abstraction 07807a2006 VS: Use AddLanguageFlags to de-duplicate CMAKE_{CUDA,ASM*}_FLAGS lookup Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3485
Diffstat (limited to 'Source')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx26
1 files changed, 11 insertions, 15 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 8b9a41f..ee16d4e 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2915,10 +2915,9 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions(
Options& cudaOptions = *pOptions;
// Get compile flags for CUDA in this directory.
- std::string CONFIG = cmSystemTools::UpperCase(configName);
- std::string configFlagsVar = "CMAKE_CUDA_FLAGS_" + CONFIG;
- std::string flags = this->Makefile->GetSafeDefinition("CMAKE_CUDA_FLAGS") +
- " " + this->Makefile->GetSafeDefinition(configFlagsVar);
+ std::string flags;
+ this->LocalGenerator->AddLanguageFlags(flags, this->GeneratorTarget, "CUDA",
+ configName);
this->LocalGenerator->AddCompileOptions(flags, this->GeneratorTarget, "CUDA",
configName);
@@ -3119,11 +3118,9 @@ bool cmVisualStudio10TargetGenerator::ComputeMasmOptions(
this->LocalGenerator, Options::MasmCompiler, gg->GetMasmFlagTable());
Options& masmOptions = *pOptions;
- std::string CONFIG = cmSystemTools::UpperCase(configName);
- std::string configFlagsVar = "CMAKE_ASM_MASM_FLAGS_" + CONFIG;
- std::string flags =
- this->Makefile->GetSafeDefinition("CMAKE_ASM_MASM_FLAGS") + " " +
- this->Makefile->GetSafeDefinition(configFlagsVar);
+ std::string flags;
+ this->LocalGenerator->AddLanguageFlags(flags, this->GeneratorTarget,
+ "ASM_MASM", configName);
masmOptions.Parse(flags);
@@ -3173,12 +3170,11 @@ bool cmVisualStudio10TargetGenerator::ComputeNasmOptions(
this->LocalGenerator, Options::NasmCompiler, gg->GetNasmFlagTable());
Options& nasmOptions = *pOptions;
- std::string CONFIG = cmSystemTools::UpperCase(configName);
- std::string configFlagsVar = "CMAKE_ASM_NASM_FLAGS_" + CONFIG;
- std::string flags =
- this->Makefile->GetSafeDefinition("CMAKE_ASM_NASM_FLAGS") + " -f" +
- this->Makefile->GetSafeDefinition("CMAKE_ASM_NASM_OBJECT_FORMAT") + " " +
- this->Makefile->GetSafeDefinition(configFlagsVar);
+ std::string flags;
+ this->LocalGenerator->AddLanguageFlags(flags, this->GeneratorTarget,
+ "ASM_NASM", configName);
+ flags += " -f";
+ flags += this->Makefile->GetSafeDefinition("CMAKE_ASM_NASM_OBJECT_FORMAT");
nasmOptions.Parse(flags);
// Get includes for this target