On macOS and FreeBSD libc++ is the default standard library and the -stdlib=libc++ is not required.

https://libcxx.llvm.org/docs/UsingLibcxx.html
This commit is contained in:
Yuchen Deng 2019-08-11 15:44:35 +08:00
parent 15a015aa4e
commit c8e1aace1a

View File

@ -38,13 +38,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") # AN
endif()
if (APPLE AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") # APPLE Clang
target_compile_options(nana PUBLIC -stdlib=libstdc++)
endif ()
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
target_compile_options(nana PRIVATE -fmax-errors=3)
endif()