Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 62 additions & 28 deletions .github/workflows/mac_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ on:
- '.github/actions/**'
- 'CI/**'
- 'doc/**'

push:
branches:
- develop
Expand Down Expand Up @@ -47,47 +46,82 @@ jobs:
- name: Initial setup
shell: bash -l {0}
run: |
brew install eigen hdf5
brew install hdf5

# Homebrew's Eigen in 2026 is Eigen v5.x, which is incompatible with

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh... maybe we should be moving this forward in MOAB under a different issue...

@matthewfeickert matthewfeickert Feb 16, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gonuke I'm happy to migrate any MOAB related things to https://bitbucket.org/fathomteam/moab/src/master/. I had assumed that as MOAB v5.6.0 existed on conda-forge but DAGMC was testing against MOAB v5.5.1 that there was some restriction on DAGMC's compatibility with the v5.6.x series of MOAB. If not (that's great) then MOAB related things can for sure be moved upstream and separated out from this PR.

# MOAB v5.5.1 FindEigen3.cmake. Homebrew has bad version control, and
# so instead of trying to force Homebrew to install a compatible version,
# build Eigen v3.4.0 (a header-only library) from source to ensure that
# Eigen3Config.cmake is generated for DAGMC's CMake invocation to use
# find_package(Eigen3 REQUIRED NO_MODULE).
curl -sL https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.bz2 | tar xj -C /tmp
cmake -DCMAKE_INSTALL_PREFIX=/tmp/eigen -S /tmp/eigen-3.4.0 -B /tmp/eigen-build
cmake --build /tmp/eigen-build --parallel
cmake --install /tmp/eigen-build
echo "EIGEN_PREFIX=/tmp/eigen" >> $GITHUB_ENV

- name: Environment Variables
shell: bash -l {0}
run: |
echo "HOME=$GITHUB_WORKSPACE/.." >> $GITHUB_ENV


- name: Build MOAB
shell: bash -l {0}
run: |
cd ${HOME}
mkdir -pv moab/bld
cd moab
git clone https://bitbucket.org/fathomteam/moab -b 5.5.1 --depth 1 --shallow-submodules
cd bld
cmake ../moab -DENABLE_HDF5=ON \
-DENABLE_PYMOAB=OFF \
-DHDF5_ROOT=$HDF5_PATH \
-DBUILD_SHARED_LIBS=ON \
-DENABLE_BLASLAPACK=OFF \
-DENABLE_FORTRAN=OFF \
-DCMAKE_INSTALL_PREFIX=${HOME}/moab
make
make install
rm -rf ${HOME}/moab/moab ${HOME}/moab/bld
mkdir -pv moab
git clone -b 5.5.1 --depth 1 --shallow-submodules https://bitbucket.org/fathomteam/moab moab_src

# In CMavke v4 TestEndianess.c.in was renamed to TestEndianness.c.in
# to fix a typo. MOAB v5.5.1 used a custom config/TestBigEndian.cmake

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like another place for a MOAB issue/update?

# that hardcodes the use of TestEndianess.c.in.
#
# $ git grep "TestEndianess.c.in"
# config/TestBigEndian.cmake:39: CONFIGURE_FILE("${CMAKE_ROOT}/Modules/TestEndianess.c.in"
#
# As config/ is first in CMAKE_MODULE_PATH, MOAB's broken version is
# used instead of CMake's working built-in module. To avoid this, set
# HAVE_WORDS_BIGENDIAN=TRUE to skip the test, instead of deleting the
# broken module. This works as HAVE_WORDS_BIGENDIAN=TRUE skips the test
# test_big_endian, defaulting to little-endian, which for effectively all
# runner platforms is correct.
#
# $ git grep -m 1 '(HAVE_' -- config/TestBigEndian.cmake
# config/TestBigEndian.cmake:8: IF(HAVE_${VARIABLE} MATCHES ^HAVE_${VARIABLE}$)
cmake \
-DCMAKE_INSTALL_PREFIX=${HOME}/moab \
-DHAVE_WORDS_BIGENDIAN=TRUE \
-DCMAKE_PREFIX_PATH="$(brew --prefix)" \
-DEIGEN3_DIR="${EIGEN_PREFIX}/include/eigen3" \
-DENABLE_HDF5=ON \
-DENABLE_PYMOAB=OFF \
-DBUILD_SHARED_LIBS=ON \
-DENABLE_BLASLAPACK=OFF \
-DENABLE_FORTRAN=OFF \
-S moab_src \
-B bld
cmake -LH bld
cmake --build bld --parallel
cmake --install bld
rm -rf moab_src bld lib

- name: Build DAGMC
shell: bash -l {0}
run: |
mkdir -p $GITHUB_WORKSPACE/bld
cd $GITHUB_WORKSPACE/bld
cmake ../ -DMOAB_DIR=${HOME}/moab \
-DBUILD_CI_TESTS=ON \
-DBUILD_STATIC_EXE=OFF \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_STATIC_LIBS=OFF \
-DCMAKE_CXX_FLAGS="-Werror=reorder" \
-DCMAKE_INSTALL_PREFIX=${HOME}/dagmc
make
make install
cmake \
-DCMAKE_INSTALL_PREFIX=${HOME}/dagmc \
-DCMAKE_PREFIX_PATH="${EIGEN_PREFIX};$(brew --prefix)" \
-DMOAB_DIR=${HOME}/moab \
-DBUILD_CI_TESTS=ON \
-DBUILD_STATIC_EXE=OFF \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_STATIC_LIBS=OFF \
-DCMAKE_CXX_FLAGS="-Werror=reorder" \
-S . \
-B $GITHUB_WORKSPACE/bld
cmake -LH bld
cmake --build bld --parallel
cmake --install bld

- name: Testing DAGMC
shell: bash -l {0}
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.18...4.2)
project(DAGMC)
cmake_minimum_required(VERSION 3.18)
enable_language(CXX)

# Set DAGMC version
Expand Down
2 changes: 1 addition & 1 deletion cmake/test_config/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8...4.2)
project(Test_DAGMC_config)
cmake_minimum_required(VERSION 2.8)

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})

Expand Down
1 change: 1 addition & 0 deletions doc/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Next version

**Fixed**
* Fixed HDF5 naming convention for docker container building and naming (#976)
* Allowed for modern CMake policies to be used (#989)


v3.2.4
Expand Down
2 changes: 1 addition & 1 deletion src/geant4/generate_geant4
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,7 @@ def _setup_build(dag_h5m):

file_contents.append('#----------------------------------------------------------------------------\n')
file_contents.append('# Setup the project\n')
file_contents.append('cmake_minimum_required(VERSION 2.6 FATAL_ERROR)\n')
file_contents.append('cmake_minimum_required(VERSION 2.6...4.2)\n')
file_contents.append('project(N01)\n')
file_contents.append('\n')
file_contents.append('#----------------------------------------------------------------------------\n')
Expand Down
2 changes: 1 addition & 1 deletion src/gtest/gtest-1.8.0/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ endif()
# as ${gtest_SOURCE_DIR} and to the root binary directory as
# ${gtest_BINARY_DIR}.
# Language "C" is required for find_package(Threads).
cmake_minimum_required(VERSION 2.6...4.2)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is otherwise-unedited copy of the google-test-suite code. Is it problematic to leave this one as-is and make an issue to change our dependence on this, either by updating the version we have copied in or make it an external dependency?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it problematic to leave this one as-is and make an issue to change our dependence on this, either by updating the version we have copied in or make it an external dependency?

It actually won't build at all, given that CMake v4.0 dropped all policies older than 3.5 (longer summary in #990 (comment)). It there a particularly strong reason to vendor gtest compared to having it as an external? If not, having it as a dependency would probably be more long-term sustainable with CMake.

project(gtest CXX C)
cmake_minimum_required(VERSION 2.6.4)

# Where gtest's .h files can be found.
include_directories(
Expand Down