-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathoptions.cmake
More file actions
70 lines (58 loc) · 2.43 KB
/
Copy pathoptions.cmake
File metadata and controls
70 lines (58 loc) · 2.43 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
cmake_host_system_information(RESULT _ramMiB QUERY TOTAL_PHYSICAL_MEMORY)
cmake_host_system_information(RESULT _cpu QUERY PROCESSOR_DESCRIPTION)
math(EXPR _ramGB "${_ramMiB} / 1000")
message(STATUS "${_ramGB} GB RAM detected on ${CMAKE_HOST_SYSTEM_NAME} with ${_cpu}")
if(_ramGB LESS 2)
message(WARNING "Minimum RAM is about 2 GB--some tests or simulations may fail due to small memory (RAM)")
endif()
if(realbits EQUAL 32)
message(VERBOSE " 32-bit real precision")
set(arith s)
else()
message(VERBOSE " 64-bit real precision")
set(realbits 64)
set(arith d)
endif()
# If MPIEXEC is not present, no need to link MPI.
if(NOT DEFINED mpi)
find_program(_mpiexec NAMES mpiexec)
if(_mpiexec)
set(mpi on)
else()
set(mpi off)
endif(_mpiexec)
endif()
option(dev "Gemini developer mode")
option(mpi "Use MPI parallelization")
option(autobuild "autobuild missing Lapack, Scalapack or Mumps" on)
option(hdf5_external "build HDF5 instead of finding")
option(lapack_external "build Lapack instead of finding")
option(scalapack_external "build ScaLapack instead of finding")
option(mumps_external "build MUMPS instead of finding")
option(glow "use NCAR GLOW airglow / aurora model" on)
option(hwm14 "use HWM14 neutral winds model")
option(msis20 "use MSIS 2.0 neutral atmosphere model")
option(hdf5 "use HDF5 file I/O" on)
option(netcdf "use NetCDF file I/O")
# MUMPS build options (only used if auto-building MUMPS)
option(metis "MUMPS: use METIS" off)
option(scotch "MUMPS: use Scotch" off)
option(openmp "MUMPS: use OpenMP" off)
option(python "PyGemini checks")
# Matlab checks take much longer than Python, and Python covers much more
option(matlab "Matlab checks")
if(dev)
set(FETCHCONTENT_SOURCE_DIR_PYGEMINI ${PROJECT_SOURCE_DIR}/../pygemini CACHE PATH "PyGemini developer path")
set(FETCHCONTENT_SOURCE_DIR_MATGEMINI ${PROJECT_SOURCE_DIR}/../mat_gemini CACHE PATH "MatGemini developer path")
else()
set(FETCHCONTENT_UPDATES_DISCONNECTED_GLOW true)
set(FETCHCONTENT_UPDATES_DISCONNECTED_H5FORTRAN true)
set(FETCHCONTENT_UPDATES_DISCONNECTED_HWM14 true)
set(FETCHCONTENT_UPDATES_DISCONNECTED_LAPACK true)
set(FETCHCONTENT_UPDATES_DISCONNECTED_MATGEMINI true)
set(FETCHCONTENT_UPDATES_DISCONNECTED_MSIS2 true)
set(FETCHCONTENT_UPDATES_DISCONNECTED_MUMPS true)
set(FETCHCONTENT_UPDATES_DISCONNECTED_NC4FORTRAN true)
set(FETCHCONTENT_UPDATES_DISCONNECTED_PYGEMINI true)
set(FETCHCONTENT_UPDATES_DISCONNECTED_SCALAPACK true)
endif()