ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

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 Debug.

See:
https://codeyarns.com/2015/05/14/build-types-in-cmake/ https://cmake.org/cmake/help/v3.0/variable/CMAKE_BUILD_TYPE.html

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 Debug.

See:
https://codeyarns.com/2015/05/14/build-types-in-cmake/ https://codeyarns.com/2015/05/14/build-types-in-cmake/
https://cmake.org/cmake/help/v3.0/variable/CMAKE_BUILD_TYPE.html

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/build-types-in-cmake/
https://cmake.org/cmake/help/v3.0/variable/CMAKE_BUILD_TYPE.html