-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
44 lines (34 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
cmake_minimum_required(VERSION 3.14...3.27)
project(machine-learning
LANGUAGES CXX
DESCRIPTION "ML sandbox first attempt.")
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Begin of gitache configuration.
include(FetchContent)
set(GITACHE_PACKAGES libcwd_r)
FetchContent_Declare(
gitache
GIT_REPOSITORY "https://github.com/CarloWood/gitache.git"
GIT_TAG "master"
)
FetchContent_MakeAvailable(gitache)
# If a local gitache submodule is present then use that rather than downloading one.
if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/gitache/.git)
# This will disable the use of the GIT_REPOSITORY/GIT_TAG below, and disable the
# FetchContent- download and update step. Instead, use the gitache submodule as-is.
set(FETCHCONTENT_SOURCE_DIR_GITACHE "${CMAKE_CURRENT_LIST_DIR}/gitache" CACHE INTERNAL "" FORCE)
endif ()
# End of gitache configuration.
# This project uses aicxx modules.
include(cwm4/cmake/AICxxProject NO_POLICY_SCOPE)
# This project uses boost filesystem.
find_package(Boost REQUIRED COMPONENTS filesystem)
# Exit if someone tries to contaminates the source directory with an in-source build.
if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(FATAL_ERROR "Please do out-of-source builds.\nCleanup: \"rm -rf CMake CMakeCache.txt CMakeFiles/\"")
endif()
include(AICxxSubmodules)
add_subdirectory(gnuplot_i)
add_subdirectory(src)