diff --git a/CMakeLists.txt b/CMakeLists.txt index f4fe4c4f3..6268957c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,10 +46,14 @@ endif() # Dealing with MOAB if (PULL_INSTALL_MOAB) + set(MOAB_VERSION ${PULL_INSTALL_MOAB}) + # Ensure MOAB_VERSION - if(NOT DEFINED MOAB_VERSION) + if(${MOAB_VERSION}) + MESSAGE("NO MOAB_VERSION specified. Defaulting to 5.5.1") set(MOAB_VERSION "5.5.1") endif() + MESSAGE("MOAB_VERSION to be installed: ${MOAB_VERSION}") include(MOAB_PullAndMake) moab_pull_make(${MOAB_VERSION}) else() diff --git a/cmake/DAGMC_macros.cmake b/cmake/DAGMC_macros.cmake index bd34eb1e4..240307621 100644 --- a/cmake/DAGMC_macros.cmake +++ b/cmake/DAGMC_macros.cmake @@ -73,7 +73,7 @@ macro (dagmc_setup_options) option(DOUBLE_DOWN "Enable ray tracing with Embree via double down" OFF) - option(PULL_INSTALL_MOAB "Enable automatic downloading of MOAB dependency" OFF) + option(PULL_INSTALL_MOAB "Enable automatic downloading of MOAB dependency, provide a MOAB TAG version" OFF) if (BUILD_ALL) set(BUILD_MCNP5 ON) diff --git a/doc/install/cmake_options.rst b/doc/install/cmake_options.rst index db5827a07..47875e356 100644 --- a/doc/install/cmake_options.rst +++ b/doc/install/cmake_options.rst @@ -61,3 +61,8 @@ Note that unless set, all boolean options default to ``OFF``. * ``-DBUILD_PIC=ON`` Build with position-independent code. (Default: OFF) * ``-DBUILD_RPATH=ON`` Build with RPATH functionality. (Default: ON) + + * ``-DPULL_INSTALL_MOAB=MOAB_version`` Enables automatic downloading of MOAB + dependency, provide a MOAB TAG version, (default: OFF). When using this + option, it is required to provide the path to HDF5 location, using + ``-DHDF5_ROOT``. diff --git a/doc/install/dependencies.rst b/doc/install/dependencies.rst index 98e24bdbf..f7cbe1746 100644 --- a/doc/install/dependencies.rst +++ b/doc/install/dependencies.rst @@ -106,6 +106,17 @@ To build moab using the default packages: $ make check $ make install +If you whish to avoid building MOAB from source, it is possible to build it at +the same time as DAGMC by setting the ``PULL_INSTALL_MOAB`` option to the +desired MOAB version. This will automatically download and build MOAB as a +dependency of DAGMC. When using this option it is assumed that HDF5 is properly +installed on your computer and you will need to provide its location for the +MOAB installation. For example, to build MOAB version 5.5.1, you would add the +following flag to the cmake command when building DAGMC: +:: + + $ cmake ../dagmc -DPULL_INSTALL_MOAB=5.5.1 -DHDF5_ROOT=PATH_TO_HDF5 + Making sure the dependencies were installed correctly ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~