osx: Specify minimum version for C files too

This commit is contained in:
Florent Castelli 2016-10-13 16:02:38 +02:00
parent b61ebea408
commit 9623611427

View File

@ -187,6 +187,7 @@ if(NOT MSVC)
if(IOS)
elseif(APPLE AND NOT CMAKE_CROSSCOMPILING)
# We want C++11, so target 10.7+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.7")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7 -stdlib=libc++ -U__STRICT_ANSI__")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
else()