Re: [ros-users] rosmake CMakeLists.txt rosversion test

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Ken Conley
Date:  
To: ros-users
Subject: Re: [ros-users] rosmake CMakeLists.txt rosversion test
FYI: last Monday, I upgraded (on trunk) the rosversion tool to take in
any stack name as an argument. It currently scrapes from the
CMakeLists.txt file, but as ticket #3010 progresses, I'll update it in
kind. We hope to have better version mechanisms for Diamondback.

- Ken

On Wed, Sep 15, 2010 at 1:15 PM, Brian Gerkey <> wrote:
> hi Ben,
>
> What you're doing is reasonable, given that there's not currently
> support for doing it any better.  However, you really want to be
> testing the version of actionlib, not ros; the two evolve
> independently.
>
> There's currently no way to do that, so I've ticketed myself to add a
> package/stack version query in rosbuild:
> https://code.ros.org/trac/ros/ticket/3010 .
>
>        brian.
>
> On Wed, Sep 15, 2010 at 7:11 AM, Axelrod, Benjamin <> wrote:
>> Is there an easy way to test for the ROS version in a CMakeLists.txt file?
>> For example, when using actionlib, two different sets of commands must be
>> used to generate the action messages.  I came up with this CMake way to do
>> it, but it is rather clumsy and I am not exactly sure of the version
>> numbers.  It would be nice if rosbuild provided simple macros for this.
>>
>>
>>
>> execute_process(COMMAND rosversion ros
>>
>>                 RESULT_VARIABLE rosversion)
>>
>> IF (${rosversion} GREATER 1.05)
>>
>>   message("CTurtle")
>>
>> ELSE (${rosversion} GREATER 1.05)
>>
>>   message("BoxTurtle")
>>
>> ENDIF (${rosversion} GREATER 1.05)
>>
>>
>>
>> Thanks,
>>
>> -Ben
>>
>>
>>
>> Ben Axelrod
>>
>> Research Scientist
>>
>> iRobot Corporation
>>
>> 8 Crosby Drive, Mail Stop 8-1
>>
>> Bedford, MA 01730
>>
>> (781) 430-3315 (Tel)
>>
>> (781) 960-2628 (Fax)
>>
>>
>>
>>
>>
>> _______________________________________________
>> ros-users mailing list
>>
>> https://code.ros.org/mailman/listinfo/ros-users
>>
>>
> _______________________________________________
> ros-users mailing list
>
> https://code.ros.org/mailman/listinfo/ros-users
>