Skip to content

Several minor fixes for the cmake system#584

Merged
ChrisJChang merged 1 commit intomasterfrom
cmake_improvements
Apr 30, 2026
Merged

Several minor fixes for the cmake system#584
ChrisJChang merged 1 commit intomasterfrom
cmake_improvements

Conversation

@anderkve
Copy link
Copy Markdown
Collaborator

This PR collects a number of tiny fixes to the cmake system, to correct some small bugs and typos, and improve some error messages to make them more useful.

Bugs fixed:

  • cmake/warnings.cmake: set_compiler_warning("error") now passes CMAKE_CXX_FLAGS so -DWERROR=ON actually adds -Werror.
  • cmake/optional.cmake: ${CoulourReset} typo corrected to ${ColourReset} in the C-MPI-without-C++-MPI warning.

Improved messages:

  • CMakeLists.txt: minimum-compiler FATAL_ERROR now mentions clang++ and AppleClang minimums alongside g++ and icpc.
  • CMakeLists.txt: Eigen3 FATAL_ERROR now points users at -DEIGEN3_INCLUDE_DIR=/path/... and the EIGEN3_ROOT env var as alternatives to installing.
  • cmake/optional.cmake: ROOT path now distinguishes ROOTSYS unset (suggests sourcing thisroot.sh) from "found ROOTSYS but no ROOT 6 there" (echoes the path).

Documentation fixes:

  • README.md, README_OSX.md: CMAKE_FLAGS.md references corrected to BUILD_OPTIONS.md.
  • README.md: dropped future from the required-Python-modules list (it's not actually checked).

Typos, etc.:

  • CMakeLists.txt: build-type message no longer wraps undefined colour vars (printed before utilities.cmake is included). Per your request, kept in place — colour stripped instead of moved.
  • CMakeLists.txt: Cmake 3.0 → CMake 3.0 in CMP0048 comment.
  • CMakeLists.txt: Python_ADDITIONAL_VERSIONS extended to 3.12, 3.13.
  • cmake/optional.cmake: removed unreachable LAPACK message after the FATAL_ERROR.

  Real bugs fixed
  - cmake/warnings.cmake: set_compiler_warning("error") now passes CMAKE_CXX_FLAGS so -DWERROR=ON actually adds -Werror.
  - cmake/optional.cmake: ${CoulourReset} typo corrected to ${ColourReset} in the C-MPI-without-C++-MPI warning.

  Better error/help messages
  - CMakeLists.txt: minimum-compiler FATAL_ERROR now mentions clang++ and AppleClang minimums alongside g++ and icpc.
  - CMakeLists.txt: Eigen3 FATAL_ERROR now points users at -DEIGEN3_INCLUDE_DIR=/path/... and the EIGEN3_ROOT env var as alternatives to
  installing.
  - cmake/optional.cmake: ROOT path now distinguishes ROOTSYS unset (suggests sourcing thisroot.sh) from "found ROOTSYS but no ROOT 6 there"
   (echoes the path).

  Doc fixes
  - README.md, README_OSX.md: CMAKE_FLAGS.md references corrected to BUILD_OPTIONS.md.
  - README.md: dropped future from the required-Python-modules list (it's not actually checked).

  Cosmetic
  - CMakeLists.txt: build-type message no longer wraps undefined colour vars (printed before utilities.cmake is included). Per your request,
   kept in place — colour stripped instead of moved.
  - CMakeLists.txt: Cmake 3.0 → CMake 3.0 in CMP0048 comment.
  - CMakeLists.txt: Python_ADDITIONAL_VERSIONS extended to 3.12, 3.13.
  - cmake/optional.cmake: removed unreachable LAPACK message after the FATAL_ERROR.
@anderkve anderkve requested a review from pstoecker April 28, 2026 14:32
@anderkve anderkve added build Core Core group task labels Apr 28, 2026
@ChrisJChang ChrisJChang merged commit 1e1e56c into master Apr 30, 2026
2 of 4 checks passed
@ChrisJChang ChrisJChang deleted the cmake_improvements branch April 30, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Core Core group task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants