mstch/CMakeLists.txt

24 lines
530 B
CMake
Raw Normal View History

2015-09-30 16:34:36 +02:00
cmake_minimum_required(VERSION 3.0.2)
2015-04-09 20:41:27 +02:00
project(mstch)
2015-04-12 16:13:21 +02:00
option (WITH_UNIT_TESTS "enable building unit test executable" OFF)
2015-09-24 11:43:27 +02:00
2015-09-24 11:51:00 +02:00
set(CMAKE_INCLUDE_CURRENT_DIR ON)
2015-09-30 16:30:19 +02:00
set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
2015-09-24 11:43:27 +02:00
set(CMAKE_BUILD_TYPE Release)
2015-09-30 17:10:44 +02:00
set(mstch_VERSION 0.2.3)
2015-09-30 16:30:19 +02:00
2015-09-24 11:43:27 +02:00
if(NOT MSVC)
2015-09-30 16:30:19 +02:00
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -O3")
2015-09-24 11:43:27 +02:00
endif()
2015-04-12 15:25:16 +02:00
add_subdirectory(src)
2015-09-30 16:30:19 +02:00
2015-04-12 16:13:21 +02:00
if(WITH_UNIT_TESTS)
2015-04-23 12:54:08 +02:00
enable_testing()
2015-05-05 09:03:27 +02:00
include_directories(
2015-09-30 16:30:19 +02:00
vendor/Catch/single_include
vendor/json.hpp/include)
2015-04-23 12:54:08 +02:00
add_subdirectory(test)
2015-04-12 16:13:21 +02:00
endif()