Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itischler
waLBerla
Commits
6ab19a91
Commit
6ab19a91
authored
May 04, 2021
by
Michael Kuron
Browse files
Actually execute TestStdFilesystem
parent
cd4341a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
6ab19a91
...
...
@@ -475,8 +475,12 @@ endif()
############################################################################################################################
try_compile
(
WALBERLA_USE_STD_FILESYSTEM
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake/TestStdFilesystem.cpp"
COMPILE_DEFINITIONS -DWALBERLA_USE_STD_FILESYSTEM
)
COMPILE_DEFINITIONS -DWALBERLA_USE_STD_FILESYSTEM
COPY_FILE
"
${
CMAKE_CURRENT_BINARY_DIR
}
/TestStdFilesystem"
)
if
(
WALBERLA_USE_STD_FILESYSTEM
)
# detect https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90050 by checking whether it segfaults
execute_process
(
COMMAND
"
${
CMAKE_CURRENT_BINARY_DIR
}
/TestStdFilesystem"
RESULT_VARIABLE WALBERLA_STD_FILESYSTEM_WORKS
)
endif
()
if
(
WALBERLA_USE_STD_FILESYSTEM AND WALBERLA_STD_FILESYSTEM_WORKS EQUAL 0
)
message
(
STATUS
"Found std::filesystem"
)
else
()
try_compile
(
WALBERLA_USE_STD_EXPERIMENTAL_FILESYSTEM
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake/TestStdFilesystem.cpp"
...
...
cmake/TestStdFilesystem.cpp
View file @
6ab19a91
...
...
@@ -5,10 +5,6 @@
#include
<experimental/filesystem>
#endif
#if defined(WALBERLA_USE_STD_FILESYSTEM) && defined(__GLIBCXX__) && (!defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE < 9)
#error "std:filesystem broken due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90050"
#endif
int
main
()
{
#if defined(WALBERLA_USE_STD_FILESYSTEM)
std
::
filesystem
::
path
p
(
"/tmp/test.txt"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment