CMake: Additional fixes/tweaks for C++11 on macOS
The changes in 0a94c1890f
where an
incomplete solution.
The apple compiler automatically choses libc++ if the deployment target
is >= 10.9. Lower deployment targets need explicit compiler options
to use libc++.
This commit is contained in:
@@ -23,6 +23,14 @@ include(CheckTypeSize)
|
||||
include(CMakePushCheckState)
|
||||
include(TestBigEndian)
|
||||
|
||||
if(
|
||||
APPLE AND
|
||||
CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9 AND
|
||||
(CMAKE_CXX_STANDARD EQUAL 11 OR CMAKE_CXX_STANDARD EQUAL 14)
|
||||
)
|
||||
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-stdlib=libc++")
|
||||
endif()
|
||||
|
||||
# Add a definition to setup.h and append it to a list of defines for
|
||||
# for compile checks
|
||||
macro(wx_setup_definition def)
|
||||
|
Reference in New Issue
Block a user