Repository navigation
Fix #1458 Eigen 5.0.0 support - #1459
Conversation
There was a problem hiding this comment.
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.
| 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() |
There was a problem hiding this comment.
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.
| 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.") |
| if (DEFINED Eigen3_VERSION) | ||
| if (Eigen3_VERSION VERSION_LESS "3.3") |
There was a problem hiding this comment.
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 ...).
|
|
||
| - 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. |
There was a problem hiding this comment.
Use https for the GitHub link and remove the trailing space to match common changelog formatting: #1458: Eigen 5.0.0 used if detected.
| - [#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. |
39ea50b to
a00c535
Compare
a00c535 to
84db49d
Compare
No description provided.