-
-
Notifications
You must be signed in to change notification settings - Fork 45
/
CMakeLists.txt
66 lines (50 loc) · 1.64 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Copyright (c) Borislav Stanimirov
# SPDX-License-Identifier: MIT
#
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
project(dynamix
LANGUAGES C CXX
)
# cpm
include(./get_cpm.cmake)
#######################################
# cmake lib
CPMAddPackage(gh:iboB/[email protected])
list(APPEND CMAKE_MODULE_PATH
"${icm_SOURCE_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"
)
set(ICM_DEV_C_STANDARD 11)
set(ICM_DEV_CXX_STANDARD 17)
include(icm_dev_mode)
#######################################
# options
option(BUILD_SHARED_LIBS "DynaMix: build shared libraries" ON)
option(DYNAMIX_STATIC "DynaMix: build dynamix as a static library" OFF)
option(DYNAMIX_BUILD_V1COMPAT "DynaMix: build v1 compatibility lib" ${ICM_DEV_MODE})
option(DYNAMIX_BUILD_TESTS "DynaMix: enable testing and build tests" ${ICM_DEV_MODE})
option(DYNAMIX_BUILD_EXAMPLES "DynaMix: build examples" ${ICM_DEV_MODE})
option(DYNAMIX_BUILD_SCRATCH "DynaMix: build scratch project (dev experiments)" ${ICM_DEV_MODE})
option(DYNAMIX_BUILD_TUTORIALS "DynaMix: build tutorials" ${ICM_DEV_MODE})
option(DYNAMIX_BUILD_BENCH "DynaMix: build benchmarks" ${ICM_DEV_MODE})
# Off by default since it's slow
option(DYNAMIX_BUILD_COMPILER_BENCH "DynaMix: build compilation time benchmarks (may be really slow)" OFF)
#######################################
# code
add_subdirectory(code)
if(DYNAMIX_BUILD_V1COMPAT)
add_subdirectory(v1compat)
endif()
if(DYNAMIX_BUILD_SCRATCH)
add_subdirectory(scratch)
endif()
if(DYNAMIX_BUILD_TESTS)
enable_testing()
add_subdirectory(test)
endif()
if(DYNAMIX_BUILD_BENCH)
add_subdirectory(bench)
endif()
if(DYNAMIX_BUILD_EXAMPLES)
add_subdirectory(example)
endif()