summaryrefslogtreecommitdiffstats
path: root/Source/cmCoreTryCompile.cxx
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2022-06-01 13:20:08 (GMT)
committerRobert Maynard <rmaynard@nvidia.com>2022-06-13 18:56:58 (GMT)
commit6377a43814bb6f3087b731644bb61302a3fc3c55 (patch)
tree8fbf509f2d3d05d74e1b72a4095dcd898a826c37 /Source/cmCoreTryCompile.cxx
parent87273cc9d3b7073a1c175f73b241be16b566b47c (diff)
downloadCMake-6377a43814bb6f3087b731644bb61302a3fc3c55.zip
CMake-6377a43814bb6f3087b731644bb61302a3fc3c55.tar.gz
CMake-6377a43814bb6f3087b731644bb61302a3fc3c55.tar.bz2
CUDA: Support response files with nvcc
Diffstat (limited to 'Source/cmCoreTryCompile.cxx')
-rw-r--r--Source/cmCoreTryCompile.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 1e84a0b..27ff708 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -605,6 +605,15 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
// does not include any system headers anyway.
fprintf(fout,
"set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES \"\")\n");
+
+ // 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");
+ }
}
fprintf(fout, "set(CMAKE_VERBOSE_MAKEFILE 1)\n");
for (std::string const& li : testLangs) {