Skip to content

Commit

Permalink
Merge pull request PurpleI2P#1205 from AMDmi3/fix-cpp-lib
Browse files Browse the repository at this point in the history
Limit tampering with standard C++ library to Linux
  • Loading branch information
orignal authored Jun 27, 2018
2 parents a802940 + 41e8ab5 commit c3c2550
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,11 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
endif ()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# more tweaks
if (NOT (MSVC OR MSYS OR APPLE))
if (LINUX)
set (CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -stdlib=libstdc++" ) # required for <atomic>
list(APPEND CMAKE_REQUIRED_LIBRARIES "stdc++") # required to link with -stdlib=libstdc++
endif()
if (NOT (MSVC OR MSYS OR APPLE))
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-const-variable -Wno-overloaded-virtual -Wno-c99-extensions" )
endif()
endif ()
Expand Down

0 comments on commit c3c2550

Please sign in to comment.