From 7804e9faee1da70d5ba7604ad943f9376cbab6a6 Mon Sep 17 00:00:00 2001 From: "Lori A. Burns" Date: Mon, 15 Jan 2024 21:02:47 -0500 Subject: [PATCH] try 24 --- CMakeLists.txt | 1 + cmake/modules/int_versions.cmake | 18 +++++++++++------- src/lib/libint/CMakeLists.txt | 11 +++++++++-- src/lib/libint/CMakeLists.txt.export | 2 +- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e15659f8..57bccfc58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,7 @@ include(DynamicVersion) dynamic_version( PROJECT_PREFIX Libint2Compiler_ GIT_ARCHIVAL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/.git_archival.txt + VERSION_FULL_MODE POST OUTPUT_COMMIT LibintRepository_COMMIT OUTPUT_VERSION LibintRepository_VERSION OUTPUT_DESCRIBE LibintRepository_DESCRIBE diff --git a/cmake/modules/int_versions.cmake b/cmake/modules/int_versions.cmake index 35c6e9d13..460fd7ef9 100644 --- a/cmake/modules/int_versions.cmake +++ b/cmake/modules/int_versions.cmake @@ -13,10 +13,12 @@ # <<< Sortable Version >>> -message(DEBUG "LibintRepository_VERSION ${LibintRepository_VERSION}") -message(DEBUG "LibintRepository_COMMIT ${LibintRepository_COMMIT}") -message(DEBUG "LibintRepository_DISTANCE ${LibintRepository_DISTANCE}") -message(DEBUG "LibintRepository_DESCRIBE ${LibintRepository_DESCRIBE}") +message(DEBUG "LibintRepository_VERSION ${LibintRepository_VERSION}") +message(DEBUG "LibintRepository_VERSION_FULL ${LibintRepository_VERSION_FULL}") +message(DEBUG "LibintRepository_COMMIT ${LibintRepository_COMMIT}") +message(DEBUG "LibintRepository_SHORT_HASH ${LibintRepository_SHORT_HASH}") +message(DEBUG "LibintRepository_DISTANCE ${LibintRepository_DISTANCE}") +message(DEBUG "LibintRepository_DESCRIBE ${LibintRepository_DESCRIBE}") if (LibintRepository_DISTANCE STREQUAL "0") set(LIBINT_SORTABLE_VERSION "${LibintRepository_VERSION}") @@ -24,8 +26,10 @@ else() set(LIBINT_SORTABLE_VERSION "${LibintRepository_VERSION}.post${LibintRepository_DISTANCE}") endif() -string(SUBSTRING ${LibintRepository_COMMIT} 0 7 LIBINT_GIT_COMMIT) -message(DEBUG "LIBINT_GIT_COMMIT ${LIBINT_GIT_COMMIT}") +# short hash from DynVer is variable length from `git describe`. +# * use below for fixed length +# string(SUBSTRING ${LibintRepository_COMMIT} 0 7 LIBINT_GIT_COMMIT) +message(DEBUG "LIBINT_GIT_COMMIT ${LibintRepository_SHORT_HASH}") # Below goes into BibTeX citation. Currently year of export. For year of tag, parse: # `git show -s --no-notes --date=short --pretty='%cd' v2.7.2` responds: 2022-06-20 @@ -52,7 +56,7 @@ else() set(LIBINT_EXT_VERSION ${LIBINT_VERSION}) endif() -message(STATUS "Version: Full ${LIBINT_EXT_VERSION} Numeric ${LIBINT_VERSION} Sortable ${LIBINT_SORTABLE_VERSION}") +message(STATUS "Version: Full ${LIBINT_EXT_VERSION} Numeric ${LIBINT_VERSION} Sortable ${LIBINT_SORTABLE_VERSION} SCM ${LibintRepository_VERSION_FULL}") if (NOT(LibintRepository_VERSION STREQUAL LIBINT_VERSION)) message(AUTHOR_WARNING diff --git a/src/lib/libint/CMakeLists.txt b/src/lib/libint/CMakeLists.txt index 788634d1a..7de6dbf74 100644 --- a/src/lib/libint/CMakeLists.txt +++ b/src/lib/libint/CMakeLists.txt @@ -50,7 +50,7 @@ configure_file( add_custom_command( OUTPUT ${EXPORT_STAGE_DIR}/CMakeLists.txt - ${EXPORT_STAGE_DIR}/include/libint2/libint2_params.h + ${EXPORT_STAGE_DIR}/include/libint2_params.h ${EXPORT_STAGE_DIR}/include/HRRPart0bra0ket0pp.h ${EXPORT_STAGE_DIR}/src/HRRPart0bra0ket0pp.cc COMMAND ${CMAKE_COMMAND} @@ -181,10 +181,17 @@ else() -DCMAKE_C_COMPILER_ARG1:STRING=${CMAKE_C_COMPILER_ARG1} -DCMAKE_PREFIX_PATH:STRING=${CMAKE_PREFIX_PATH} TEST_COMMAND "" - STEP_TARGETS build install + USES_TERMINAL_CONFIGURE TRUE + USES_TERMINAL_BUILD TRUE + USES_TERMINAL_INSTALL TRUE + STEP_TARGETS + build + install ) ExternalProject_Get_property(library BINARY_DIR) + # instead of running tests by default, replicate check-libint2 target here + # and use it to invoke library's check-libint2 target if (BUILD_TESTING) include(AddCustomTargetSubproject) add_custom_target_subproject( diff --git a/src/lib/libint/CMakeLists.txt.export b/src/lib/libint/CMakeLists.txt.export index 5b427f1da..73c946647 100644 --- a/src/lib/libint/CMakeLists.txt.export +++ b/src/lib/libint/CMakeLists.txt.export @@ -276,7 +276,7 @@ if (LIBINT2_REQUIRE_CXX_API_COMPILED) target_link_libraries ( int-cxx-obj PRIVATE - Eigen3::Eigen #libint-Eigen3 + Eigen3::Eigen $<$:Boost::headers> )