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