Better detection of older compilers

This commit is contained in:
casey langen 2022-12-14 18:56:08 -08:00
parent 8a93388a49
commit cebb757e2a

View File

@ -89,7 +89,10 @@ if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
endif() endif()
endif() endif()
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0) if (
(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0) OR
(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
)
message(STATUS "[build] detected old gcc, manually adding -lstdc++fs") message(STATUS "[build] detected old gcc, manually adding -lstdc++fs")
set (musikcube_LINK_LIBS ${musikcube_LINK_LIBS} stdc++fs) set (musikcube_LINK_LIBS ${musikcube_LINK_LIBS} stdc++fs)
endif() endif()