-
Notifications
You must be signed in to change notification settings - Fork 401
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
Topic/move headers #2070
Topic/move headers #2070
Conversation
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.
Using GLOB
/ GLOB_RECURSE
to find source files is a wrong CMake practice, and I think we should use this PR to fix this.
- This glob will be expanded only on the first configure call. Therefore, when someone with an existing successful
build
dir rungit pull
and get new source files, those new sources will be ignored by CMake, leading to hard to understand bugs - This glob would also include unwanted temporary files or archive artifacts
(eg., on NetBSD, with a .tar.gz created on mac osx:
$ wget https://github.com/stack-of-tasks/pinocchio/releases/download/v2.6.20/pinocchio-2.6.20.tar.gz
$ gzip -d pinocchio-2.6.20.tar.gz
$ pax -r < pinocchio-2.6.20.tar
$ find pinocchio-2.6.20/src/core/ -name \*.hpp
pinocchio-2.6.20/src/core/binary-op.hpp
pinocchio-2.6.20/src/core/PaxHeader/binary-op.hpp
pinocchio-2.6.20/src/core/PaxHeader/unary-op.hpp
pinocchio-2.6.20/src/core/unary-op.hpp
)
3. jrl-cmakemodule install public headers automatically when they are defined in a standard way
I understand this is boring to write the list of all the files we want, but this would help in:
- not having to write regex to conditionally exclude some files
- not having to create directories / symlink files around
- not having to write a custom function to install those
refs.:
https://github.com/jrl-umi3218/jrl-cmakemodules/blob/master/header.cmake
https://cmake.org/cmake/help/latest/command/file.html#filesystem
Note: We do not recommend using GLOB to collect a list of source files from your source tree
I Agree on GLOB/GLOB_RECURSE pitfall. I will have a look on jrl-cmakemodule header management. |
@nim65s It's good, last commit remove GLOB/GLOB_RECURSE for sources. And it use ${PROJECT_NAME}_HEADERS to install the headers files. |
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 is really nice, thanks !
I still have a couple comments
Co-authored-by: Guilhem Saurel <[email protected]>
## [2.6.21] - 2023-11-27 ### Added - Add inverse dynamics (`rnea`) Python and C++ example ([2083](stack-of-tasks/pinocchio#2083)) - Add visualization of Frames in MeshCat viewer ([2098](stack-of-tasks/pinocchio#2098)) ### Fixed - Re-initialize `Ycrb[0]` in `crbaMinimal` ([2040](stack-of-tasks/pinocchio#2040)) - Fix custom scalar use in `log` function ([2047](stack-of-tasks/pinocchio#2047)) - Raise exception on wrong input size in `XYZQUATToSE3` Python binding function ([2073](stack-of-tasks/pinocchio#2073)) - Remove memory leak in `buildGeomFromUrdf` and `buildGeomFromUrdfString` Python binding functions ([2082]()stack-of-tasks/pinocchio#2082) - Fix Panda3D viewer examples ([2087](stack-of-tasks/pinocchio#2087)) - Fix centroidal dynamics derivatives with respect to time ([2094](stack-of-tasks/pinocchio#2094))) ### Changed - Rename freeflyer_joint to root_joint in `humanoid` sample model ([2043](stack-of-tasks/pinocchio#2043)) - CMake minimal version is now 3.10 ([2055](stack-of-tasks/pinocchio#2055)) - Split headers and sources in different directories to have a more standard C++ project ([2070](stack-of-tasks/pinocchio#2070)) ### Removed - Remove support to `hpp-fcl` < v2.0.0 ([2086](stack-of-tasks/pinocchio#2086)) ## Packaging changes - removed patches ad, ae: fixed upstream 🎉 - updated patches af, ah, an - added patch ao
Pinocchio headers in repository are not organized as installed ones.
In this merge request, includes and sources are split to have a standard CMake/C++ project layout.
Headers in the repository and installed ones have the same organization.
This will avoid to have to create symlinks and will solve #2069