-
Notifications
You must be signed in to change notification settings - Fork 19
/
CMakeLists.txt
109 lines (99 loc) · 3.63 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# This file is autogenerated by Autocmake v1.0.0-alpha-x http://autocmake.org
# Copyright (c) 2015-2018 by Radovan Bast, Roberto Di Remigio, Jonas Juselius, and contributors.
# set minimum cmake version
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
# project name
project(gimic Fortran C CXX)
# do not rebuild if rules (compiler flags) change
set(CMAKE_SKIP_RULE_DEPENDENCY TRUE)
# if CMAKE_BUILD_TYPE undefined, we set it to Release
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
# Options handling utilities
include(CMakeParseArguments)
include(CMakeDependentOption)
# Macro for printing an option in a consistent manner
# Written by Lori A. Burns (@loriab) and Ryan M. Richard (@ryanmrichard)
# Syntax: print_option(NAME <option to print> DEFAULT <was specified>)
macro(print_option)
set(options)
set(oneValueArgs NAME DEFAULT)
set(multiValueArgs)
cmake_parse_arguments(print_option
"${options}"
"${oneValueArgs}"
"${multiValueArgs}"
${ARGN}
)
if(NOT DEFINED ${print_option_NAME} OR "${${print_option_NAME}}" STREQUAL "")
message(STATUS "Setting (unspecified) option ${print_option_NAME}: ${print_option_DEFAULT}")
else()
message(STATUS "Setting option ${print_option_NAME}: ${print_option_DEFAULT}")
endif()
endmacro()
# Wraps an option with default ON/OFF. Adds nice messaging to option()
# Written by Lori A. Burns (@loriab) and Ryan M. Richard (@ryanmrichard)
# Syntax: option_with_print(NAME <option name> MESSAGE <description> DEFAULT <default value>)
macro(option_with_print)
set(options)
set(oneValueArgs NAME MESSAGE DEFAULT)
set(multiValueArgs)
cmake_parse_arguments(option_with_print
"${options}"
"${oneValueArgs}"
"${multiValueArgs}"
${ARGN}
)
print_option(
NAME ${option_with_print_NAME}
DEFAULT ${option_with_print_DEFAULT}
)
option(${option_with_print_NAME} ${option_with_print_MESSAGE} ${option_with_print_DEFAULT})
endmacro()
# Wraps an option with a default other than ON/OFF and prints it
# Written by Lori A. Burns (@loriab) and Ryan M. Richard (@ryanmrichard)
# NOTE: Can't combine with above b/c CMake handles ON/OFF options specially
# NOTE2: CMake variables are always defined so need to further check for if
# they are the NULL string. This is also why we need the force
# Syntax: option_with_default(NAME <option name> MESSAGE <description> DEFAULT <default value>)
macro(option_with_default)
set(options)
set(oneValueArgs NAME MESSAGE DEFAULT)
set(multiValueArgs)
cmake_parse_arguments(option_with_default
"${options}"
"${oneValueArgs}"
"${multiValueArgs}"
${ARGN}
)
print_option(
NAME ${option_with_default_NAME}
DEFAULT "${option_with_default_DEFAULT}"
)
if(NOT DEFINED ${option_with_default_NAME} OR "${${option_with_default_NAME}}" STREQUAL "")
set(${option_with_default_NAME} "${option_with_default_DEFAULT}" CACHE STRING ${option_with_default_MESSAGE} FORCE)
endif()
endmacro()
# directories which hold included cmake modules
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/custom)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/downloaded)
find_package(Python3 COMPONENTS Interpreter Development NumPy)
include_directories(${Python3_INCLUDE_DIRS})
include_directories(${Python3_NumPy_INCLUDE_DIRS})
# included cmake modules
include(rpath-workaround)
include(autocmake_fc)
include(autocmake_cc)
include(autocmake_cxx)
include(autocmake_GNU.CXX)
include(autocmake_Intel.CXX)
include(autocmake_omp)
include(autocmake_mpi)
include(autocmake_code_coverage)
include(autocmake_safeguards)
include(autocmake_blas)
include(autocmake_lapack)
include(own)
include(driver)
include(autocmake_src)