I'm trying to build a static library (specifically, Protobuf) using Visual Studio 2017 and a CMake based project (and the default Ninja backend).
I want to pass the /Z7 compiler switch when building (or more precisely, replace the default /Zi with /Z7), so that the debugging information ends up embedded in the .lib file rather than creating separate .pdb files.
I know absolutely nothing about CMake (but I do otherwise have a working build). How do I do this?
Preferably, if possible, using only changes to the VS-created CMakeSettings.json file, without making any changes to the upstream CMakeLists.txt files.
If that's not possible, then some way to make a new CMakeLists.txt file which inherits everything from the unmodified upstream file but overrides this one setting would also be good.
My current CMakeSettings.json file specifies both Debug and RelWithDebInfo configurations.