title: Applying `set_property` on source file generated for CMake precompiled headers without hardcoding PCH path
body: <p>I am using CMake's <a href="https://cmake.org/cmake/help/git-stage/command/target_precompile_headers.html" rel="nofollow noreferrer"><code>target_precompile_headers</code></a> to generate a precompiled header from a <code>PCH.hpp</code> file in a project I'm contributing to.</p>
  <p>I need to ensure that the resultant generated source file has the exact same compilation and warning flags as the other source files in my project, to avoid <code>-Winvalid-pch</code> issues.</p>
  <p>At the moment, I am doing this:</p>
  <pre><code>target_precompile_headers(sfml-system PRIVATE &quot;${CMAKE_SOURCE_DIR}/src/SFML/PCH.hpp&quot;)
  
  set_property(SOURCE &quot;${CMAKE_BINARY_DIR}/src/SFML/System/CMakeFiles/sfml-system.dir/cmake_pch.hxx.cxx&quot; 
               APPEND_STRING PROPERTY COMPILE_FLAGS &quot; ${WARNINGS}&quot;)
  </code></pre>
  <p>However, having to hardcode the path to the generated <code>cmake_pch.hxx.cxx</code> file seems brittle, potentially non-portable, and a maintenance burden.</p>
  <p><strong>Is there any way I can retrieve the path to the <code>cmake_pch.hxx.cxx</code> file without hardcoding it?</strong></p>