 <p>Try this (note also that recent CMake means you don't need to USE_CAPS_ALL_THE_TIME):</p> <pre><code>get_target_property(FLAGS ${MyTarget} COMPILE_FLAGS) set_target_properties(${MyTarget} PROPERTIES COMPILE_FLAGS "${FLAGS} /FI\"${ForcedHeader_A}\"/FI\"${ForcedHeader_B}\"") </code></pre>