Skip to content

Commit

Permalink
add MOAB deps to all lib build within dagnmc
Browse files Browse the repository at this point in the history
  • Loading branch information
bam241 committed Dec 6, 2024
1 parent ef07e64 commit a70afc9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/linux_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,10 @@ jobs:
git config --global --add safe.directory ${GITHUB_WORKSPACE}
mkdir -p build
cd build
echo ${hdf5_install_dir}
echo ${geant4_install_dir}
cmake ../ \
-DMOAB_DIR=${moab_install_dir} \
-DBUILD_GEANT4=$([ "${{ matrix.geant4_version }}" != "off" ] && echo "ON" || echo "OFF") \
-DDDL_INSTALL_DEPS=$([ "${{ matrix.ddl_deps }}" != "on" ] && echo "OFF" || echo "ON ") \
-DHDF5_ROOT=${hdf5_install_dir} \
-DDDL_INSTALL_DEPS=$([ "${{ matrix.ddl_deps }}" != "on" ] && echo "OFF" || echo "ON -DHDF5_ROOT=${hdf5_install_dir}") \
-DGEANT4_DIR=${geant4_install_dir} \
-DBUILD_CI_TESTS=ON \
-DBUILD_MW_REG_TESTS=OFF \
Expand Down
5 changes: 5 additions & 0 deletions cmake/DAGMC_macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ macro (dagmc_install_library lib_name)
EXPORT DAGMCTargets
LIBRARY DESTINATION ${INSTALL_LIB_DIR}
PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR})
# Required to ensure that MOAB is built before DAGMC and to properly link against MOAB
if(DDL_INSTALL_DEPS)
add_dependencies(${lib_name}-shared MOAB)
target_link_libraries(${lib_name}-shared PUBLIC ${MOAB_INSTALL_PREFIX}/lib64/libMOAB.so)
endif()
endif ()

if (BUILD_STATIC_LIBS)
Expand Down
5 changes: 0 additions & 5 deletions src/dagmc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ include_directories(${CMAKE_BINARY_DIR}/src/dagmc)

dagmc_install_library(dagmc)

# Required to ensure that MOAB is built before DAGMC and to properly link against MOAB
if(DDL_INSTALL_DEPS)
add_dependencies(dagmc-shared MOAB)
target_link_libraries(dagmc-shared PUBLIC ${MOAB_INSTALL_PREFIX}/lib64/libMOAB.so)
endif()
add_subdirectory(tools)

if (BUILD_TESTS)
Expand Down
5 changes: 1 addition & 4 deletions src/pyne/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,4 @@ if(NOT (${HDF5_VERSION} VERSION_LESS 1.12.0))
endif()

dagmc_install_library(pyne_dagmc)
# Required to ensure that MOAB is built before pyne_dagmc
if(DDL_INSTALL_DEPS)
add_dependencies(pyne_dagmc-shared MOAB)
endif()

0 comments on commit a70afc9

Please sign in to comment.