title: Cmake executable with auto-generated sources
body: <p>I want to make an executable from, for example, test_runner.cpp:</p>
  
  <pre><code>add_executable(myexe ${CMAKE_CURRENT_BINARY_DIR}/test_runner.cpp)
  </code></pre>
  
  <p>But this particular cpp file is itself auto-generated in a pre-build command:</p>
  
  <pre><code>add_custom_command(
      TARGET myexe PRE_BUILD
      COMMAND deps/cxxtest-4.4/bin/cxxtestgen --error-printer -o "${CMAKE_CURRENT_BINARY_DIR}/test_runner.cpp" src/My_test_suite.h
      WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
  )
  </code></pre>
  
  <p>But now I can't generate new cmake build files because it complains about the missing source, which is indeed missing until pre-build.</p>