2018-04-29 12:34:02 +00:00
|
|
|
cmake_minimum_required(VERSION 3.2)
|
2018-03-26 12:02:43 +00:00
|
|
|
project(nameof)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
2018-04-08 17:27:41 +00:00
|
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
2018-03-26 12:02:43 +00:00
|
|
|
|
2018-03-28 08:54:21 +00:00
|
|
|
if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
2018-04-04 12:19:02 +00:00
|
|
|
add_compile_options(-Wall -Wextra -pedantic)
|
2018-03-28 08:54:21 +00:00
|
|
|
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
2018-04-08 17:27:41 +00:00
|
|
|
add_compile_options(/W4 /permissive-)
|
2018-03-28 08:54:21 +00:00
|
|
|
endif()
|
2018-03-27 09:03:12 +00:00
|
|
|
|
2018-03-26 12:02:43 +00:00
|
|
|
add_subdirectory(example)
|
2018-03-28 08:54:21 +00:00
|
|
|
|
|
|
|
enable_testing()
|
2018-04-14 19:52:48 +00:00
|
|
|
add_subdirectory(test)
|