-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
35 lines (26 loc) · 969 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
cmake_minimum_required(VERSION 3.15)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
project(ss CXX)
add_library(ss INTERFACE)
set(SS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ss)
set(SS_INCLUDE_DIR ${SS_DIR}/include)
set(SS_BINARY_DIR "${PROJECT_BINARY_DIR}")
include(Configuration)
target_include_directories(ss INTERFACE ${SS_INCLUDE_DIR})
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(ss INTERFACE -fconcepts)
elseif (MSVC)
target_compile_options(ss INTERFACE /Zc:__cplusplus)
target_compile_options(ss INTERFACE /Zc:ternary)
target_compile_options(ss INTERFACE /permissive-)
endif ()
option(SS_TEST "Run test" OFF)
option(SS_TEST_MATRIX "If running in github workflow with matrix" OFF)
if (SS_TEST)
enable_testing()
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test)
endif()
option(SS_GENERATE_DOCS "Generate status documents" OFF)
if (SS_GENERATE_DOCS)
add_subdirectory(tools/generate_doc)
endif()