diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b95acbd9..723eddaa9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,8 +46,12 @@ endif() # Dealing with MOAB if (PULL_INSTALL_MOAB) + # Ensure MOAB_VERSION + if(not MOAB_VERSION) + set(MOAB_VERSION "5.5.1") + endif() include(MOAB_PullAndMake) - moab_pull_make() + moab_pull_make(${MOAB_VERSION}) else() find_package(MOAB REQUIRED) endif() diff --git a/cmake/FindMOAB.cmake b/cmake/FindMOAB.cmake index db19e53e4..04a968f44 100644 --- a/cmake/FindMOAB.cmake +++ b/cmake/FindMOAB.cmake @@ -1,3 +1,5 @@ +# This leverage HDF5_macro.cmake in order to find HDF5 libraries. + message("") # Find MOAB cmake config file diff --git a/cmake/MOAB_PullAndMake.cmake b/cmake/MOAB_PullAndMake.cmake index fa1c2c76f..c6825a2e4 100644 --- a/cmake/MOAB_PullAndMake.cmake +++ b/cmake/MOAB_PullAndMake.cmake @@ -1,19 +1,14 @@ # This Macro sets up the download and build of MOAB using ExternalProject # few tweak are done in src/dagmc/CMakeLists.txt and src/PyNE/CMakeists.txt # to make sure that MOAB is built before DAGMC. -MACRO (moab_pull_make) +MACRO (moab_pull_make MOAB_Version) MESSAGE(STATUS "MOAB will be downloaded and built") # Ensure STATIC LIBS Build IF(DAGMC_BUILD_STATIC_LIBS) MESSAGE(FATAL_ERROR "PULL_INSTALL_MOAB is ONLY compatible with shared libraries.") endIF() - - # Ensure MOAB_VERSION - IF(NOT MOAB_VERSION) - SET(MOAB_VERSION "5.5.1") - endIF() - + # Ensure we have the right variables to build MOAB moab_autobuild_check_deps()