-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
47 lines (39 loc) · 1.4 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
cmake_minimum_required(VERSION 3.0)
project(arithmetica-tui)
option(BUILD_RELEASE "Build for a GitHub release" ON)
option(BUILD_MAIN_EXECUTABLE "Build the main executable" ON)
option(USE_SUBMODULE_AM_BMO "Fetch arithmetica and basic_math_operations using FetchContent" ON)
option(ARITHMETICA_TUI_TESTS "Build tests" OFF)
if(WIN32 OR USE_SUBMODULE_AM_BMO)
# First fetch the repositories
include(FetchContent)
message(STATUS "Fetching basic_math_operations...")
FetchContent_Declare(bmo
GIT_REPOSITORY https://github.com/avighnac/basic_math_operations
GIT_TAG main
)
FetchContent_GetProperties(bmo)
if(NOT bmo_POPULATED)
message(STATUS "Populating basic_math_operations...")
FetchContent_Populate(bmo)
endif()
message(STATUS "Fetching arithmetica...")
FetchContent_Declare(am
GIT_REPOSITORY https://github.com/arithmetica-org/arithmetica
GIT_TAG main
)
FetchContent_GetProperties(am)
if(NOT am_POPULATED)
message(STATUS "Populating arithmetica...")
FetchContent_Populate(am)
endif()
set(BUILD_BMO OFF)
set(ENABLE_TESTS OFF)
set(BENCHMARK OFF)
include_directories(${am_SOURCE_DIR}/src/library/)
include_directories(${bmo_SOURCE_DIR}/src/library/)
endif()
add_subdirectory(src)
if (ARITHMETICA_TUI_TESTS)
add_subdirectory(tests)
endif()