summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-09-26 13:40:18 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-09-26 13:40:25 (GMT)
commit5d32320bf33bc874d0f0e0c651235fe6472c8013 (patch)
tree92b397f5d36a1ea9998ac125eac7c5de5487766b /Source
parentccd53590033a32f02319ec09d2cf5e8c11c7e62c (diff)
parentfd982eec10840eabcccc1920c7c32eb0a13d65a9 (diff)
downloadCMake-5d32320bf33bc874d0f0e0c651235fe6472c8013.zip
CMake-5d32320bf33bc874d0f0e0c651235fe6472c8013.tar.gz
CMake-5d32320bf33bc874d0f0e0c651235fe6472c8013.tar.bz2
Merge topic 'hip-nvidia'
fd982eec10 HIP: Add tests for special NVIDIA values of CMAKE_HIP_ARCHITECTURES 8c8b3f1bfa HIP: Fix support for -DCMAKE_HIP_ARCHITECTURES=native with NVCC b3e92775ab HIP: Add CMAKE_HIP_HOST_COMPILER when compiler is NVCC e43918b4ca HIP: Fix linking mixed-lang binary with CXX compiler and Makefile generators 4794505122 HIP: Do not require hip-lang package for NVIDIA platform 09d759dc7f HIP: Simplify exclusion of AMD device runtime with NVIDIA GPUs 2a60663670 HIP: Simplify CMAKE_GENERATOR references for determining compiler 8124950f6c CUDA: Generalize CMAKE_{CUDA => <LANG>}_HOST_COMPILER variable docs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8836
Diffstat (limited to 'Source')
-rw-r--r--Source/cmCoreTryCompile.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 0674d5a..ee40bd5 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -732,10 +732,16 @@ cm::optional<cmTryCompileResult> cmCoreTryCompile::TryCompileCode(
// The link and compile lines for ABI detection step need to not use
// response files so we can extract implicit includes given to
// the underlying host compiler
- if (testLangs.find("CUDA") != testLangs.end()) {
- fprintf(fout, "set(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_INCLUDES OFF)\n");
- fprintf(fout, "set(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_LIBRARIES OFF)\n");
- fprintf(fout, "set(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_OBJECTS OFF)\n");
+ static std::array<std::string, 2> const noRSP{ { "CUDA", "HIP" } };
+ for (std::string const& lang : noRSP) {
+ if (testLangs.find(lang) != testLangs.end()) {
+ fprintf(fout, "set(CMAKE_%s_USE_RESPONSE_FILE_FOR_INCLUDES OFF)\n",
+ lang.c_str());
+ fprintf(fout, "set(CMAKE_%s_USE_RESPONSE_FILE_FOR_LIBRARIES OFF)\n",
+ lang.c_str());
+ fprintf(fout, "set(CMAKE_%s_USE_RESPONSE_FILE_FOR_OBJECTS OFF)\n",
+ lang.c_str());
+ }
}
}
fprintf(fout, "set(CMAKE_VERBOSE_MAKEFILE 1)\n");