How can I add C++ optimization flags to ROS
I am running an opencv code on ROS and I really need to turn on the -O3 optimization flag.
I am running an opencv code on ROS and I really need to turn on the -O3 optimization flag.
Call catkin_make -DCMAKE_BUILD_TYPE=Release
to turn on the default optimization flags for release builds. -O3
should be in there, as far as I know.
Otherwise, you can add compile flags on a per node basis by specifying set_target_properties(<TARGET> PROPERTIES COMPILE_FLAGS "-O3")
in the CMakeLists.txt
. However, I'm not sure how this is handled then in combination with a build type.
thank you very much. I just typed in catkin_make -DCMAKE_BUILD_TYPE=Release and it worked fine thanks.
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2015-07-15 09:24:53 -0500
Seen: 1,961 times
Last updated: Jul 15 '15
Why cv_bridge uses opencv3.2 in ros melodic?
Executable not found in /bin directory
what is the use of " .format(**config)) "
Where do I save an Image for calling it with cv::imread
rosrun still use python2.7 instead of 3.8 inside noetic
timing function for while loop
On MacOS: Running ROS and its gui tools through a docker image edit