You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set(QE_ENABLE_PLUGINS "" CACHE STRING "Semicolon-separated list of plugins")
118
+
if(FOX_ROOT)
119
+
set(QE_FOX_INTERNAL OFF)
120
+
endif()
121
+
option(QE_FOX_INTERNAL
122
+
"enable FoX intenal library" ON)
123
+
if(WANNIER90_ROOT)
124
+
set(QE_WANNIER90_INTERNAL OFF)
125
+
endif()
126
+
option(QE_WANNIER90_INTERNAL
127
+
"enable Wannier90 intenal library" ON)
128
+
if(MBD_ROOT)
129
+
set(QE_MBD_INTERNAL OFF)
130
+
endif()
131
+
option(QE_MBD_INTERNAL
132
+
"enable LibMBD intenal library" ON)
133
+
if(DEVICEXLIB_ROOT)
134
+
set(QE_DEVICEXLIB_INTERNAL OFF)
135
+
endif()
136
+
option(QE_DEVICEXLIB_INTERNAL
137
+
"enable DeviceXlib intenal library" ON)
138
+
if(ENVIRON_ROOT)
139
+
set(ENVIRON_DEFAULT "EXTERNAL")
140
+
else()
141
+
set(ENVIRON_DEFAULT "NO")
142
+
endif()
143
+
set(QE_ENABLE_ENVIRON "${ENVIRON_DEFAULT}" CACHE
144
+
STRING "select a specific Environ library [NO, EXTERNAL, INTERNAL]")
116
145
117
146
# TODO change all ifdefs throughout code base to match
118
147
# cmake options
@@ -156,6 +185,9 @@ endif()
156
185
if(QE_ENABLE_HDF5)
157
186
qe_add_global_compile_definitions(__HDF5)
158
187
endif()
188
+
if(QE_ENABLE_ENVIRON)
189
+
qe_add_global_compile_definitions(__ENVIRON)
190
+
endif()
159
191
160
192
# Feature checks
161
193
check_function_exists(mallinfo HAVE_MALLINFO)
@@ -182,9 +214,6 @@ endif()
182
214
if(QE_ENABLE_MPI_GPU_AWARE AND NOT (QE_ENABLE_CUDA AND QE_ENABLE_MPI))
183
215
message(FATAL_ERROR "GPU aware MPI requires both MPI and CUDA features enabled")
184
216
endif()
185
-
if(QE_ENABLE_LAXLIB_CUSOLVER AND (NOT QE_ENABLE_CUDA))
186
-
message(FATAL_ERROR "CUDA Solver for LAXLib requires CUDA support, enable it with '-DQE_ENABLE_CUDA=ON' or disable CUDA Solver for LAXLib with '-DQE_ENABLE_LAXLIB_CUSOLVER=OFF'")
187
-
endif()
188
217
# if(QE_ENABLE_HDF5 AND NOT QE_ENABLE_MPI)
189
218
# message(FATAL_ERROR "HDF5 requires MPI support, enable it with '-DQE_ENABLE_MPI=ON' or disable HDF5 with '-DQE_ENABLE_HDF5=OFF'")
190
219
# endif()
@@ -202,6 +231,16 @@ if(NOT QE_ENABLE_SANITIZER STREQUAL "none" AND NOT CMAKE_Fortran_COMPILER_ID MAT
202
231
message(FATAL_ERROR "-DQE_ENABLE_SANITIZER=${QE_ENABLE_SANITIZER} only works with the GNU compiler")
203
232
endif()
204
233
234
+
# valid plugins checks
235
+
set(VALID_QE_PLUGINS "d3q" "pw2qmcpack")
236
+
# Perform sanitizer option check, only works in debug mode
237
+
foreach(PLUGIN IN LISTS QE_ENABLE_PLUGINS)
238
+
if(NOT PLUGIN IN_LIST VALID_QE_PLUGINS)
239
+
message(FATAL_ERROR "Invalid QE plugin ${PLUGIN}, value must be one of \"${VALID_QE_PLUGINS}\".")
0 commit comments