Skip to content

Commit

Permalink
some addition for HDF5
Browse files Browse the repository at this point in the history
  • Loading branch information
bam241 committed Dec 6, 2024
1 parent 4673439 commit 16b1dc4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linux_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
compiler: gcc
hdf5_version: 1.14.3
moab_version: 5.4.1
ddl_deps: ON
ddl_deps: off
geant4_version: off
double_down_version: off

Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
cmake ../ \
-DMOAB_DIR=${moab_install_dir} \
-DBUILD_GEANT4=$([ "${{ matrix.geant4_version }}" != "off" ] && echo "ON" || echo "OFF") \
-DDDL_INSTALL_DEPS=$([ "${{ matrix.ddl_deps }}" != "off" ] && echo "ON" || echo "OFF") \
-DDDL_INSTALL_DEPS=$([ "${{ matrix.ddl_deps }}" != "on" ] && echo "OFF" || echo "ON \n -DHDF5_ROOT=${HDF5_INSTALL_DIR}") \
-DGEANT4_DIR=${geant4_install_dir} \
-DBUILD_CI_TESTS=ON \
-DBUILD_MW_REG_TESTS=OFF \
Expand Down
22 changes: 10 additions & 12 deletions cmake/FindMOAB.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
message("")

# Find MOAB cmake config file
# Only used to determine the location of the HDF5 with which MOAB was built
set(MOAB_SEARCH_DIRS)
file(GLOB MOAB_SEARCH_DIRS ${MOAB_SEARCH_DIRS} "${MOAB_DIR}/lib*/cmake/MOAB")
string(REPLACE "\n" ";" MOAB_SEARCH_DIRS "${MOAB_SEARCH_DIRS}")
find_path(MOAB_CMAKE_CONFIG
NAMES MOABConfig.cmake
PATHS ${MOAB_SEARCH_DIRS}
NO_DEFAULT_PATH
)

# Find HDF5
set(ENV{PATH} "${HDF5_DIR}:$ENV{PATH}")
Expand All @@ -24,18 +34,6 @@ message(STATUS "HDF5_LIBRARIES_STATIC: ${HDF5_LIBRARIES_STATIC}")

include_directories(${HDF5_INCLUDE_DIRS})

# Find MOAB cmake config file
# Only used to determine the location of the HDF5 with which MOAB was built
set(MOAB_SEARCH_DIRS)
file(GLOB MOAB_SEARCH_DIRS ${MOAB_SEARCH_DIRS} "${MOAB_DIR}/lib*/cmake/MOAB")
string(REPLACE "\n" ";" MOAB_SEARCH_DIRS "${MOAB_SEARCH_DIRS}")
find_path(MOAB_CMAKE_CONFIG
NAMES MOABConfig.cmake
PATHS ${MOAB_SEARCH_DIRS}
NO_DEFAULT_PATH
)


# First check if we are forcing the download of MOAB
if (DDL_INSTALL_DEPS)
IF(DAGMC_BUILD_STATIC_LIBS)
Expand Down
2 changes: 1 addition & 1 deletion cmake/MOAB_PullAndMake.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ MACRO (moab_pull_make moab_version)
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-DBUILD_SHARED_LIBS:BOOL=ON
-DENABLE_HDF5:BOOL=ON
# -DHDF5_ROOT:PATH=${HDF5_ROOT}
-DHDF5_ROOT:PATH=${HDF5_ROOT}
-DENABLE_BLASLAPACK:BOOL=OFF
-DENABLE_FORTRAN:BOOL=OFF
-DCMAKE_MACOSX_RPATH:BOOL=ON
Expand Down

0 comments on commit 16b1dc4

Please sign in to comment.