Fix build on FreeBSD (#11145)

FreeBSD doesn't use libstdc++, but libc++. stdc++fs doesn't exist in libc++.
This commit is contained in:
pkubaj authored and GitHub committed 2020-03-29 23:36:50 +02:00
1 parent d1faa228c5
commit c8f9324e41
1 file changed
+1 -1
+1 -1
View File
@@ -23,7 +23,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
SET_CHECK_CXX_FLAGS(${PROJECT_NAME})
# GCC / Clang likes us to pass the -lstdc++fs flag to link C++17 filesystem implementation.
if (NOT MINGW)
if (NOT MINGW AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_link_libraries(${PROJECT_NAME} stdc++fs)
endif()