Repository navigation
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
77 lines (60 loc) · 1.87 KB
/
Copy pathCMakeLists.txt
File metadata and controls
77 lines (60 loc) · 1.87 KB
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
70
71
72
73
74
75
76
77
cmake_minimum_required(VERSION 3.25...4.5)
# CMake >= 3.25 as Gemini3D and other subprojects require it for packaging and block()
project(GemCI
LANGUAGES C CXX Fortran
HOMEPAGE_URL https://github.com/gemini3d/gemci
DESCRIPTION "Long-running Gemini3D test cases"
VERSION 1.0.0
)
set(DART_TESTING_TIMEOUT 10000)
# set arbitrarily large timeout--must set DART_TESTING_TIMEOUT before CTest.
# This takes effect if --timeout or preset doesn't specify timeout.
include(CTest)
include(options.cmake)
file(GENERATE OUTPUT .gitignore CONTENT "*")
# Gemini3D subproject
include(cmake/gemini3d.cmake)
# GemCI main script follows.
# GEMINI_CIROOT at initial superproject configure for better UX (it's orthogonal to Gemini3D)
include(cmake/get_simroot.cmake)
message(STATUS "simulation root directory ${GEMINI_CIROOT}")
# ensure needed libraries are available
find_program(MPIEXEC_EXECUTABLE
NAMES mpiexec
HINTS ${MPI_ROOT} ENV MPI_ROOT ENV I_MPI_ROOT
PATHS /usr/lib64
PATH_SUFFIXES bin openmpi/bin mpich/bin
DOC "Runs an MPI program"
REQUIRED
)
# --- helper functions
include(cmake/ParseNml.cmake)
include(cmake/GetEquil.cmake)
include(cmake/InputSetup.cmake)
include(cmake/ModelSetup.cmake)
include(cmake/GeminiRun.cmake)
include(cmake/GeminiCompare.cmake)
include(cmake/GeminiPlot.cmake)
include(cmake/GeminiPackage.cmake)
# --- top level directories
set(ci_root ${PROJECT_SOURCE_DIR}/cfg)
set(ref_root ${GEMINI_CIROOT}/test_ref)
# --- measure system physical RAM
cmake_host_system_information(RESULT host_ramMB QUERY TOTAL_PHYSICAL_MEMORY)
if(NOT DEFINED low_ram)
set(low_ram false)
if(host_ramMB LESS 18000)
# 18 GB: the 3D Matlab plots use 9GB RAM each
set(low_ram true)
endif()
endif()
# --- PyGemini
if(gemini3d_python)
include(cmake/python.cmake)
endif()
# --- MatGemini
if(gemini3d_matlab)
include(cmake/matlab.cmake)
endif()
include(cmake/MatlabTest.cmake)
add_subdirectory(src)