Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using GCC 8, explicitely link stdc++fs #1001

Merged
merged 1 commit into from
Oct 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cmake/SfizzDeps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@ else()
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/fs_std_impl.cpp" "#include <ghc/fs_std_impl.hpp>")
add_library(sfizz_filesystem_impl STATIC "${CMAKE_CURRENT_BINARY_DIR}/fs_std_impl.cpp")
target_include_directories(sfizz_filesystem_impl PUBLIC "external/filesystem/include")
# Add the needed linker option for GCC 8
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU"
AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0
AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
target_link_libraries(sfizz_filesystem_impl PUBLIC stdc++fs)
endif()
#
add_library(sfizz_filesystem INTERFACE)
target_compile_definitions(sfizz_filesystem INTERFACE "GHC_FILESYSTEM_FWD")
Expand Down