The CMAKE_BUILD_TYPE
variable is used to specify a build type. Typically, the selected option (by default empty, but it can be Release
, Debug
, or some others) is used to figure out what options to use/flags to set when cmake actually calls the compiler.
In short, Release
tells the compiler to do optimization and omit debug information that Debug
would tell it to keep. I've seen some people recommend using -DCMAKE_BUILD_TYPE=Release
for better performance.
Calling catkin_make
(and not specifying a value for CMAKE_BUILD_TYPE
) results in something similar to using the Debug
value.
See:
https://codeyarns.com/2015/05/14/buil...
https://cmake.org/cmake/help/v3.0/var...
This is a direct duplicate of at least #q294789, which was asked 4 days ago.