-
Notifications
You must be signed in to change notification settings - Fork 72
MNT: Use policy_max in cmake_minimum_required #990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,7 +16,6 @@ on: | |
| - '.github/actions/**' | ||
| - 'CI/**' | ||
| - 'doc/**' | ||
|
|
||
| push: | ||
| branches: | ||
| - develop | ||
|
|
@@ -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 | ||
| # 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 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It actually won't build at all, given that CMake |
||
| project(gtest CXX C) | ||
| cmake_minimum_required(VERSION 2.6.4) | ||
|
|
||
| # Where gtest's .h files can be found. | ||
| include_directories( | ||
|
|
||
There was a problem hiding this comment.
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...
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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.0existed on conda-forge but DAGMC was testing against MOABv5.5.1that there was some restriction on DAGMC's compatibility with thev5.6.xseries of MOAB. If not (that's great) then MOAB related things can for sure be moved upstream and separated out from this PR.