Skip to content

Fix #1458 Eigen 5.0.0 support - #1459

Merged
Nelson-numerical-software merged 1 commit into
masterfrom
eigen_5.0.0
Sep 22, 2025
Merged

Nelson-numerical-software merged 1 commit into
masterfrom
eigen_5.0.0

Conversation

@Nelson-numerical-software

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR aims to add support for using Eigen 5.0.0 when detected, adjusting the CMake configuration and documenting the change in the changelog.

  • Relaxes CMake Eigen find logic and adds a manual version check
  • Updates CHANGELOG to mention Eigen 5.0.0 support

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
CMakeLists.txt Replaces explicit versioned find_package with a manual post-find version check and status message
CHANGELOG.md Notes detection/use of Eigen 5.0.0

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread CMakeLists.txt Outdated
Comment on lines +247 to +255
find_package(Eigen3 REQUIRED)
if (TARGET Eigen3::Eigen)
if (DEFINED Eigen3_VERSION)
if (Eigen3_VERSION VERSION_LESS "3.3")
message(FATAL_ERROR "Eigen3 version must be >= 3.3, found ${Eigen3_VERSION}")
else()
message(STATUS "Eigen3 version ${Eigen3_VERSION} is supported.")
endif()
endif()

Copilot AI Sep 21, 2025

Copy link

Choose a reason for hiding this comment

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

This no longer reliably enforces the minimum Eigen version. If the package does not define Eigen3::Eigen (older Eigen/cmake setups) or does not set Eigen3_VERSION, the version check is skipped and find_package(Eigen3 REQUIRED) may succeed with an unsupported Eigen (< 3.3). Prefer letting CMake enforce the minimum version directly: find_package(Eigen3 3.3 REQUIRED). If you want to print the detected version, you can do so after a successful find using Eigen3_VERSION or EIGEN3_VERSION_STRING without gating the check on TARGET.

Suggested change
find_package(Eigen3 REQUIRED)
if (TARGET Eigen3::Eigen)
if (DEFINED Eigen3_VERSION)
if (Eigen3_VERSION VERSION_LESS "3.3")
message(FATAL_ERROR "Eigen3 version must be >= 3.3, found ${Eigen3_VERSION}")
else()
message(STATUS "Eigen3 version ${Eigen3_VERSION} is supported.")
endif()
endif()
find_package(Eigen3 3.3 REQUIRED)
if (DEFINED Eigen3_VERSION)
message(STATUS "Eigen3 version ${Eigen3_VERSION} is supported.")

Copilot uses AI. Check for mistakes.
Comment thread CMakeLists.txt Outdated
Comment on lines +249 to +250
if (DEFINED Eigen3_VERSION)
if (Eigen3_VERSION VERSION_LESS "3.3")

Copilot AI Sep 21, 2025

Copy link

Choose a reason for hiding this comment

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

FindEigen3 historically exposes EIGEN3_VERSION_STRING (uppercase), while config-mode may expose Eigen3_VERSION. To be robust across both, prefer the built-in version constraint in find_package, or at minimum check both variables: if(DEFINED Eigen3_VERSION) ... elseif(DEFINED EIGEN3_VERSION_STRING) ... else() message(FATAL_ERROR ...).

Copilot uses AI. Check for mistakes.
Comment thread CHANGELOG.md Outdated

- Improved `xmldocchecker` with XSD schema validation for XML files.

- [#1458](http://github.com/nelson-lang/nelson/issues/1458): Eigen 5.0.0 used if detected.

Copilot AI Sep 21, 2025

Copy link

Choose a reason for hiding this comment

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

Use https for the GitHub link and remove the trailing space to match common changelog formatting: #1458: Eigen 5.0.0 used if detected.

Suggested change
- [#1458](http://github.com/nelson-lang/nelson/issues/1458): Eigen 5.0.0 used if detected.
- [#1458](https://github.com/nelson-lang/nelson/issues/1458): Eigen 5.0.0 used if detected.

Copilot uses AI. Check for mistakes.
@Nelson-numerical-software
Nelson-numerical-software force-pushed the eigen_5.0.0 branch 3 times, most recently from 39ea50b to a00c535 Compare September 22, 2025 18:17
@Nelson-numerical-software
Nelson-numerical-software merged commit 15ff1bf into master Sep 22, 2025
1 check passed
@Nelson-numerical-software
Nelson-numerical-software deleted the eigen_5.0.0 branch September 22, 2025 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants