title: CMake, copy source files expand macros and build
body: <p>I need to do following.</p>
  
  <p>Source code is located in </p>
  
  <pre><code>src\MY_SOURCE_PATH\SourceFiles
  </code></pre>
  
  <p>I need to expand macros, especially because I use macros to generate some source code (guards for serializing enums in example, also the same thing is done by some libraries I use (Offirmo, SparkParticleEngine) but I don't want macros polluting my users namespace nor write a lot of code by hand.</p>
  
  <p>So I need to preprocess some macros (not all, for example I don't want to expand things like "assert" or include guards) and create a clone of my source dir.</p>
  
  <pre><code>src_expanded\MY_SOURCE_PATH\SourceFilesWithLessMacros
  </code></pre>
  
  <p>then I would run "build" on that new directory, and finally I want to move headers that match a particular REGEX (headers prefixed with "libraryPrefix") on a Include Directory</p>
  
  <pre><code>include\MY_SOURCE_PATH\HeadersMarkedAsPublicIncludes
  </code></pre>
  
  <p>so that users cannot include implementation headers</p>