-
Notifications
You must be signed in to change notification settings - Fork 74
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
find_package(catkin) #61
Conversation
I don't think using this simple function justifies a run dependency on catkin. I have created #62 to get rid of the implicit dependency. |
Agreed, better to remove the dependency. |
In order to make |
@@ -18,6 +18,9 @@ set(GENMSG_CHECK_DEPS_SCRIPT "${genmsg_DIR}/../../../@(CATKIN_PACKAGE_BIN_DESTIN | |||
|
|||
include(CMakeParseArguments) | |||
|
|||
# We need to call assert_file_exists() |
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.
Please either remove the comment (since the mentioned function is not the only thing used from catkin) or extend to all parts of catkin which are used. Since the second option is likely getting outdated I would suggest the first one.
@@ -17,6 +17,7 @@ | |||
<author>Ken Conley</author> | |||
|
|||
<buildtool_depend version_gte="0.5.74">catkin</buildtool_depend> | |||
<run_depend version_gte="0.5.74">catkin</run_depend> |
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.
I don't think there is a reason for specifying a minimum version of catkin. All the functions and variables used at runtime exist in catkin "forever".
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.
So the buildtool depend should have a minimum version, but the run depend should not?
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.
Yes, the minimum version for the build dependency was introduced in 6bbac53 to ensure a new enough catkin version is being used when compiling the package. That is not necessary for the runtime of the package.
169bf66
to
64f78b1
Compare
Min version updated and commits squashed. |
@@ -18,6 +18,9 @@ set(GENMSG_CHECK_DEPS_SCRIPT "${genmsg_DIR}/../../../@(CATKIN_PACKAGE_BIN_DESTIN | |||
|
|||
include(CMakeParseArguments) | |||
|
|||
# We need various macros and variables that are provided by catkin | |||
find_package(catkin REQUIRED) |
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.
catkin
variables are already being used in the lines above. Therefore I think this needs to be moved to line ~10.
64f78b1
to
e54d7e3
Compare
Moved earlier in e54d7e3 |
Thanks for the PR and iterating on it. |
If you have a directory with two files,
Foo.msg
andCMakeLists.txt
, with the following content:Foo.msg:
CMakeLists.txt:
then running
cmake
yields this error about an undefined macro that's provided by catkin:The error can be avoided by uncommenting the
find_package(catkin REQUIRED)
line in the user'sCMakeLists.txt
, but that's not a good answer.This PR pushes the
find_package(catkin REQUIRED)
call into genmsg, where the macro is being called. I'm not sure whether genmsg'spackage.xml
dependencies should also be modified.