diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2022-06-27 14:47:02 (GMT) |
---|---|---|
committer | Robert Maynard <rmaynard@nvidia.com> | 2022-08-18 14:37:06 (GMT) |
commit | ea659b155ddcdfb24e93b0d664e1cb67fef6d8a4 (patch) | |
tree | 756316d4a11b4c9880f21218070e7dc7b6dbfdd9 /Source/cmGlobalGenerator.cxx | |
parent | 9ce5018be9f8ffd2bcfda00b9c1b81d3401e20ba (diff) | |
download | CMake-ea659b155ddcdfb24e93b0d664e1cb67fef6d8a4.zip CMake-ea659b155ddcdfb24e93b0d664e1cb67fef6d8a4.tar.gz CMake-ea659b155ddcdfb24e93b0d664e1cb67fef6d8a4.tar.bz2 |
CUDA: Always mark cuda toolkit as system include
Fixes: #23731
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 4feae6d..07ad1e8 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1854,6 +1854,15 @@ void cmGlobalGenerator::FinalizeTargetCompileInfo() cmExpandedList(standardIncludesStr); standardIncludesSet.insert(standardIncludesVec.begin(), standardIncludesVec.end()); + if (li == "CUDA") { + std::string const& cudaSystemIncludeVar = + mf->GetSafeDefinition("CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES"); + std::vector<std::string> cudaToolkitIncludeVec = + cmExpandedList(cudaSystemIncludeVar); + standardIncludesSet.insert(cudaToolkitIncludeVec.begin(), + cudaToolkitIncludeVec.end()); + mf->AddIncludeDirectories(cudaToolkitIncludeVec); + } } mf->AddSystemIncludeDirectories(standardIncludesSet); } |