[ros-users] Using rosbuild_add_roslaunch_check() macro with …

Forside
Vedhæftede filer:
Indlæg som e-mail
+ (text/plain)
+ (text/html)
Slet denne besked
Besvar denne besked
Skribent: User discussions
Dato:  
Til: ros-users
Emne: [ros-users] Using rosbuild_add_roslaunch_check() macro with different environment variables
Hi,

I am using the rosbuild_add_roslaunch_check() macro from rosbuild to test launch files. It is a great tool which is very useful and works fine. The problem I am facing is that it is not possible to declare two tests of the same launch file with different environment variables.

E.g. I would like to use:
    rosbuild_add_roslaunch_check(ros/launch/mylaunch.launch VAR1=foo)
    rosbuild_add_roslaunch_check(ros/launch/mylaunch.launch VAR1=bar)


but this ends up in an error:
    CMake Error: Attempt to add a custom rule to output ".../roslaunch_check_ros_launch_mylaunch.launch.rule" which already has a custom rule.
    -- Configuring incomplete, errors occurred!
    make: *** [all] Error 1


Is there a way to use the macro multiple times for the same launch file with different environment variables? Are there more use cases (other than mine) that require an extension of this macro?

Looking forwards to your opinions.

Best regards,
Florian