2018-07-06 10:53:13 +02:00
|
|
|
cmake_minimum_required(VERSION 3.8)
|
2018-07-03 16:35:00 +02:00
|
|
|
|
2018-07-05 16:29:43 +02:00
|
|
|
project(KIMA2)
|
|
|
|
|
2018-07-06 13:29:53 +02:00
|
|
|
set(CMAKE_MODULE_PATH "${CMAKE_HOME_DIRECTORY}/cmake" ${CMAKE_MODULE_PATH})
|
|
|
|
|
2018-07-06 10:53:13 +02:00
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
2018-07-03 16:35:00 +02:00
|
|
|
if(MSVC)
|
|
|
|
add_compile_options(/W4 /WX)
|
|
|
|
else()
|
2018-07-20 11:52:26 +02:00
|
|
|
add_compile_options(-Wall -Wextra -pedantic -Woverloaded-virtual -Wredundant-decls -Wshadow)
|
2018-07-03 16:35:00 +02:00
|
|
|
endif()
|
2018-07-05 16:29:43 +02:00
|
|
|
|
2018-07-05 16:40:45 +02:00
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
2018-07-05 16:29:43 +02:00
|
|
|
|
2018-07-09 16:40:22 +02:00
|
|
|
add_subdirectory(src)
|
2018-07-11 16:08:36 +02:00
|
|
|
|
2018-07-11 16:11:25 +02:00
|
|
|
if(NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE MATCHES Debug)
|
2018-07-11 16:08:36 +02:00
|
|
|
include(CTest)
|
|
|
|
enable_testing()
|
|
|
|
add_subdirectory(test)
|
|
|
|
endif()
|
|
|
|
|