-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathgauxc-gau2grid.cmake
More file actions
46 lines (32 loc) · 1.56 KB
/
gauxc-gau2grid.cmake
File metadata and controls
46 lines (32 loc) · 1.56 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
if( GAUXC_ENABLE_GAU2GRID )
if( NOT TARGET gau2grid::gg )
# First try to find the package if target doesn't exist
find_package( gau2grid CONFIG QUIET )
if( NOT gau2grid_FOUND )
message( STATUS "Could not find Gau2grid... Building" )
if( GAUXC_FORCE_EXTERNAL_GAU2GRID )
include( gauxc-dep-versions )
message( STATUS "GAU2GRID REPO = ${GAUXC_GAU2GRID_REPOSITORY}" )
message( STATUS "GAU2GRID REV = ${GAUXC_GAU2GRID_REVISION}" )
FetchContent_Declare(
gau2grid
GIT_REPOSITORY ${GAUXC_GAU2GRID_REPOSITORY}
GIT_TAG ${GAUXC_GAU2GRID_REVISION}
)
set( MAX_AM 6 CACHE STRING "" )
set( DISABLE_PRAGMA ON CACHE BOOL "" )
FetchContent_MakeAvailable( gau2grid )
if( NOT TARGET gau2grid::gg )
message( STATUS "Something Went Horribly Wrong With Gau2Grid discovery!" )
endif()
set( GAUXC_HAS_EXT_GG TRUE CACHE BOOL "GauXC is using an external Gau2Grid dependency" FORCE )
else()
message( STATUS "Building Pregenerated Gau2grid" )
add_subdirectory( ${PROJECT_SOURCE_DIR}/external/gau2grid ${PROJECT_BINARY_DIR}/external/gau2grid )
endif()
else()
set( GAUXC_HAS_EXT_GG TRUE CACHE BOOL "GauXC is using an external Gau2Grid dependency" FORCE )
endif() # If not discoverable
endif() # If target not present
set(GAUXC_HAS_GAU2GRID TRUE CACHE BOOL "GauXC has Gau2Grid and will build bindings" FORCE)
endif() # If enabled