Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can directly set cmake args if you add them to your catkin_make call. E. g. you could

catkin_make -DCMAKE_CXX_FLAGS=-Wall -DCMAKE_C_FLAGS=-Wall

But you have to be aware that you have !always! to append to the flags afterwards in your CMakeLists.txt like

set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOTHER_STUFF=1" )

Also warnings will only be printed if your code is actually compiled. Files already compiled and not cahnged will not be compiled in a repeative call, i. e. possible warnings might not be printed. If you want to be sure all warnings in your workspace are really printed you might want to erase your build and devel subfolders of your catkin_ws before calling catkin_make...