Update CMakeLists.txt
Enable c++11 support manually by using the compiler flags.pull/832/head
parent
c53903ff0b
commit
b573676a1b
|
@ -70,10 +70,12 @@ if((CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) AND NOT CMAKE_COMPILER_
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||||
endif()
|
endif()
|
||||||
# hide all not-exported symbols
|
# hide all not-exported symbols
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall" )
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall -std=c++0x" )
|
||||||
elseif(MSVC)
|
elseif(MSVC)
|
||||||
# enable multi-core compilation with MSVC
|
# enable multi-core compilation with MSVC
|
||||||
add_compile_options(/MP)
|
add_compile_options(/MP)
|
||||||
|
elseif ( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall -Wno-long-long -pedantic -std=c++11" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
INCLUDE (FindPkgConfig)
|
INCLUDE (FindPkgConfig)
|
||||||
|
|
Loading…
Reference in New Issue