mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Not sure why c++11 is not respected when compiling for mac
This commit is contained in:
parent
2af80de4ea
commit
7726540de1
|
@ -56,7 +56,7 @@ if(NOT(CMAKE_BUILD_TYPE))
|
|||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.1)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.1 OR TARGET_OS STREQUAL "mac")
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES Clang OR CMAKE_CXX_COMPILER_ID MATCHES GNU)
|
||||
if(CMAKE_CXX_FLAGS)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
|
||||
|
@ -1457,8 +1457,9 @@ foreach(target ${TARGETS_LINK})
|
|||
endforeach()
|
||||
|
||||
foreach(target ${TARGETS_OWN})
|
||||
if(CMAKE_VERSION VERSION_GREATER 3.1 OR CMAKE_VERSION VERSION_EQUAL 3.1)
|
||||
if((CMAKE_VERSION VERSION_GREATER 3.1 OR CMAKE_VERSION VERSION_EQUAL 3.1) AND NOT TARGET_OS STREQUAL "mac")
|
||||
set_property(TARGET ${target} PROPERTY CXX_STANDARD 11)
|
||||
set_property(TARGET ${target} PROPERTY CXX_STANDARD_REQUIRED ON)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
|
|
Loading…
Reference in a new issue