Skip to content

Commit

Permalink
[boost 1.74] set -std=c++11 & libc++ for apple clang
Browse files Browse the repository at this point in the history
  • Loading branch information
niclar committed Oct 19, 2020
1 parent 5c28eb3 commit fcbee3a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ports/boost-modular-build-helper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ endif()
if(NOT CFLAGS STREQUAL "")
string(REPLACE " " " <cflags>" CFLAGS "<cflags>${CFLAGS}")
endif()
if(NOT LDLAGS STREQUAL "")
if(NOT LDFLAGS STREQUAL "")
string(REPLACE " " " <linkflags>" LDFLAGS "<linkflags>${LDFLAGS}")
endif()

Expand All @@ -113,7 +113,8 @@ foreach(INCDIR ${CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES})
endforeach()

if(APPLE)
set(CXXFLAGS "${CXXFLAGS} <compileflags>-D_DARWIN_C_SOURCE")
set(CXXFLAGS "${CXXFLAGS} <compileflags>-D_DARWIN_C_SOURCE <compileflags>-std=c++11 <compileflags>-stdlib=libc++")
set(LDFLAGS "${LDFLAGS} <linkflags>-stdlib=libc++"
endif()

find_library(ZLIB_LIBPATH z)
Expand Down

0 comments on commit fcbee3a

Please sign in to comment.