Commit b57103fe authored by gbalduzz's avatar gbalduzz
Browse files

link to std::filesystem only if separate library

parent 0bfb8dd9
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -142,7 +142,6 @@ set(DCA_LIBS
  signals
  symmetrization
  coarsegraining
  stdc++fs # std::filesystem
  ${DCA_CONCURRENCY_LIB}
  ${DCA_THREADING_LIBS}
  lapack
+6 −1
Original line number Diff line number Diff line
@@ -2,4 +2,9 @@

add_library(dca_hdf5 STATIC hdf5_reader.cpp hdf5_writer.cpp)
target_include_directories(dca_hdf5 PUBLIC ${HDF5_INCLUDE_DIRS})
target_link_libraries(dca_hdf5 PUBLIC ${HDF5_LIBRARIES}; stdc++fs)
target_link_libraries(dca_hdf5 PUBLIC ${HDF5_LIBRARIES})

# Only GCC < 9 needs to link to a separate filesystem library
target_link_libraries(dca_hdf5 PUBLIC
  $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>
)