Skip to content

Conversation

@ahoarau
Copy link
Contributor

@ahoarau ahoarau commented Jan 5, 2026

This PR is a full rewrite of the CMake files with the JRL CMake Modules v2.

  • Full rewrite of the CMake Files in modern CMake
  • Remove submodules: archives can now be used
  • c++17 minimum required
  • Migrate python tests to pytest
  • Eigen 5 build fixes

NOTE: This the commit are cherry-picked and squashed from the previously accidentitaly merged #28

@ahoarau ahoarau marked this pull request as draft January 5, 2026 14:05
@ManifoldFR ManifoldFR marked this pull request as ready for review January 9, 2026 20:55
@ManifoldFR ManifoldFR enabled auto-merge January 9, 2026 20:55
Copy link
Member

@ManifoldFR ManifoldFR left a comment

Choose a reason for hiding this comment

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

Seems good to me overall 😄

CMakeLists.txt Outdated
Comment on lines 185 to 193
if(BUILD_WITH_CHOLMOD_SUPPORT)
target_link_libraries(nanoeigenpy PRIVATE SuiteSparse::CHOLMOD)
target_compile_definitions(nanoeigenpy PRIVATE NANOEIGENPY_HAS_CHOLMOD)
endif()

if(BUILD_WITH_ACCELERATE_SUPPORT AND APPLE)
target_link_libraries(nanoeigenpy PRIVATE Accelerate::Accelerate)
target_compile_definitions(nanoeigenpy PRIVATE NANOEIGENPY_HAS_ACCELERATE)
endif()
Copy link
Member

@ManifoldFR ManifoldFR Jan 9, 2026

Choose a reason for hiding this comment

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

Yeah that's good, it's cleaner than what I was doing before in fwd.hpp. I think the definitions should be public however?

Some users might want to consume the omnibus <nanoeigenpy/decompositions.hpp> header downstream, but it requires the defines to exist for the cholmod/accelerate wrappers to be pulled in.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Definitely a mistake here. Added the dependencies to the nanoeigenpy_headers target. We now export the dependencies correctly. Thanks.

CMakeLists.txt Outdated
jrl_option(INSTALL_DOCUMENTATION "Generate and install the documentation" OFF)

jrl_option(BUILD_WITH_CHOLMOD_SUPPORT
"Build EigenPy with the Cholmod (LGPL) support. See CHOLMOD/Doc/License.txt for further details." OFF
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"Build EigenPy with the Cholmod (LGPL) support. See CHOLMOD/Doc/License.txt for further details." OFF
"Build nanoeigenpy with support for Cholmod (LGPL). See CHOLMOD/Doc/License.txt for further details." OFF

We had copied the comment string over from the original Eigenpy, and forgot to change it 😅

CMakeLists.txt Outdated
)

jrl_option(BUILD_WITH_ACCELERATE_SUPPORT
"Build EigenPy with the Accelerate support (Apple only)" OFF
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"Build EigenPy with the Accelerate support (Apple only)" OFF
"Build nanoeigenpy with support for the Accelerate framework (Apple only)" OFF

@ahoarau ahoarau marked this pull request as draft January 10, 2026 07:25
auto-merge was automatically disabled January 10, 2026 07:25

Pull request was converted to draft

gersemirc: put back gersemi definitions
no chance observed in this repo. Its for future proofness.
ignore nix result

ignore conda generated files
use set_property for multiline env

fetch jrl-cmakemodules if not found, tmp solution
add missing COMMAND to check if command is available

add a check for the python module name inside the lib

no need to compile python files, we don't have any

include stubs pyi files in installation
on ubuntu 24.04 the nanobind-dev package brind an old incompatible version 1.9.2-1

fallback to fetchcontent if nanobind 2.5.0 is not found.
we mimic the upstream behavior, but using fetchcontent instead of submodules
look for version >=1.1.2 of the jrl
we havent updated the version number yet
if we apt install nanobind-dev on ubuntu 24, we get nanobind 1.9.1, which does not ship version from the config file

require python 3.11 for stubs generation
ROS Humble not supported

use VERSION_GREATER_EQUAL and use correct python var

add BUILD_TESTING so it appears in the summary
disabling cache for testing
@ManifoldFR ManifoldFR marked this pull request as ready for review January 10, 2026 16:01
@ahoarau ahoarau marked this pull request as draft January 12, 2026 06:29
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