Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAGMC CMake configuration directory #802

Merged
merged 7 commits into from
Apr 9, 2022
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
1 change: 1 addition & 0 deletions CI/scripts/build_dagmc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down
2 changes: 1 addition & 1 deletion cmake/DAGMCConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
12 changes: 6 additions & 6 deletions cmake/DAGMC_macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -203,13 +203,13 @@ 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(EXPORT DAGMCTargets 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/dagmc)
endmacro ()

# To use the dagmc_install macros, the following lists must be defined:
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindDAGMC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
6 changes: 6 additions & 0 deletions doc/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
====================

Expand Down