Browse Source

Merge pull request #1109 from radfish/PR--clang-stdlib-fix

cmake: add stdlib args for clang build on Linux
pull/1119/head
orignal 7 years ago committed by GitHub
parent
commit
5d9bf18267
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      build/CMakeLists.txt

2
build/CMakeLists.txt

@ -184,6 +184,8 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") @@ -184,6 +184,8 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# more tweaks
if (NOT (MSVC OR MSYS OR APPLE))
set (CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -stdlib=libstdc++" ) # required for <atomic>
list(APPEND CMAKE_REQUIRED_LIBRARIES "stdc++") # required to link with -stdlib=libstdc++
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-const-variable -Wno-overloaded-virtual -Wno-c99-extensions" )
endif()
endif ()

Loading…
Cancel
Save