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.
To view the current build mode:
To list possible modes:
To set the current build mode to 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.