Merge pull request #71 from admsyn/fix-cmake-c++11-flag
Use CXX_STANDARD to specify c++11 compile flagspull/5/head
commit
787809178d
|
@ -5,10 +5,12 @@ enable_testing()
|
||||||
|
|
||||||
option(JSON11_BUILD_TESTS "Build unit tests" ON)
|
option(JSON11_BUILD_TESTS "Build unit tests" ON)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
add_library(json11 json11.cpp)
|
add_library(json11 json11.cpp)
|
||||||
target_include_directories(json11 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
target_include_directories(json11 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
target_compile_options(json11
|
target_compile_options(json11
|
||||||
PUBLIC -std=c++11
|
|
||||||
PRIVATE -fno-rtti -fno-exceptions -Wall -Wextra -Werror)
|
PRIVATE -fno-rtti -fno-exceptions -Wall -Wextra -Werror)
|
||||||
configure_file("json11.pc.in" "json11.pc" @ONLY)
|
configure_file("json11.pc.in" "json11.pc" @ONLY)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue