patch std::filesystem check as done in llnl/umpire pr#784 (#33250)
This commit is contained in:
parent
fa30f74e0c
commit
1f0751defe
@ -54,6 +54,7 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
version("0.1.4", tag="v0.1.4", submodules=True)
|
||||
version("0.1.3", tag="v0.1.3", submodules=True)
|
||||
|
||||
patch("std-filesystem-pr784.patch", when="@2022.03.1 +rocm ^blt@0.5.2:")
|
||||
patch("camp_target_umpire_3.0.0.patch", when="@3.0.0")
|
||||
patch("cmake_version_check.patch", when="@4.1")
|
||||
patch("missing_header_for_numeric_limits.patch", when="@4.1:5.0.1")
|
||||
|
@ -0,0 +1,33 @@
|
||||
diff -ruN spack-src/cmake/SetupCompilerFlags.cmake spack-src-patched/cmake/SetupCompilerFlags.cmake
|
||||
--- spack-src/cmake/SetupCompilerFlags.cmake 2022-10-12 08:05:03.538390165 -0700
|
||||
+++ spack-src-patched/cmake/SetupCompilerFlags.cmake 2022-10-12 09:47:56.317645003 -0700
|
||||
@@ -11,20 +11,20 @@
|
||||
|
||||
message(STATUS "Checking for std::filesystem")
|
||||
|
||||
-include(CheckCXXSourceCompiles)
|
||||
-check_cxx_source_compiles(
|
||||
- "#include <iostream>
|
||||
- #include <filesystem>
|
||||
-
|
||||
- int main(int, char**)
|
||||
- {
|
||||
+blt_check_code_compiles(CODE_COMPILES UMPIRE_ENABLE_FILESYSTEM
|
||||
+ SOURCE_STRING
|
||||
+[=[
|
||||
+#include <iostream>
|
||||
+#include <filesystem>
|
||||
|
||||
+int main(int, char**)
|
||||
+{
|
||||
auto path = std::filesystem::path(\".\");
|
||||
(void)(path);
|
||||
|
||||
return 0;
|
||||
- }"
|
||||
- UMPIRE_ENABLE_FILESYSTEM)
|
||||
+}
|
||||
+]=])
|
||||
|
||||
if (UMPIRE_ENABLE_FILESYSTEM)
|
||||
message(STATUS "std::filesystem found")
|
Loading…
Reference in New Issue
Block a user