Merge pull request #11233

a16ef4c CMake: link libstdc++fs for GCC <9.0 (jeffro256)

ACKs: jpk68, selsta
This commit is contained in:
tobtoht
2026-09-09 20:21:09 +00:00
+6
View File
@@ -994,6 +994,12 @@ endif()
list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS}) list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS})
# GCC 8.x and earlier require explicit linking for std::filesystem
# See: https://gitlab.kitware.com/cmake/cmake/-/work_items/17834
if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0))
list(APPEND EXTRA_LIBRARIES "stdc++fs")
endif()
if(NOT OPENBSD) if(NOT OPENBSD)
option(USE_READLINE "Build with GNU readline support." ON) option(USE_READLINE "Build with GNU readline support." ON)
endif() endif()