From a75e0becbc1afaf93ff4f15ca1b1ae2896246027 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Sat, 31 Jan 2026 23:09:21 -0500 Subject: [PATCH 1/3] check components --- cmake/libint2-config.cmake.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/libint2-config.cmake.in b/cmake/libint2-config.cmake.in index ff5a28c1..dce83a3f 100644 --- a/cmake/libint2-config.cmake.in +++ b/cmake/libint2-config.cmake.in @@ -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") From 38c43e77b2fd50e742d94c7750df2659e7fac40f Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Sun, 1 Feb 2026 02:38:25 -0500 Subject: [PATCH 2/3] misc. --- .github/workflows/cmake.yml | 4 +++- INSTALL.md | 5 +++++ export/CMakeLists.txt.export | 14 ++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 84dfdc9c..f8560fed 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -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) diff --git a/INSTALL.md b/INSTALL.md index e6916ade..b458a096 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -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()); @@ -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 -------- --------- ------- diff --git a/export/CMakeLists.txt.export b/export/CMakeLists.txt.export index 269c07b4..3c28edb4 100644 --- a/export/CMakeLists.txt.export +++ b/export/CMakeLists.txt.export @@ -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( @@ -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 @@ -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 From dbc091d4db046b69f7a28fb461c44217faa02b5b Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Sun, 1 Feb 2026 03:03:01 -0500 Subject: [PATCH 3/3] component for py --- export/python/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/export/python/CMakeLists.txt b/export/python/CMakeLists.txt index d102ecf0..7778c364 100644 --- a/export/python/CMakeLists.txt +++ b/export/python/CMakeLists.txt @@ -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()