-
Notifications
You must be signed in to change notification settings - Fork 280
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
Handling package-local CMake modules #950
Comments
Hi @zultron, is that link to the right question? I don't see |
Argh, really dumb copy'n'paste error. I'll fix the original description to |
Ah, I should have figured that out from the context. I wasn't able to find the rationale for avoiding An alternative to using |
Without further information why this "rule" was added to the docs I suggest to remove it since I don't see a reason this usage shouldn't be "allowed". See #951. |
I submitted a new issue in fkie/catkin_lint#55 in case someone over there wants to weigh in over here. If #951 is merged, I agree with @dirk-thomas. If there's no known reason to disallow modifying If there does turn out to be a good reason for it, @sloretz's suggestion to create a special package is as elegant a workaround as I can imagine in cases where contributing new rules to the ROS |
Since #951 is merged, I went ahead and submitted PR fkie/catkin_lint#56, reflecting the change in Thanks, @dirk-thomas. |
When a ROS package uses the "Foo" project with no upstream-provided CMake module, the author may wish to write e.g.
cmake/FindFoo.cmake
and thenfind_package(Foo)
.However, the "CMake coding standards" document says simply, "Do not set
CMAKE_MODULE_PATH
" without suggesting the correct way to do this.Others who have asked this question haven't found satisfactory answers, such as this question on ROS Answers (the OP ended up answering his own question by setting
CMAKE_MODULE_PATH
, contradictory to coding standards).Anyway, other experienced ROS developers seem unaware of and violate this standard, such as here. (I understand
cmake_modules
makes this an obsolete example, and the line could simply be removed, but....)The Indigo Migration guide suggests that CMake modules might be contributed to the ROS
cmake_modules
package. However, that package's maintainers wouldn't be interested in modules for an unpublished package, and.rosinstall
ing a locally-forked version withFindFoo.cmake
is a lot of overhead.So what is the correct way to find a CMake module that's local to a package? Is this something missing from catkin, something missing from the docs, or something best accomplished some other way?
The text was updated successfully, but these errors were encountered: