From d09f1fb160d535e73419e71e6ff8f2ebb76ccadb Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Fri, 25 Mar 2022 22:33:44 -0500 Subject: [PATCH 1/7] Following modern cmake convention of placing DAGMC configuration files under a project directory --- cmake/DAGMC_macros.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/DAGMC_macros.cmake b/cmake/DAGMC_macros.cmake index 7c4d58a789..d4ff7c0bfd 100644 --- a/cmake/DAGMC_macros.cmake +++ b/cmake/DAGMC_macros.cmake @@ -203,12 +203,12 @@ endmacro () # Setup the configuration file and install macro (dagmc_make_configure_files) message("") - message(STATUS "DAGMC cmake config file: ${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR}/cmake/DAGMCConfig.cmake") - message(STATUS "DAGMC cmake version file: ${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR}/cmake/DAGMCConfigVersion.cmake") + message(STATUS "DAGMC cmake config file: ${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR}/cmake/dagmc/DAGMCConfig.cmake") + message(STATUS "DAGMC cmake version file: ${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR}/cmake/dagmc/DAGMCConfigVersion.cmake") configure_file(cmake/DAGMCConfig.cmake.in DAGMCConfig.cmake @ONLY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/DAGMCConfig.cmake DESTINATION ${INSTALL_LIB_DIR}/cmake/) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/DAGMCConfig.cmake DESTINATION ${INSTALL_LIB_DIR}/cmake/dagmc/) configure_file(cmake/DAGMCConfigVersion.cmake.in DAGMCConfigVersion.cmake @ONLY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/DAGMCConfigVersion.cmake DESTINATION ${INSTALL_LIB_DIR}/cmake/) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/DAGMCConfigVersion.cmake DESTINATION ${INSTALL_LIB_DIR}/cmake/dagmc) install(EXPORT DAGMCTargets DESTINATION ${INSTALL_LIB_DIR}/cmake/) endmacro () From 940337aa9b16dd331844760912088451784ebdc2 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Fri, 25 Mar 2022 22:38:15 -0500 Subject: [PATCH 2/7] Removing static library build as default --- cmake/DAGMC_macros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/DAGMC_macros.cmake b/cmake/DAGMC_macros.cmake index d4ff7c0bfd..ea1a8a64ef 100644 --- a/cmake/DAGMC_macros.cmake +++ b/cmake/DAGMC_macros.cmake @@ -63,7 +63,7 @@ macro (dagmc_setup_options) option(BUILD_CI_TESTS "Build everything needed to run the CI tests" OFF) option(BUILD_SHARED_LIBS "Build shared libraries" ON) - option(BUILD_STATIC_LIBS "Build static libraries" ON) + option(BUILD_STATIC_LIBS "Build static libraries" OFF) option(BUILD_EXE "Build DAGMC executables" ON) option(BUILD_STATIC_EXE "Build static executables" OFF) From cf622583cb00553d4ab4e00428dce53c1f634eb1 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Fri, 25 Mar 2022 22:38:25 -0500 Subject: [PATCH 3/7] Updtaing changelog --- doc/CHANGELOG.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/CHANGELOG.rst b/doc/CHANGELOG.rst index 58b62e0037..a596abc551 100644 --- a/doc/CHANGELOG.rst +++ b/doc/CHANGELOG.rst @@ -7,6 +7,12 @@ DAGMC Changelog Next version ==================== +**Changed:** + + * Placing installed CMake configuration files in project directory (#802) + * Removing build of static libs as a default option (#802) + + v3.2.1 ==================== From 5ee8fd238afe838af3fa5eb027e1c460829d62c7 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Fri, 25 Mar 2022 22:40:45 -0500 Subject: [PATCH 4/7] Matching STATIC_LIB And _EXE setting in CI --- CI/scripts/build_dagmc.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/CI/scripts/build_dagmc.sh b/CI/scripts/build_dagmc.sh index e33698f19a..eb54c8da4b 100755 --- a/CI/scripts/build_dagmc.sh +++ b/CI/scripts/build_dagmc.sh @@ -41,6 +41,7 @@ function build_dagmc() { -DBUILD_CI_TESTS=ON \ -DBUILD_MW_REG_TESTS=${build_mw_reg_tests} \ -DBUILD_STATIC_EXE=${static_exe} \ + -DBUILD_STATIC_LIBS=${static_exe} \ -DCMAKE_C_COMPILER=${CC} \ -DCMAKE_CXX_COMPILER=${CXX} \ -DCMAKE_Fortran_COMPILER=${FC} \ From 440fd6036043801b3f8239d972b5fbd6ea6b4f1a Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Fri, 25 Mar 2022 22:45:37 -0500 Subject: [PATCH 5/7] Updating path in input config file --- cmake/DAGMCConfig.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/DAGMCConfig.cmake.in b/cmake/DAGMCConfig.cmake.in index a10c18352c..5d63776c87 100644 --- a/cmake/DAGMCConfig.cmake.in +++ b/cmake/DAGMCConfig.cmake.in @@ -28,4 +28,4 @@ if(@DOUBLE_DOWN@) HINTS @dd_CMAKE_CONFIG@) endif() -include(@CMAKE_INSTALL_PREFIX@/lib/cmake/DAGMCTargets.cmake) +include(@CMAKE_INSTALL_PREFIX@/lib/cmake/dagmc/DAGMCTargets.cmake) From bbd020902145c60465bd44651bcbd3a9f92405ab Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Fri, 25 Mar 2022 22:50:31 -0500 Subject: [PATCH 6/7] One more path update --- cmake/DAGMC_macros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/DAGMC_macros.cmake b/cmake/DAGMC_macros.cmake index ea1a8a64ef..ab24897a52 100644 --- a/cmake/DAGMC_macros.cmake +++ b/cmake/DAGMC_macros.cmake @@ -209,7 +209,7 @@ macro (dagmc_make_configure_files) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/DAGMCConfig.cmake DESTINATION ${INSTALL_LIB_DIR}/cmake/dagmc/) configure_file(cmake/DAGMCConfigVersion.cmake.in DAGMCConfigVersion.cmake @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/DAGMCConfigVersion.cmake DESTINATION ${INSTALL_LIB_DIR}/cmake/dagmc) - install(EXPORT DAGMCTargets DESTINATION ${INSTALL_LIB_DIR}/cmake/) + install(EXPORT DAGMCTargets DESTINATION ${INSTALL_LIB_DIR}/cmake/dagmc) endmacro () # To use the dagmc_install macros, the following lists must be defined: From abe975567588afe539a23a3d125e946e3e42395c Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Fri, 25 Mar 2022 23:22:26 -0500 Subject: [PATCH 7/7] Updating hint in config test CMake module --- cmake/FindDAGMC.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/FindDAGMC.cmake b/cmake/FindDAGMC.cmake index 44ad23475e..349ef5b748 100644 --- a/cmake/FindDAGMC.cmake +++ b/cmake/FindDAGMC.cmake @@ -12,7 +12,7 @@ message(STATUS ${DAGMC_ROOT}) find_path(DAGMC_CMAKE_CONFIG NAMES DAGMCConfig.cmake HINTS ${DAGMC_ROOT} $ENV{DAGMC_ROOT} PATHS ENV LD_LIBRARY_PATH - PATH_SUFFIXES lib Lib cmake lib/cmake/ + PATH_SUFFIXES lib Lib cmake lib/cmake/dagmc NO_DEFAULT_PATH) message(STATUS "Found DAGMC in ${DAGMC_CMAKE_CONFIG}")