Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,10 @@ jobs:
cmake_minimum_required(VERSION 3.8)
project(hf++)
find_package(Libint2 REQUIRED)
get_target_property(_l2_ver Libint2::int2 Libint2_VERSION)
get_target_property(_l2_maxam Libint2::int2 Libint2_MAX_AM_ERI)
message("Libint2_MAX_AM_ERI \${_l2_maxam}")
get_target_property(_l2_config Libint2::int2 Libint2_CONFIGURATION)
message("Libint2_MAX_AM_ERI \${_l2_maxam} Libint2_VERSION \${_l2_ver} Libint2_CONFIGURATION \${_l2_config}")
find_package(Threads) # clang does not autolink threads even though we are using std::thread
add_executable(hf++ EXCLUDE_FROM_ALL "../libint/tests/hartree-fock/hartree-fock++.cc")
target_link_libraries(hf++ Libint2::cxx Threads::Threads)
Expand Down
5 changes: 5 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,10 @@ Note: As of v2.8.0 (libtool-based), the configuration_accessor() function will r
imitate future cmake-based behavior. See sample patch below. The string can be generated by editing
and running `export/cmake/configuration-gen.py`.

Note: As of v2.13.0 (cmake-based), the configuration_accessor() function will return integral codes by default,
and no patching is necessary. The same codes are available at CMake detection-time for
`find_package(Libint2 ... COMPONENTS ...)`

```
libint2::initialize();
printf("SHGShell: %d\n", libint2::solid_harmonics_ordering());
Expand Down Expand Up @@ -610,6 +614,7 @@ Eventually, these will be CMake Components, too.
g12_hhhh_dD - library includes F12 integrals with Gaussian factors and max angular momentum up to
"h" (h=spdfghikl...) and derivative order "D" (D=0,1,2,...).
For example, the presence of "g12_iiii_d2" means g12 Hessian ints are available for L=6.
This g12 set may have only the lowest AM included for each derivative level c. v2.13 .

cart shell_set used_by
-------- --------- -------
Expand Down
2 changes: 2 additions & 0 deletions cmake/libint2-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ foreach(_eri @Libint2_CONFIG_COMPONENTS@) # Libint2_CONFIG_COMPONENTS
set(${L2}_${_eri}_FOUND 1)
endforeach()

check_required_components(${L2})

# Import library targets
if(NOT TARGET ${L2}::int-shared AND NOT TARGET ${L2}::int-static)
include("${CMAKE_CURRENT_LIST_DIR}/${pnv}-targets.cmake")
Expand Down
14 changes: 14 additions & 0 deletions export/CMakeLists.txt.export
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,12 @@ endif()

# ==== 6 user targets: plain/C++(headers)/C++(compiled) shared/static =========

set(export_properties
"Libint2_VERSION"
"Libint2_MAX_AM_ERI"
"Libint2_CONFIGURATION"
)

if (L2_BUILD_SHARED_LIBS)

add_library(
Expand Down Expand Up @@ -351,7 +357,11 @@ if (L2_BUILD_SHARED_LIBS)
int-shared
PROPERTIES
OUTPUT_NAME "int2"
Libint2_VERSION "${LIBINT_VERSION}"
Libint2_MAX_AM_ERI "${Libint2_MAX_AM_ERI}"
Libint2_CONFIGURATION "${Libint2_CONFIG_COMPONENTS}"
)
set_property(TARGET int-shared APPEND PROPERTY EXPORT_PROPERTIES "${export_properties}")
if (APPLE)
set_target_properties(
int-shared
Expand Down Expand Up @@ -478,7 +488,11 @@ if (L2_BUILD_STATIC_LIBS)
int-static
PROPERTIES
OUTPUT_NAME "int2"
Libint2_VERSION "${LIBINT_VERSION}"
Libint2_MAX_AM_ERI "${Libint2_MAX_AM_ERI}"
Libint2_CONFIGURATION "${Libint2_CONFIG_COMPONENTS}"
)
set_property(TARGET int-static APPEND PROPERTY EXPORT_PROPERTIES "${export_properties}")
target_include_directories(
int-static
INTERFACE
Expand Down
2 changes: 1 addition & 1 deletion export/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ if (TARGET Libint2::cxx)
Boost::headers
)
else()
find_package(Libint2 COMPONENTS CXX_ho REQUIRED)
find_package(Libint2 REQUIRED)
target_link_libraries(libint2-python PRIVATE Libint2::cxx)
endif()

Expand Down
Loading