I think the fact that release mode can only be specified with -DCMAKE_BUILD_TYPE=Release should be documented somewhere besides this one github issue. If you try googling colcon build release mode you'll see what I mean. Perhaps put this information on the ros2 tutorial page? https://docs.ros.org/en/humble/Tutorials.html
Originally posted by @Nate711 in https://github.com/colcon/colcon-cmake/issues/96#issuecomment-1387217312