Fixed Xcode detection

This commit is contained in:
Daniel Wolf 2016-09-11 11:21:59 +02:00
parent 5222df725b
commit 12e7a10ab5
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
endif() endif()
# Make sure Xcode uses libc++ instead of libstdc++, allowing us to use the C++14 standard library prior to OS X 10.9 # Make sure Xcode uses libc++ instead of libstdc++, allowing us to use the C++14 standard library prior to OS X 10.9
if("${CMAKE_GENERATOR}" STREQUAL "Xcode") if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
add_compile_options(-stdlib=libc++) add_compile_options(-stdlib=libc++)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
endif() endif()