2015-04-12 14:13:21 +00:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
2015-04-09 18:41:27 +00:00
|
|
|
project(mstch)
|
2015-04-12 14:13:21 +00:00
|
|
|
option (WITH_UNIT_TESTS "enable building unit test executable" OFF)
|
2015-09-24 09:43:27 +00:00
|
|
|
|
2015-09-24 09:51:00 +00:00
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
2015-09-24 09:43:27 +00:00
|
|
|
set(CMAKE_BUILD_TYPE Release)
|
|
|
|
|
|
|
|
if(NOT MSVC)
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -O3")
|
|
|
|
endif()
|
|
|
|
|
2015-04-12 13:25:16 +00:00
|
|
|
add_subdirectory(src)
|
2015-04-12 14:13:21 +00:00
|
|
|
if(WITH_UNIT_TESTS)
|
2015-04-23 10:54:08 +00:00
|
|
|
enable_testing()
|
2015-05-05 07:03:27 +00:00
|
|
|
include_directories(
|
|
|
|
vendor/Catch/single_include
|
|
|
|
vendor/json.hpp/include)
|
2015-04-23 10:54:08 +00:00
|
|
|
add_subdirectory(test)
|
2015-04-12 14:13:21 +00:00
|
|
|
endif()
|