-
Notifications
You must be signed in to change notification settings - Fork 81
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
jsk_topic_tools/cmake/nodelet.cmake: add random prefix before _single… #1586
Conversation
…_nodelet_exec_name
@k-okada |
I see. Thank you! |
@@ -4,7 +4,8 @@ macro(jsk_nodelet _nodelet_cpp _nodelet_class | |||
_single_nodelet_exec_name _CODE_PARAM_NAME) | |||
list(APPEND ${_CODE_PARAM_NAME} ${_nodelet_cpp}) | |||
set(NODELET ${_nodelet_class}) | |||
set(DEFAULT_NODE_NAME ${_single_nodelet_exec_name}) | |||
string(RANDOM __NODENAME_PREFIX) | |||
set(DEFAULT_NODE_NAME JSK_NODELET_${__NODENAME_PREFIX}_${_single_nodelet_exec_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.
@k-okada Is there any rationale that you randomized the prefix?
I wonder any target may miss caches in the case of catkin build --force-cmake
.
How about changing __NODENAME_PREFIX
to, for example, just PROJECT_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.
@furushchev thank you for feedback, yes PROJECT_NAME
would be better #1591
…_nodelet_exec_name
I have asked personal question from a @sanketrahul about '
target with same name already exists
. This will occur only when you usecatkin_make
,catkin build
users do not encounter this error, because it is isolated build so that current cmake target will not collide with another packages's target.https://gist.github.com/sanketrahul/1223fa186110499f4ef01533f928b6d9