Update CMakeLists to 3.x style
parent
afcc8d0d82
commit
5e664c99d8
|
@ -1,21 +1,14 @@
|
||||||
project(json11)
|
project(json11 CXX)
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.8)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|
||||||
add_definitions(
|
add_library(json11 json11.cpp)
|
||||||
-std=c++11
|
target_include_directories(json11 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
-fno-rtti
|
target_compile_options(json11
|
||||||
-fno-exceptions
|
PUBLIC -std=c++11
|
||||||
-Wall
|
PRIVATE -fno-rtti -fno-exceptions -Wall -Wextra -Werror)
|
||||||
-Wextra
|
|
||||||
-Werror)
|
|
||||||
|
|
||||||
set(json11_SRCS json11.cpp)
|
add_executable(json11_test test.cpp)
|
||||||
|
target_link_libraries(json11_test json11)
|
||||||
add_library(json11 STATIC ${json11_SRCS})
|
|
||||||
|
|
||||||
add_test(json11_test json11_test)
|
|
||||||
|
|
||||||
add_executable(json11_test ${json11_SRCS} test.cpp)
|
|
||||||
|
|
Loading…
Reference in New Issue