summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-06-05 11:56:11 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-06-05 11:56:19 (GMT)
commitefac04465c96d5e1b244491c79994cc8bb2915d8 (patch)
tree4084011ae412cca5a1fdc8194aa3ebdd5f8d1640 /Source/cmLocalGenerator.cxx
parent4af04586303da6fe0755423728c979aa8c84c301 (diff)
parentb1243201e78b8ee403f1aa696a4a7f6f158caafb (diff)
downloadCMake-efac04465c96d5e1b244491c79994cc8bb2915d8.zip
CMake-efac04465c96d5e1b244491c79994cc8bb2915d8.tar.gz
CMake-efac04465c96d5e1b244491c79994cc8bb2915d8.tar.bz2
Merge topic 'cuda_clang_separable_error'
b1243201e7 CUDA: Don't RunCMake generate separable compilation tests on Clang 1b4c690543 CUDA: Throw error if CUDA_SEPARABLE_COMPILATION is ON when using Clang Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4827
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index f299202..fba9cdb 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1986,6 +1986,19 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags,
}
} else if (lang == "CUDA") {
target->AddCUDAArchitectureFlags(flags);
+
+ std::string const& compiler =
+ this->Makefile->GetSafeDefinition("CMAKE_CUDA_COMPILER_ID");
+
+ if (compiler == "Clang") {
+ bool separable = target->GetPropertyAsBool("CUDA_SEPARABLE_COMPILATION");
+
+ if (separable) {
+ this->Makefile->IssueMessage(
+ MessageType::FATAL_ERROR,
+ "CUDA_SEPARABLE_COMPILATION isn't supported on Clang.");
+ }
+ }
}
// Add MSVC runtime library flags. This is activated by the presence