Overview
This is strictly not an essential tool for cross-compiling, but it works rather conveniently with the rosplatform script, so is included in this suite.
Usage
To view the current build mode:
rosbuild
To list possible modes:
rosbuild list
To set the current build mode to Debug:
rosbuild Debug
Under the Hood
It uses a currently configured rosplatform configuration (if none are present, it inserts the default vanilla configuration). It parses this looking for the CMAKE_BUILD_TYPE variable and does some string substitutions to manage the switches between modes.