summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2020-03-13 10:21:05 (GMT)
committerBrad King <brad.king@kitware.com>2020-04-07 13:33:26 (GMT)
commit87e98bf8be8e69b13fe15d5211b2366b5012bb17 (patch)
tree131700370b5bc6882f00c3ba75eed71927fed853
parent60e60b9201f832206324542457e04ce2f7e0afd6 (diff)
downloadCMake-87e98bf8be8e69b13fe15d5211b2366b5012bb17.zip
CMake-87e98bf8be8e69b13fe15d5211b2366b5012bb17.tar.gz
CMake-87e98bf8be8e69b13fe15d5211b2366b5012bb17.tar.bz2
CUDA: Forward CMAKE_CUDA_COMPILER_TARGET in try_compile()
Required for crosscompile support with Clang.
-rw-r--r--Source/cmCoreTryCompile.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 9c26f61..9175dac 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -40,6 +40,8 @@ static std::string const kCMAKE_CXX_LINK_NO_PIE_SUPPORTED =
"CMAKE_CXX_LINK_NO_PIE_SUPPORTED";
static std::string const kCMAKE_CXX_LINK_PIE_SUPPORTED =
"CMAKE_CXX_LINK_PIE_SUPPORTED";
+static std::string const kCMAKE_CUDA_COMPILER_TARGET =
+ "CMAKE_CUDA_COMPILER_TARGET";
static std::string const kCMAKE_ENABLE_EXPORTS = "CMAKE_ENABLE_EXPORTS";
static std::string const kCMAKE_LINK_SEARCH_END_STATIC =
"CMAKE_LINK_SEARCH_END_STATIC";
@@ -711,6 +713,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
vars.insert(kCMAKE_C_COMPILER_TARGET);
vars.insert(kCMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN);
vars.insert(kCMAKE_CXX_COMPILER_TARGET);
+ vars.insert(kCMAKE_CUDA_COMPILER_TARGET);
vars.insert(kCMAKE_ENABLE_EXPORTS);
vars.insert(kCMAKE_LINK_SEARCH_END_STATIC);
vars.insert(kCMAKE_LINK_SEARCH_START_STATIC);