Browse Source

Merge topic 'cuda-separable-bool'

08fa0b45 CUDA: Fix boolean interpretation of CUDA_SEPARABLE_COMPILATION
Brad King 8 years ago
parent
commit
48ef9c5ae6
2 changed files with 4 additions and 2 deletions
  1. 2 1
      Source/cmMakefileTargetGenerator.cxx
  2. 2 1
      Source/cmNinjaTargetGenerator.cxx

+ 2 - 1
Source/cmMakefileTargetGenerator.cxx

@@ -590,7 +590,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
     std::vector<std::string> compileCommands;
     if (lang == "CUDA") {
       std::string cmdVar;
-      if (this->GeneratorTarget->GetProperty("CUDA_SEPARABLE_COMPILATION")) {
+      if (this->GeneratorTarget->GetPropertyAsBool(
+            "CUDA_SEPARABLE_COMPILATION")) {
         cmdVar = std::string("CMAKE_CUDA_COMPILE_SEPARABLE_COMPILATION");
       } else {
         cmdVar = std::string("CMAKE_CUDA_COMPILE_WHOLE_COMPILATION");

+ 2 - 1
Source/cmNinjaTargetGenerator.cxx

@@ -580,7 +580,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang)
   std::vector<std::string> compileCmds;
   if (lang == "CUDA") {
     std::string cmdVar;
-    if (this->GeneratorTarget->GetProperty("CUDA_SEPARABLE_COMPILATION")) {
+    if (this->GeneratorTarget->GetPropertyAsBool(
+          "CUDA_SEPARABLE_COMPILATION")) {
       cmdVar = std::string("CMAKE_CUDA_COMPILE_SEPARABLE_COMPILATION");
     } else {
       cmdVar = std::string("CMAKE_CUDA_COMPILE_WHOLE_COMPILATION");