[ros-users] [Discourse.ros.org] [Next Generation ROS] Ament build for Release

Dirk Thomas ros.discourse at gmail.com
Fri Dec 9 20:41:58 UTC 2016




`Visual Studio` behaves very different compared to `make` when it comes to the `CMAKE_BUILD_TYPE`.

When using the `Makefile` generator of CMake you select a specific build type by passing `-DCMAKE_BUILD_TYPE=...`. The subsequent make invocation builds all the code with that build type. If you don't specify any it is neither a `Debug` nor a `Release` build but something else (called `None`).

When using the `Visual Studio` generator of CMake the generated visual studio project will have configuration for all possible build types. The build type is **not** selected at CMake configure time. When you then build the Visual Studio project you must select a valid build type (`None` is not an option here). When `ament_tools` invokes VS it considers the build type you have passed via the command line. If none was passed it has to make a decision and chooses `Release` (see https://github.com/ament/ament_tools/blob/5811a5002233fb32da5faab891e6b646430005e4/ament_tools/build_types/cmake.py#L275).






---
[Visit Topic](https://discourse.ros.org/t/ament-build-for-release/915/8) or reply to this email to respond.




More information about the ros-users mailing list