diff --git a/dart/optimizer/pagmo/CMakeLists.txt b/dart/optimizer/pagmo/CMakeLists.txt index 455bed947324a..b1dac756b1160 100644 --- a/dart/optimizer/pagmo/CMakeLists.txt +++ b/dart/optimizer/pagmo/CMakeLists.txt @@ -21,6 +21,9 @@ set(component_name optimizer-pagmo) # Add target dart_add_library(${target_name} ${hdrs} ${srcs}) target_link_libraries(${target_name} PUBLIC dart Pagmo::pagmo) +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9) + target_link_libraries(${target_name} PUBLIC stdc++fs) +endif() # Thread if(THREADS_HAVE_PTHREAD_ARG)