Use CXX_STANDARD to specify c++11 compile flags
parent
fb6cc808e0
commit
580fd44b5f
|
@ -5,10 +5,12 @@ enable_testing()
|
|||
|
||||
option(JSON11_BUILD_TESTS "Build unit tests" ON)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
add_library(json11 json11.cpp)
|
||||
target_include_directories(json11 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_compile_options(json11
|
||||
PUBLIC -std=c++11
|
||||
PRIVATE -fno-rtti -fno-exceptions -Wall -Wextra -Werror)
|
||||
configure_file("json11.pc.in" "json11.pc" @ONLY)
|
||||
|
||||
|
|
Loading…
Reference in New Issue