Browse Source

Merge pull request #71 from admsyn/fix-cmake-c++11-flag

Use CXX_STANDARD to specify c++11 compile flags
master
Andrew Twyman 6 years ago
committed by GitHub
parent
commit
787809178d
  1. 4
      CMakeLists.txt

4
CMakeLists.txt

@ -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…
Cancel
Save