From 2136269175e5bc45a703d11a13a7fdf70ace877c Mon Sep 17 00:00:00 2001 From: "mhochsteger@cerbsim.com" Date: Mon, 14 Mar 2022 18:10:47 +0100 Subject: [PATCH] Link libstdc++fs when compiling with gcc 8 --- libsrc/core/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libsrc/core/CMakeLists.txt b/libsrc/core/CMakeLists.txt index 190de2dc..823efa84 100644 --- a/libsrc/core/CMakeLists.txt +++ b/libsrc/core/CMakeLists.txt @@ -20,6 +20,9 @@ target_compile_options(ngcore PUBLIC "${NG_COMPILE_FLAGS}") if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") target_compile_options(ngcore PUBLIC -fsized-deallocation -faligned-allocation) endif() +if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9) + target_link_libraries(ngcore PUBLIC stdc++fs) +endif() if(USE_PYTHON) target_sources(ngcore PRIVATE python_ngcore.cpp)