#669 Added DXX11 and LIBCXX11 options
This commit is contained in:
parent
8216e98afd
commit
6ac8d017b7
1 changed files with 16 additions and 0 deletions
|
|
@ -65,6 +65,22 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
|
||||
endif()
|
||||
|
||||
#
|
||||
# Handle C++11.
|
||||
# Usage: cmake -DCXX11=1 .
|
||||
#
|
||||
if (CXX11)
|
||||
message("Using C++11")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
if(APPLE)
|
||||
set(LIBCXX11 1)
|
||||
endif()
|
||||
endif()
|
||||
if(APPLE AND LIBCXX11)
|
||||
message("Using libc++")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
endif()
|
||||
|
||||
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG")
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Reference in a new issue