It looks like the “Unit Test Support” (using GoogleTest in my case) can’t be disabled in a per Configuration basis, just for the whole project
Is there any way that it can be disabled for a single configuration?
The reasoning behind this is that the compilation of the Google Test related file uses 14k of the flash, and we want to keep the generated binary as small as possible, and since production binaries don’t need to have unit test support, it doesn’t make sense to compile the Google Test files in this scenario.
This is supported starting from the new VisualGDB 5.5 RC1 using the Embedded CMake Project Subsystem. You can now define arbitrary platforms/configurations with arbitrary CMake variables and use the if() syntax in CMakeLists.txt to conditionally enable/disable various features. You can also have multiple targets per project (e.g. one unit test target and one regular application, both referencing a common library).
We will be publishing a few tutorials on the new Embedded CMake Project subsystem soon, explaining the new layout in details.