This repository was archived by the owner on Nov 25, 2025. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
192 lines (152 loc) · 4.75 KB
/
Copy pathCMakeLists.txt
File metadata and controls
192 lines (152 loc) · 4.75 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
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
#
# ML is both a package and can be configured and built as it own TriBITS
# project!
#
IF (TRIBITS_PROCESSING_PACKAGE)
#
# A) Define the package
#
TRIBITS_PACKAGE(ML DISABLE_CIRCULAR_REF_DETECTION_FAILURE)
#
# B) Set up package-specific options
#
TRIBITS_ADD_SHOW_DEPRECATED_WARNINGS_OPTION()
IF(${PACKAGE_NAME}_ENABLE_SuperLU)
IF(${PROJECT_NAME}_ENABLE_SuperLU5_API)
MESSAGE(FATAL_ERROR "\n ML CONFIGURATION ERROR: SuperLU_5.0 detected -
only SuperLU version < 5.0 currently supported for this package.\n
Please either use a supported version of SuperLU or disable SuperLU for
this package with the following configuration option:
ML_ENABLE_SuperLU:BOOL=OFF")
ENDIF()
ENDIF()
IF (${PACKAGE_NAME}_ENABLE_Zoltan AND NOT ${PACKAGE_NAME}_ENABLE_MPI)
tribits_disable_optional_dependency( Zoltan
"NOTE: Setting ${PACKAGE_NAME}_ENABLE_Zoltan=OFF since ${PACKAGE_NAME}_ENABLE_MPI='${${PACKAGE_NAME}_ENABLE_MPI}'!")
ENDIF()
TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_Aztec
HAVE_ML_AZTEC
"Enable the Aztec functionality."
OFF )
TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_SuperLU1_0
HAVE_ML_SUPERLU1_0
"Enable the SUPERLU functionality."
OFF )
TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_SuperLU2_0
HAVE_ML_SUPERLU2_0
"Enable the SUPERLU 2.0 functionality."
OFF )
# macro ADD_OPTION_AND_DEFINE should not be used here:
# because SuperLU is a TPL the CMake build system defines ${PACKAGE_NAME}_ENABLE_SuperLU
IF(${PACKAGE_NAME}_ENABLE_SuperLU) #TODO: can it be safely replaced by: SET(HAVE_ML_SUPERLU4_0 "${${PACKAGE_NAME}_ENABLE_SuperLU}") ?
SET(HAVE_ML_SUPERLU4_0 ON)
ELSE()
SET(HAVE_ML_SUPERLU4_0 OFF)
ENDIF()
TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_SUPERLUDIST
HAVE_ML_SUPERLUDIST
"Enable the SUPERLUDIST functionality."
OFF )
TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_Enrich
HAVE_ML_ENRICH
"Enable the Enrich functionality."
OFF )
TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_Memory_Check
HAVE_ML_MEMORY_CHECK
"Enable the memory checking functionality."
OFF )
TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_New_T_PE
HAVE_ML_NEW_T_PE
"Enable the new T PE functionality."
OFF )
TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_Complex_Maxwell
HAVE_ML_COMPLEX_MAXWELL
"Enable the complex Maxwell functionality."
OFF )
TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_Timing
HAVE_ML_TIMING
"Enable the timing functionality."
OFF )
TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_Flops
HAVE_ML_FLOPS
"Enable the flops functionality."
OFF )
TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_MLapi
HAVE_ML_MLAPI
"Enable the ML api."
OFF )
TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_Cfunc
HAVE_ML_CFUNC
"Enable the Cfunc functionality."
OFF )
TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_TekoSmoothers
HAVE_ML_TekoSmoothers
"Enable Teko Smoothing Functionality."
OFF )
# Note: macro HAVE_ML_MATLAB is automatically defined if TPL MATLAB is enabled.
#
# C) Add the libraries, tests, and examples
#
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(matlab)
TRIBITS_ADD_TEST_DIRECTORIES(test)
TRIBITS_ADD_EXAMPLE_DIRECTORIES(examples)
#
# Exclude files for source package.
#
TRIBITS_EXCLUDE_FILES(
util
etc
test/tmp
doc/UsersGuide
doc/DevelopersGuide
doc/MLAPI
python
doc/DoxyfileWeb
doc/build_docs
doc/ml-logo.eps
doc/ml-logo.jpg
doc/sc2000.ps.gz
examples/Makefile-common.include
examples/Maxwell/ml_periodic_max.c
examples/Other/ml_read_complexmaxwell.c
examples/Other/ml_read_maxwell.c
examples/Other/ml_star2d.c
examples/Other/new_readex.c
examples/Other/oldml_readex.c
examples/Other/seg_readex.c
examples/README.AddingExamples
examples/RefMaxwell
examples/RefMaxwell/rpc.cpp
src/Coarsen/README
src/Main/ml_v_cycle.c
src/Smoother/README
src/Utils/jmpilib.c
src/Utils/jostle.h
src/Utils/ml_vampir.c
src/Utils/tumi.c
test/README.runtests
test/Zoltan/cxx_main_simple.cpp
test/scripts
test/scripts/run-tests.sh
)
#
# D) Do standard postprocessing
#
TRIBITS_PACKAGE_POSTPROCESS()
ELSE(TRIBITS_PROCESSING_PACKAGE)
#
# Processing as a TriBITS project
#
# This CMakeLists.txt file is being processed as the TriBITS projects's base
# CMakeLists.txt file! (See comments at bottom of this file.)
CMAKE_MINIMUM_REQUIRED(VERSION 3.10.0 FATAL_ERROR)
INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/ProjectName.cmake")
PROJECT(${PROJECT_NAME} NONE)
SET(${PROJECT_NAME}_TRIBITS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/tribits"
CACHE PATH "By default assume TriBITS Core is snapshotted in ML")
INCLUDE("${${PROJECT_NAME}_TRIBITS_DIR}/TriBITS.cmake")
SET(ML_STANDALONE_PACKAGE TRUE)
SET(ML_ENABLE_Zoltan OFF)
TRIBITS_PROJECT_ENABLE_ALL()
ENDIF(TRIBITS_PROCESSING_PACKAGE)