forked from AlTarFramework/altar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
69 lines (58 loc) · 1.53 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
67
68
69
# -*- cmake -*-
#
# michael a.g. aïvázis <michael.aivazis@para-sim.com>
# (c) 2003-2020 all rights reserved
# cmake setup
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
# policies
if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif(POLICY CMP0048)
cmake_policy(SET CMP0060 NEW)
if (POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif(POLICY CMP0074)
if (POLICY CMP0076)
cmake_policy(SET CMP0076 NEW)
endif(POLICY CMP0076)
# options
option(WITH_CUDA "enable support for CUDA" OFF)
# adjust the include path
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/.cmake)
# get support
include(altar_init)
# ask git for the altar version
altar_getVersion()
# set up the project
project(ALTAR VERSION ${REPO_MAJOR}.${REPO_MINOR}.${REPO_MICRO} LANGUAGES CXX)
# packages
# gsl
find_package(GSL)
# mpi
find_package(MPI)
# python
set(PYTHON_COMPONENTS Interpreter Development)
if(GSL_FOUND)
list(APPEND PYTHON_COMPONENTS NumPy)
endif()
find_package(Python3 REQUIRED COMPONENTS ${PYTHON_COMPONENTS})
# set up cmake
altar_cmakeInit()
# set up c++
altar_cxxInit()
# set up python
altar_pythonInit()
# initialize the variables that describe the staging directory layout
altar_stagingInit()
# initialize the variables that describe the install directory layout
altar_destinationInit()
# build the framework
add_subdirectory(altar)
# build the models
add_subdirectory(models/emhp)
add_subdirectory(models/gaussian)
add_subdirectory(models/mogi)
add_subdirectory(models/cdm)
add_subdirectory(models/linear)
add_subdirectory(models/reverso)
# end of file