-
Notifications
You must be signed in to change notification settings - Fork 6
Refactor CMake with JRL CMake Modules v2 (v2) #40
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
base: main
Are you sure you want to change the base?
Conversation
ManifoldFR
left a comment
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.
Seems good to me overall 😄
CMakeLists.txt
Outdated
| 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() |
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.
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.
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.
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 |
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.
| "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 |
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.
| "Build EigenPy with the Accelerate support (Apple only)" OFF | |
| "Build nanoeigenpy with support for the Accelerate framework (Apple only)" OFF |
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
pixi.toml: remove duplicated nanoeigenpy
Otherwise the lib is install in %PREFIX%/Library/Lib/site-packages/nanoeigenpy.pyd But we need %PREFIX%/Lib/site-packages/nanoeigenpy.pyd
we only need the minimum version to be set to enable the correct policies
It was always required from nanobind
we now export eigen and cholmod correctly
This PR is a full rewrite of the CMake files with the JRL CMake Modules v2.
c++17minimum requiredpytestNOTE: This the commit are cherry-picked and squashed from the previously accidentitaly merged #28