Update d/p/0004-Fix-hip-implicit-include-dirs.patch
This commit is contained in:
parent
f99a170d60
commit
7d3e6a7163
@ -14,27 +14,28 @@ __clang_hip_runtime_wrapper.h
|
|||||||
|
|
||||||
Bug: https://gitlab.kitware.com/cmake/cmake/-/issues/24562
|
Bug: https://gitlab.kitware.com/cmake/cmake/-/issues/24562
|
||||||
Bug-Debian: https://bugs.debian.org/1031799
|
Bug-Debian: https://bugs.debian.org/1031799
|
||||||
Forwarded: no
|
Forwarded: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8534
|
||||||
---
|
---
|
||||||
Source/cmLocalGenerator.cxx | 10 ++++++++++
|
Source/cmLocalGenerator.cxx | 11 +++++++++++
|
||||||
1 file changed, 10 insertions(+)
|
1 file changed, 11 insertions(+)
|
||||||
|
|
||||||
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
|
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
|
||||||
index 75ec694..8f09e0f 100644
|
index 75ec694..68ff7ea 100644
|
||||||
--- a/Source/cmLocalGenerator.cxx
|
--- a/Source/cmLocalGenerator.cxx
|
||||||
+++ b/Source/cmLocalGenerator.cxx
|
+++ b/Source/cmLocalGenerator.cxx
|
||||||
@@ -1190,6 +1190,16 @@ std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectoriesImplicit(
|
@@ -1190,6 +1190,17 @@ std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectoriesImplicit(
|
||||||
cmSystemTools::ConvertToUnixSlashes(impDirVec[i]);
|
cmSystemTools::ConvertToUnixSlashes(impDirVec[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ // The CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES are computed using
|
+ // The CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES are computed using
|
||||||
+ // try_compile in CMAKE_DETERMINE_COMPILER_ABI, but the implicit include
|
+ // try_compile in CMAKE_DETERMINE_COMPILER_ABI, but the implicit include
|
||||||
+ // directories aren't known during that try_compile. This can be a
|
+ // directories are not known during that try_compile. This can be a
|
||||||
+ // problem when the HIP runtime include path is /usr/include, because the
|
+ // problem when the HIP runtime include path is /usr/include because the
|
||||||
+ // runtime include path is always added to the userDirs and the compiler
|
+ // runtime include path is always added to the userDirs and the compiler
|
||||||
+ // includes standard library headers via __clang_hip_runtime_wrapper.h
|
+ // includes standard library headers via "__clang_hip_runtime_wrapper.h".
|
||||||
+ if (lang == "HIP" && impDirVec.size() == impDirVecOldSize) {
|
+ if (lang == "HIP" && impDirVec.size() == impDirVecOldSize &&
|
||||||
|
+ !cm::contains(impDirVec, "/usr/include")) {
|
||||||
+ implicitExclude.emplace("/usr/include");
|
+ implicitExclude.emplace("/usr/include");
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user