Skip to content
Snippets Groups Projects
Commit 0d098851 authored by Dilawar Singh's avatar Dilawar Singh
Browse files

updated apple-clang flags in compiler. Fix to missing symbols from stl.

parent f68eadb5
No related branches found
No related tags found
No related merge requests found
......@@ -5,8 +5,6 @@ CHECK_CXX_COMPILER_FLAG( "-std=c++11" COMPILER_SUPPORTS_CXX11 )
CHECK_CXX_COMPILER_FLAG( "-std=c++0x" COMPILER_SUPPORTS_CXX0X )
CHECK_CXX_COMPILER_FLAG( "-Wno-strict-aliasing" COMPILER_WARNS_STRICT_ALIASING )
# Turn warning to error: Not all of the options may be supported on all
# versions of compilers. be careful here.
add_definitions(-Wall
......@@ -32,11 +30,17 @@ if(COMPILER_SUPPORTS_CXX11)
message(STATUS "Your compiler supports c++11 features. Enabling it")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_definitions( -DENABLE_CPP11 )
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++11" )
endif(APPLE)
elseif(COMPILER_SUPPORTS_CXX0X)
message(STATUS "Your compiler supports c++0x features. Enabling it")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
add_definitions( -DENABLE_CXX11 )
add_definitions( -DBOOST_NO_CXX11_SCOPED_ENUMS -DBOOST_NO_SCOPED_ENUMS )
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++11" )
endif(APPLE)
else()
add_definitions( -DBOOST_NO_CXX11_SCOPED_ENUMS -DBOOST_NO_SCOPED_ENUMS )
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support.")
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment