From a7db087187ac5b5266fcb12144b973b1c94a4ceb Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot Date: Fri, 6 Dec 2024 06:38:09 +0100 Subject: [PATCH] hdf5 --- cmake/FindMOAB.cmake | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/cmake/FindMOAB.cmake b/cmake/FindMOAB.cmake index 5ce6a480b..84397219a 100644 --- a/cmake/FindMOAB.cmake +++ b/cmake/FindMOAB.cmake @@ -11,6 +11,27 @@ find_path(MOAB_CMAKE_CONFIG NO_DEFAULT_PATH ) +# First check if we are forcing the download of MOAB +if (DDL_INSTALL_DEPS) + IF(DAGMC_BUILD_STATIC_LIBS) + message(FATAL_ERROR "DDL_INSTALL_DEPS is ONLY compatible with shared libraries.") + ENDIF() + IF(NOT MOAB_VERSION) + SET(MOAB_VERSION "5.5.1") + ENDIF() + include(MOAB_PullAndMake) + moab_pull_make(${MOAB_VERSION}) + +# Back to normal behavior +elseif (MOAB_CMAKE_CONFIG) + set(MOAB_CMAKE_CONFIG ${MOAB_CMAKE_CONFIG}/MOABConfig.cmake) + message(STATUS "MOAB_CMAKE_CONFIG: ${MOAB_CMAKE_CONFIG}") + include(${MOAB_CMAKE_CONFIG}) + +else () + message(FATAL_ERROR "Could not find MOAB. Set -DMOAB_DIR= when running cmake or use the $MOAB_DIR environment variable.") +endif () + # Find HDF5 set(ENV{PATH} "${HDF5_DIR}:$ENV{PATH}") set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_LIBRARY_SUFFIX}) @@ -34,27 +55,6 @@ message(STATUS "HDF5_LIBRARIES_STATIC: ${HDF5_LIBRARIES_STATIC}") include_directories(${HDF5_INCLUDE_DIRS}) -# First check if we are forcing the download of MOAB -if (DDL_INSTALL_DEPS) - IF(DAGMC_BUILD_STATIC_LIBS) - message(FATAL_ERROR "DDL_INSTALL_DEPS is ONLY compatible with shared libraries.") - ENDIF() - IF(NOT MOAB_VERSION) - SET(MOAB_VERSION "5.5.1") - ENDIF() - include(MOAB_PullAndMake) - moab_pull_make(${MOAB_VERSION}) - -# Back to normal behavior -elseif (MOAB_CMAKE_CONFIG) - set(MOAB_CMAKE_CONFIG ${MOAB_CMAKE_CONFIG}/MOABConfig.cmake) - message(STATUS "MOAB_CMAKE_CONFIG: ${MOAB_CMAKE_CONFIG}") - include(${MOAB_CMAKE_CONFIG}) - -else () - message(FATAL_ERROR "Could not find MOAB. Set -DMOAB_DIR= when running cmake or use the $MOAB_DIR environment variable.") -endif () - if(MSVC) set(BUILD_STATIC_LIBS TRUE) set(BUILD_SHARED_LIBS OFF)