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.
Sorry, MSBuild projects share the same project structure (i.e. the set of source files) across all platforms and configurations, hence global settings like the test framework/BSP affect all configurations.
You can work around it by defining per-configuration preprocessor macros and #ifdef-ing out the code that calls test framework functionality, but the test sources will be still present in Solution Explorer.