How to add additional compile flags
For the ARM build of the PCL_ROS package to work I need to add some additional compiler (gcc / g++) flags. What is the right way to do it?
For the ARM build of the PCL_ROS package to work I need to add some additional compiler (gcc / g++) flags. What is the right way to do it?
See the rosbuild/CmakeLists docs.
In particular, the rosbuild_add_compile_flags
and rosbuild_remove_compile_flags
macros are likely what you want.
$ROS_ROOT/core/rosbuild/rosconfig.cmake is where ros configuration starts. There are three places ros looks for rosconfig.cmake, and if you parse rosbuild's rosconfig.cmake, you'll find it essentially does the following:
If neither of the above are found, or not all configuration variables are set:
If you're cross compiling and want to add cpu specific flags globally, you may want to use eric's suggestion and include them in $ROS_ROOT/rosconfig.cmake. This is neater as it is under your control and avoids hacking someone else's CMakeLists.txt files (which will disappear next time you install).
If you need it for a certain package only, then that would be the only way to go, though I'd suggest finding a way to upstream the changes so others can benefit as well.
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2011-02-23 08:40:29 -0500
Seen: 4,182 times
Last updated: Feb 23 '11
Problem when building with rosbuild
CUDA Version to use with ROS Indigo
Catkin_make_isolated pthread linking error
roscd, rospack find work, rosmake fails?
again error with opencv and libboost please help
Install SWIG python bindings in install space
How to transplant ros to the ARM with ubuntu 11.10?