Skip to content

Commit 61e284b

Browse files
committed
fill out options descriptions. simpler cmake if/else/endif syntax.
1 parent ffa254c commit 61e284b

File tree

2 files changed

+38
-33
lines changed

2 files changed

+38
-33
lines changed

CMakeLists.txt

+13-13
Original file line numberDiff line numberDiff line change
@@ -147,42 +147,42 @@ option_with_default(MULTIPOLE_MAX_ORDER
147147
"Maximum order of spherical multipole integrals. There is no maximum" 4)
148148
option_with_default(WITH_ONEBODY_MAX_AM
149149
"Support 1-body ints for Gaussians of angular momentum up to N.
150-
Can specify values for each derivative level as a semicolon-separated string. (default: (libint_max_am/2)+1)" -1)
150+
Can specify values for each derivative level as a semicolon-separated string. (default: max_am)" -1)
151151
option_with_default(WITH_ONEBODY_OPT_AM
152152
"Optimize 1-body ints maximally for up to angular momentum N (N <= max-am).
153-
Can specify values for each derivative level as a semicolon-separated string" -1)
153+
Can specify values for each derivative level as a semicolon-separated string (default: (max_am/2)+1)" -1)
154154

155155
option_with_default(WITH_ERI_MAX_AM
156-
"Support ERIs for Gaussians of angular momentum up to N.
157-
Can specify values for each derivative level as a semicolon-separated string" -1)
156+
"Support 4-center ERIs for Gaussians of angular momentum up to N.
157+
Can specify values for each derivative level as a semicolon-separated string. (default: max_am)" -1)
158158
option_with_default(WITH_ERI_OPT_AM
159-
"Optimize ERIs maximally for up to angular momentum N (N <= max-am).
159+
"Optimize 4-center ERIs maximally for up to angular momentum N (N <= max-am).
160160
Can specify values for each derivative level as a semicolon-separated string (default: (max_am/2)+1)" -1)
161161

162162
option_with_default(WITH_ERI3_MAX_AM
163163
"Support 3-center ERIs for Gaussians of angular momentum up to N.
164-
Can specify values for each derivative level as a semicolon-separated string
164+
Can specify values for each derivative level as a semicolon-separated string. (default: max_am)
165165
Set WITH_MAX_AM to mirror this option." -1)
166166
option_with_default(WITH_ERI3_OPT_AM
167167
"Optimize 3-center ERIs maximally for up to angular momentum N (N <= max-am).
168-
Can specify values for each derivative level as a semicolon-separated string (default: (max_am/2)+1)" -1)
168+
Can specify values for each derivative level as a semicolon-separated string. (default: (max_am/2)+1)" -1)
169169

170170
option_with_default(WITH_ERI2_MAX_AM
171171
"Support 2-center ERIs for Gaussians of angular momentum up to N.
172-
Can specify values for each derivative level as a semicolon-separated string" -1)
172+
Can specify values for each derivative level as a semicolon-separated string. (default: max_am)" -1)
173173
option_with_default(WITH_ERI2_OPT_AM
174174
"Optimize 2-center ERIs maximally for up to angular momentum N (N <= max-am).
175-
Can specify values for each derivative level as a semicolon-separated string" -1)
175+
Can specify values for each derivative level as a semicolon-separated string. (default: (max_am/2)+1)" -1)
176176

177177
option_with_default(WITH_G12_MAX_AM
178-
"Support integrals for G12 methods of angular momentum up to N." -1)
178+
"Support integrals for G12 methods of angular momentum up to N. (default: max_am)" -1)
179179
option_with_default(WITH_G12_OPT_AM
180-
"Optimize G12 integrals for up to angular momentum N (N <= max-am)." -1)
180+
"Optimize G12 integrals for up to angular momentum N (N <= max-am). (default: (max_am/2)+1)" -1)
181181

182182
option_with_default(WITH_G12DKH_MAX_AM
183-
"Support integrals for relativistic G12 methods of angular momentum up to N." -1)
183+
"Support integrals for relativistic G12 methods of angular momentum up to N. (default: max_am)" -1)
184184
option_with_default(WITH_G12DKH_OPT_AM
185-
"Optimize G12DKH integrals for up to angular momentum N (N <= max-am)." -1)
185+
"Optimize G12DKH integrals for up to angular momentum N (N <= max-am). (default: (max_am/2)+1)" -1)
186186

187187
# <<< Miscellaneous >>>
188188

src/lib/libint/CMakeLists.txt.export

+25-20
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if(ENABLE_FORTRAN)
4646
if (CMAKE_Fortran_COMPILER)
4747
enable_language(Fortran)
4848
else()
49-
message(FATAL_ERROR "Given ENABLE_FORTRAN=ON but could not find Fortran compiler, provide via CMAKE_Fortran_COMPILER")
49+
message(FATAL_ERROR "Given ENABLE_FORTRAN=ON but could not find Fortran compiler. Provide via CMAKE_Fortran_COMPILER")
5050
endif()
5151
endif()
5252

@@ -124,7 +124,7 @@ if (TARGET Eigen3::Eigen)
124124
set_property(TARGET libint-Eigen3 PROPERTY
125125
${prop} ${EIGEN3_${prop}})
126126
endforeach()
127-
else (TARGET Eigen3::Eigen)
127+
else()
128128
# otherwise use FindEigen3.cmake module possibly installed somewhere in the path
129129
# but make sure EIGEN3_INCLUDE_DIR exists!
130130
find_package(Eigen3)
@@ -135,31 +135,36 @@ else (TARGET Eigen3::Eigen)
135135
add_library(libint-Eigen3 INTERFACE)
136136
set_property(TARGET libint-Eigen3 PROPERTY
137137
INTERFACE_INCLUDE_DIRECTORIES ${EIGEN3_INCLUDE_DIR})
138-
endif(NOT EXISTS "${EIGEN3_INCLUDE_DIR}")
139-
endif (EIGEN3_FOUND)
140-
endif (TARGET Eigen3::Eigen)
138+
endif()
139+
endif()
140+
endif()
141141
if (TARGET libint-Eigen3)
142142
get_property(EIGEN3_INCLUDE_DIR TARGET libint-Eigen3 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
143143
message(STATUS "Found Eigen3: EIGEN3_INCLUDE_DIR=${EIGEN3_INCLUDE_DIR}")
144-
install(TARGETS libint-Eigen3 EXPORT "${pnv}-targets-static" COMPONENT Eigen3)
145-
endif(TARGET libint-Eigen3)
144+
install(
145+
TARGETS libint-Eigen3
146+
# EXPORT "${pnv}-targets-shared" # LAB must toggle with BUILD_SHARED_LIBS at present
147+
EXPORT "${pnv}-targets-static"
148+
COMPONENT Eigen3
149+
)
150+
endif()
146151

147152
if (TARGET libint-Eigen3)
148153
set(LIBINT_HAS_EIGEN 1)
149154
set(LIBINT_HAS_CXX_API 1)
150-
else(TARGET libint-Eigen3)
155+
else()
151156
set(LIBINT_HAS_CXX_API 0)
152-
endif(TARGET libint-Eigen3)
157+
endif()
153158
if (REQUIRE_CXX_API AND NOT ${LIBINT_HAS_CXX_API})
154159
message(FATAL_ERROR "C++ API cannot be built without Eigen3; configure (via CMake) and install Eigen3 and add the install prefix to CMAKE_PREFIX_PATH, or add -DREQUIRE_CXX_API=OFF to the CMake command line if the C++ API is not required")
155160
endif()
156161

157162
# Python is optional, unless ...
158163
if (ENABLE_FORTRAN) # ... need fortran
159164
find_package(PythonInterp REQUIRED)
160-
else(ENABLE_FORTRAN)
165+
else()
161166
find_package(PythonInterp)
162-
endif(ENABLE_FORTRAN)
167+
endif()
163168

164169
################################# Main Project #################################
165170
include(GNUInstallDirs)
@@ -271,12 +276,12 @@ if (BUILD_SHARED_LIBS)
271276
add_library (int-library ALIAS int-shared)
272277
if (TARGET int-cxx-shared)
273278
add_library (int-cxx-library ALIAS int-cxx-shared)
274-
endif(TARGET int-cxx-shared)
279+
endif()
275280
elseif (BUILD_STATIC_LIBS)
276281
add_library (int-library ALIAS int-static)
277282
if (TARGET int-cxx-static)
278283
add_library (int-cxx-library ALIAS int-cxx-static)
279-
endif(TARGET int-cxx-static)
284+
endif()
280285
endif()
281286

282287
# Legacy (pre-2.7.0) aliases ===========================================================================================
@@ -286,14 +291,14 @@ if (BUILD_SHARED_LIBS)
286291
if (TARGET int-cxx-shared)
287292
add_library (libint2_cxx ALIAS int-cxx-shared)
288293
add_library (Libint2::cxx ALIAS int-cxx-shared)
289-
endif(TARGET int-cxx-shared)
294+
endif()
290295
elseif (BUILD_STATIC_LIBS)
291296
add_library (libint2 ALIAS int-static)
292297
add_library (Libint2::int2 ALIAS int-static)
293298
if (TARGET int-cxx-static)
294299
add_library (libint2_cxx ALIAS int-cxx-static)
295300
add_library (Libint2::cxx ALIAS int-cxx-static)
296-
endif(TARGET int-cxx-static)
301+
endif()
297302
endif()
298303

299304
# Fortran bindings =====================================================================================================
@@ -312,9 +317,9 @@ if (ENABLE_FORTRAN)
312317
check_language(C)
313318
if (CMAKE_C_COMPILER)
314319
enable_language(C)
315-
else(CMAKE_C_COMPILER)
320+
else()
316321
message(FATAL_ERROR "Given ENABLE_FORTRAN=ON but could not find C compiler needed to generate Fortran bindings, provide via CMAKE_C_COMPILER")
317-
endif(CMAKE_C_COMPILER)
322+
endif()
318323

319324
# preprocessed libint.h
320325
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/fortran/libint2.h.i
@@ -361,7 +366,7 @@ if (ENABLE_FORTRAN)
361366
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
362367
)
363368

364-
endif(ENABLE_FORTRAN)
369+
endif()
365370

366371
# <<< Install >>>
367372

@@ -387,7 +392,7 @@ if (BUILD_SHARED_LIBS)
387392
install (TARGETS int-cxx-shared
388393
EXPORT "${pnv}-targets-shared"
389394
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
390-
endif(TARGET int-cxx-shared)
395+
endif()
391396
endif()
392397

393398
if (BUILD_STATIC_LIBS)
@@ -398,7 +403,7 @@ if (BUILD_STATIC_LIBS)
398403
install (TARGETS int-cxx-static
399404
EXPORT "${pnv}-targets-static"
400405
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
401-
endif(TARGET int-cxx-static)
406+
endif()
402407
endif()
403408

404409
# install basis set library

0 commit comments

Comments
 (0)