Commit 6ab19a91 authored by Michael Kuron's avatar Michael Kuron
Browse files

Actually execute TestStdFilesystem

parent cd4341a1
......@@ -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"
......
......@@ -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");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment