[ros-users] rosbuild seems to cache external cmake files

Ruben Smits ruben.smits at mech.kuleuven.be
Tue Aug 17 11:16:48 UTC 2010


On Tuesday 17 August 2010 13:08:43 Ruben Smits wrote:
> On Tuesday 17 August 2010 13:00:45 René Ladan wrote:
> > 2010/8/17 Ruben Smits <ruben.smits at mech.kuleuven.be>:
> > >  Hi,
> > > 
> > > I'm creating a package (ros_integration) that exports a cmake file
> > > using the roslang tag:
> > > manifest.xml snippet (:
> > > <export>
> > > 
> > >    <roslang cmake="${prefix}/cmake/GenerateRTTtypekit.cmake"/>
> > > 
> > > </export>
> > > 
> > > I recently moved the package to a different location and name and now
> > > rosbuild is giving me problem:
> > > 
> > > [rosbuild] Building package ros_integration_common_msgs
> > > [rosbuild] Including
> > > /opt/ros/cturtle/ros/core/roscpp/cmake/roscpp.cmake [rosbuild]
> > > Including /opt/ros/cturtle/ros/core/rospy/cmake/rospy.cmake [rosbuild]
> > > Including
> > > /opt/ros/cturtle/ros/core/roslisp/cmake/roslisp.cmake [rosbuild]
> > > Including /home/rsmits/ros/kul-ros-
> > > pkg/stacks/orocos_2.0/trunk/ros_integration/cmake/GenerateRTTtypekit.cm
> > > ak e CMake Error at /opt/ros/cturtle/ros/core/rosbuild/public.cmake:400
> > > (message): Cannot include non-existent exported cmake file
> > > 
> > >  /home/rsmits/ros/private-kul-ros-
> > > 
> > > pkg/orocos_rtt_ros_integration/cmake/GenerateRTTtypekit.cmake
> > > 
> > > Call Stack (most recent call first):
> > >  CMakeLists.txt:12 (rosbuild_init)
> > > 
> > > Apparently rosbuild is still pointing to the old location of the cmake
> > > file. How can i make rosbuild forget about the old file? I already
> > > tried cleaning up the package but that did not work.
> > 
> > Did that include (manually) removing the build directory in the package?
> > CMake uses that directory as a cache for settings and derived Makefiles.
> 
> Yes it did, but i think I might have found the problem. I should not export
> the cmake files themselves but only the directory containing them. And
> there where i want to use the macro defined in the cmake file use
> rosbuild_include to manually include it.
> 
> Apparently I had a old version (with a different name) of the package that
> still contained the export tag but not the file.

Just for the record:

I should have exported:
<export>
    <rosbuild cmake_directory="${prefix}/cmake"/>
 </export>

instead of the roslang stuff and had to use

rosbuild_include(ros_integration GenerateRTTtypekit)

in my CMakeLists.txt to get the cmake-macros I needed.

Ruben

> Ruben
> 
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users



More information about the ros-users mailing list