summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-02-20 22:05:35 (GMT)
committerBrad King <brad.king@kitware.com>2017-02-20 22:05:35 (GMT)
commit08fa0b4595566a6e4c29c182865a6ec7e41d9e2e (patch)
treecf4144d2b0ce9078b333205951f687970511cb61 /Source/cmMakefileTargetGenerator.cxx
parent6cbad490c2fdbd9bdc67b406b9f2dcdc21e08ddb (diff)
downloadCMake-08fa0b4595566a6e4c29c182865a6ec7e41d9e2e.zip
CMake-08fa0b4595566a6e4c29c182865a6ec7e41d9e2e.tar.gz
CMake-08fa0b4595566a6e4c29c182865a6ec7e41d9e2e.tar.bz2
CUDA: Fix boolean interpretation of CUDA_SEPARABLE_COMPILATION
If the property is explicitly set to a non-true value we should not treat it as true.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 866c132..54b3f36 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/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");