2015-04-27 05:56:42 +08:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
2015-04-27 04:47:40 +08:00
|
|
|
|
|
|
|
project(json CXX)
|
|
|
|
|
|
|
|
add_executable(json_unit
|
|
|
|
src/json.hpp test/catch.hpp test/unit.cpp
|
|
|
|
)
|
|
|
|
|
2015-04-28 04:53:46 +08:00
|
|
|
if(MSVC)
|
|
|
|
set(CMAKE_CXX_FLAGS
|
2015-07-17 01:32:19 +08:00
|
|
|
"/EHsc"
|
2015-04-28 04:53:46 +08:00
|
|
|
)
|
2015-07-17 01:32:19 +08:00
|
|
|
|
2015-07-17 01:39:18 +08:00
|
|
|
STRING(REPLACE "/O2" "/Od" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
|
2015-07-17 01:32:19 +08:00
|
|
|
|
2015-06-20 20:16:57 +08:00
|
|
|
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
|
2015-04-28 04:53:46 +08:00
|
|
|
else(MSVC)
|
|
|
|
set(CMAKE_CXX_FLAGS
|
|
|
|
"-std=c++11 -stdlib=libc++"
|
|
|
|
)
|
|
|
|
endif(MSVC)
|
2015-04-27 04:47:40 +08:00
|
|
|
|
|
|
|
include_directories(
|
|
|
|
src test
|
|
|
|
)
|