Skip to content
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

FindCSparse: search for headers in PATH_SUFFIXES also in non-standard location #699

Merged
merged 1 commit into from
May 6, 2024

Conversation

traversaro
Copy link
Contributor

Basic Info

Info Please fill out this column
Ticket(s) this addresses None
Primary OS tested on Windows
Robotic platform tested on Not relevant, compilation fix.

Description of contribution in a few bullet points

The current version of find_package(CSparse) can fail with error:

2024-05-03T04:23:50.6918446Z   Could NOT find CSparse (missing: CSPARSE_INCLUDE_DIR)
2024-05-03T04:23:50.6918881Z Call Stack (most recent call first):
2024-05-03T04:23:50.6920132Z   C:/Users/runneradmin/micromamba/envs/testpr_env/conda-bld/ros-0_1714698402507/_build_env/Library/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
2024-05-03T04:23:50.6921325Z   CMake/FindCSparse.cmake:24 (find_package_handle_standard_args)
2024-05-03T04:23:50.6921779Z   CMakeLists.txt:79 (find_package)

when CSparse is not installed in one of the locations hardcoded in the PATHS argument of find_path. For example, it would also fail if you compiled suitesparse inside a colcon workspace instead of installing it from binary .deb packages.

CMake's find_path offers the PATH_SUFFIXES option (already available in CMake 3.5 https://cmake.org/cmake/help/v3.5/command/find_path.html, minimum required version for this package). In theory we could remove the other arguments passed to PATHS, but as they do not hurt and leaving them minimize the risk of regressions, I think we can leave them.

A similar fix done in g2o: RainerKuemmerle/g2o@4f092a4 .

Description of documentation updates required from your changes


Future work that may be required in bullet points

@SteveMacenski SteveMacenski merged commit d71e184 into SteveMacenski:ros2 May 6, 2024
1 check passed
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