diff options
-rw-r--r-- | Source/cmLocalGenerator.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 3fca2d4..288def1 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 |