From a8025bafc66937a371be7bbb32add9a3ea2e447f Mon Sep 17 00:00:00 2001 From: Stephane Del Pino <stephane.delpino44@gmail.com> Date: Tue, 11 Feb 2020 09:12:00 +0100 Subject: [PATCH] Add missing LD flag --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e88a98990..72fbd8d82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,6 +98,12 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(PUGS_CXX_FLAGS "${PUGS_CXX_FLAGS} -Wsign-compare -Wunused -Wunused-member-function -Wunused-private-field") endif() +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0.0") + set(PUGS_STD_LINK_FLAGS "-lstdc++fs") + endif() +endif() + #------------------------------------------------------ # defaults use of MPI set(PUGS_ENABLE_MPI AUTO CACHE STRING @@ -386,4 +392,5 @@ target_link_libraries( ${MPI_CXX_LINK_FLAGS} ${MPI_CXX_LIBRARIES} ${KOKKOS_CXX_FLAGS} ${OPENMP_LINK_FLAGS} + ${PUGS_STD_LINK_FLAGS} ) -- GitLab