-
Notifications
You must be signed in to change notification settings - Fork 68
Refactor CMake with JRL CMake Modules v2 #437
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: devel
Are you sure you want to change the base?
Conversation
bd8de6d to
c36d61e
Compare
jorisv
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.
Nice work
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.
This can be removed. Pixi CI replace the conda-ci.
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.
This should be removed. The Pixi CI will replace this workflow.
| import os | ||
|
|
||
| os.environ["KMP_DUPLICATE_LIB_OK"] = ( | ||
| "True" # to avoid issues with OpenMP in some environments | ||
| ) | ||
|
|
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.
Can you show me how to reproduce this issue ?
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.
It is simply ported from upstream https://github.com/Simple-Robotics/proxsuite/blob/devel/bindings/python/CMakeLists.txt#L254-L258
I have no way to verify if this is still useful/relevant.
Much better to put it here than the complicated code inside cmake with conditions. It should not hurt of not used.
| "${PROJECT_NAME}-example-py-${EXAMPLE_NAME}" | ||
| "${EXAMPLE_FILE}" | ||
| "bindings/python" | ||
| function(proxsuite_add_python_example name) |
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.
This should be added as a test
| function(proxsuite_add_example name) | ||
| add_executable(proxsuite-example-${name} ${name}.cpp) | ||
| target_link_libraries(proxsuite-example-${name} PRIVATE proxsuite) | ||
| add_dependencies(proxsuite-examples-cpp proxsuite-example-${name}) | ||
| endfunction() |
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.
This should be added as a test
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.
We must generate ament file before merging this PR
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.
We must prefix all option with PROXSUITE_ when jrl_option support back compatibility option.
| include(FetchContent) | ||
| FetchContent_Declare( | ||
| "jrl-cmakemodules" | ||
| GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git" | ||
| catch2 | ||
| URL https://github.com/catchorg/Catch2/archive/refs/tags/v3.11.0.zip | ||
| URL_HASH MD5=ce96600812f04d19694f488ed2de75c5 | ||
| EXCLUDE_FROM_ALL | ||
| ) | ||
| FetchContent_MakeAvailable("jrl-cmakemodules") | ||
| FetchContent_GetProperties("jrl-cmakemodules" SOURCE_DIR JRL_CMAKE_MODULES) | ||
| FetchContent_MakeAvailable(catch2) | ||
| include(${catch2_SOURCE_DIR}/extras/Catch.cmake) |
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.
Add a comment to know when we can remove this part (on the next Ubuntu LTS ?)
| if(NOT cereal_FOUND) | ||
| message( | ||
| WARNING | ||
| "[proxsuite] cereal library not found. Falling back to FetchContent to get cereal v1.3.2" | ||
| ) | ||
| include(FetchContent) | ||
| FetchContent_Declare( | ||
| cereal | ||
| URL https://github.com/USCiLab/cereal/archive/refs/tags/v1.3.2.zip | ||
| URL_HASH MD5=953a872cd3d78abf2e29212987a0ba71 | ||
| SOURCE_SUBDIR | ||
| download_only | ||
| EXCLUDE_FROM_ALL | ||
| ) | ||
| FetchContent_MakeAvailable(cereal) | ||
| add_library(cereal::cereal INTERFACE IMPORTED) | ||
| target_include_directories(cereal::cereal SYSTEM INTERFACE ${cereal_SOURCE_DIR}/include) | ||
| 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.
Add a comment to know when we can remove this part (on the next Ubuntu LTS ?)
| if(NOT nanobind_FOUND) | ||
| message( | ||
| WARNING | ||
| "[proxsuite] nanobind library not found. Falling back to FetchContent to get nanobind v2.9.2" | ||
| ) | ||
| include(FetchContent) | ||
| FetchContent_Declare( | ||
| nanobind | ||
| GIT_REPOSITORY https://github.com/wjakob/nanobind.git | ||
| GIT_TAG v2.9.2 | ||
| EXCLUDE_FROM_ALL | ||
| ) | ||
| FetchContent_MakeAvailable(nanobind) | ||
| 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.
Add a comment to know when we can remove this part (on the next Ubuntu LTS ?)
3c9d458 to
6ed7b91
Compare
remove custom functions as they format in a strange way when favour-inlining (the default) is used.
and submodule dirs
seen with sarah
fixes warnings in the proxsuite-test-utils
its meant to be used as arg (-D), not env. --verbose is better
…erred otherwise we need to add set_target_properties(run-proxqp PROPERTIES CXX_SCAN_FOR_MODULES OFF)
This PR is a full rewrite of the CMake files with the JRL CMake Modules v2.
c++17minimum requiredpixisupportfind_packagecomponentsfind_package(proxsuite 0.7.1 CONFIG REQUIRED COMPONENTS proxsuite vectorized)