diff --git a/CMakeLists.txt b/CMakeLists.txt index 94efc973..2c3c287c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,7 +59,7 @@ set( GAUXC_HAS_CUDA FALSE CACHE BOOL "" FORCE ) set( GAUXC_HAS_HIP FALSE CACHE BOOL "" FORCE ) set( GAUXC_HAS_MPI FALSE CACHE BOOL "" FORCE ) set( GAUXC_HAS_OPENMP FALSE CACHE BOOL "" FORCE ) -set( GAUXC_HAS_GAU2GRID FALSE CACHE BOOL "" FORCE ) +set( GAUXC_HAS_GAU2GRID FALSE CACHE STRING "" FORCE ) set( GAUXC_HAS_HDF5 FALSE CACHE BOOL "" FORCE ) set( GAUXC_HAS_MAGMA FALSE CACHE BOOL "" FORCE ) set( GAUXC_HAS_NCCL FALSE CACHE BOOL "" FORCE ) diff --git a/cmake/gauxc-config.cmake.in b/cmake/gauxc-config.cmake.in index 426b7f10..37dc7a23 100644 --- a/cmake/gauxc-config.cmake.in +++ b/cmake/gauxc-config.cmake.in @@ -30,6 +30,10 @@ if(GAUXC_HAS_OPENMP) find_dependency( OpenMP ) endif() +if( GAUXC_HAS_GAU2GRID STREQUAL "External" ) + find_dependency( gau2grid ) +endif() + if( GAUXC_HAS_HOST ) if(GAUXC_BLAS_IS_LP64) set( _blas_components lp64 ) diff --git a/cmake/gauxc-gau2grid.cmake b/cmake/gauxc-gau2grid.cmake index 51db34d8..9187cbb1 100644 --- a/cmake/gauxc-gau2grid.cmake +++ b/cmake/gauxc-gau2grid.cmake @@ -28,16 +28,21 @@ if( GAUXC_ENABLE_GAU2GRID ) if( NOT TARGET gau2grid::gg ) message( STATUS "Something Went Horribly Wrong With Gau2Grid discovery!" ) endif() - + + set( GAUXC_HAS_GAU2GRID External CACHE STRING "GauXC has Gau2Grid and will build bindings" FORCE ) else() message( STATUS "Building Pregenerated Gau2grid" ) add_subdirectory( ${PROJECT_SOURCE_DIR}/external/gau2grid ${PROJECT_BINARY_DIR}/external/gau2grid ) + set( GAUXC_HAS_GAU2GRID Vendored CACHE STRING "GauXC has Gau2Grid and will build bindings" FORCE ) endif() + else() + set( GAUXC_HAS_GAU2GRID External CACHE STRING "GauXC has Gau2Grid and will build bindings" FORCE ) endif() # If not discoverable + else() + set( GAUXC_HAS_GAU2GRID External CACHE STRING "GauXC has Gau2Grid and will build bindings" FORCE ) endif() # If target not present - set(GAUXC_HAS_GAU2GRID TRUE CACHE BOOL "GauXC has Gau2Grid and will build bindings" FORCE) endif() # If enabled