Skip to content

Commit

Permalink
Merge pull request #1526 from ahnaf-tahmid-chowdhury/FindMOAB-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gonuke committed May 23, 2024
2 parents 94655cf + e9bd727 commit 7e38b25
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 114 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ src/atomic_data.h
src/*.tar.gz
*.s

# Ignore environment
.env
.venv

# Ignore temp files
*.pyc
*.save
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Next Version
* do not try to download missing (super heavy) data from KAERI
* update material_library writing interface
* reference python_executable rather than assuming `python` exists ()
* Update FindMOAB to use MOAB config file (#1526)

v0.7.8
======
Expand Down
43 changes: 19 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ MESSAGE("-- HDF5 library version: ${HDF5_VERSION}")
# Thus, we give these flags to allow usage of the old interface in newer
# versions of HDF5.
if(NOT (${HDF5_VERSION} VERSION_LESS 1.12.0))
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DH5Oget_info_by_idx_vers=1 -DH5O_info_t_vers=1 -DH5Oget_info_by_name_vers=1")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DH5Oget_info_by_idx_vers=1 -DH5O_info_t_vers=1 -DH5Oget_info_by_name_vers=1")
endif()

# Look for MOAB if requested
Expand All @@ -102,37 +102,32 @@ if(WITH_MOAB)
if(NOT MOAB_ROOT)
set(MOAB_ROOT "${DEPS_ROOT_DIR}")
endif()
MESSAGE("-- MOAB Root: ${MOAB_ROOT}")
find_package(MOAB)
message("-- MOAB Found: ${MOAB_FOUND}")
if(${MOAB_FOUND})
include_directories(${MOAB_INCLUDE_DIRS})
get_filename_component(MOAB_LIBRARY_DIRS ${MOAB_LIBRARY} PATH)
if(APPLE)
link_directories(${MOAB_LIBRARY_DIRS})
else(APPLE)
link_directories(${MOAB_LIBRARY_DIRS})
endif(APPLE)
endif(${MOAB_FOUND})
find_package(MOAB REQUIRED)
message(STATUS "MOAB Library Version: ${MOAB_VERSION}")
message(STATUS "MOAB Include Directory: ${MOAB_INCLUDE_DIRS}")
message(STATUS "MOAB Library Directories: ${MOAB_LIBRARY_DIRS}")
message(STATUS "MOAB Libraries: ${MOAB_LIBRARIES}")
include_directories(${MOAB_INCLUDE_DIRS})
link_directories(${MOAB_LIBRARY_DIRS})
endif()

# Look for DAGMC if requested
if(WITH_DAGMC)
if(${MOAB_FOUND})
if(MOAB_FOUND)
# Always look for DAGMC library
if(NOT DAGMC_ROOT)
set(DAGMC_ROOT "${DEPS_ROOT_DIR}")
endif()
MESSAGE("-- DAGMC Root: ${DAGMC_ROOT}")
find_package(DAGMC)
message("-- DAGMC Found: ${DAGMC_FOUND}")
if(${DAGMC_FOUND})
include_directories(${DAGMC_INCLUDE_DIRS})
link_directories(${DAGMC_LIBRARY_DIRS})
endif(${DAGMC_FOUND})
else(${MOAB_FOUND})
message("-- DAGMC: Not searching because MOAB was not found.")
endif(${MOAB_FOUND})
find_package(DAGMC REQUIRED)
message(STATUS "DAGMC Library Version: ${DAGMC_VERSION}")
message(STATUS "DAGMC Include Directory: ${DAGMC_INCLUDE_DIRS}")
message(STATUS "DAGMC Library Directories: ${DAGMC_LIBRARY_DIRS}")
message(STATUS "DAGMC Libraries: ${DAGMC_LIBRARIES}")
include_directories(${DAGMC_INCLUDE_DIRS})
link_directories(${DAGMC_LIBRARY_DIRS})
else()
message(WARNING "DAGMC: Not searching because MOAB was not found.")
endif()
endif()

# Find Python
Expand Down
31 changes: 0 additions & 31 deletions cmake/FindDAGMC.cmake

This file was deleted.

59 changes: 0 additions & 59 deletions cmake/FindMOAB.cmake

This file was deleted.

0 comments on commit 7e38b25

Please sign in to comment.