title: Different compile flags for same file in different targets
body: <p>I would like to include a <em>.cpp-file</em> in two different targets (becoming two VS projects after running CMake). I would like to set different <code>COMPILE_FLAGS</code> for these projects.</p>
  <p>However, when I do</p>
  <pre><code>SET_TARGET_PROPERTIES(myfile.cpp PROPERTIES COMPILE_FLAGS &quot;flags1&quot;)
  ADD_EXECUTABLE(project1 myfile.cpp)
  SET_TARGET_PROPERTIES(myfile.cpp PROPERTIES COMPILE_FLAGS &quot;flags2&quot;)
  ADD_EXECUTABLE(project2 myfile.cpp)
  </code></pre>
  <p>the <code>flags2</code> applies for both projects, so it seems like the properties are overwritten on line 3 and not considered on line 2. Is this true or am I missing something? Is there a way to solve this?</p>