title: Get CMake to declare a target phony
body: <p>I want to generate some <em>compile</em> time constants. The <a href="https://stackoverflow.com/a/1468695/189456">first answer</a> to another question gets me quite close. From my CMakeLists.txt:</p>
  
  <pre><code>add_library(${PROJECT_NAME} STATIC ${CXX_SRCS} compile_time.hpp)
  add_custom_command(OUTPUT compile_time.hpp
      COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/compile_time.cmake)
  </code></pre>
  
  <p>This works in the sense that the first time I run <code>make</code>, it generates <code>compile_time.hpp</code>, so that the values of the variables are defined when I run <code>make</code> and not <code>cmake</code>. But <code>compile_time.hpp</code> is not remade when I rerun <code>make</code> or even <code>cmake</code> to redo the makefiles.</p>
  
  <p>How can I make the target <code>compile_time.cpp</code> be marked as <code>phony</code> so that it is always remade? I tried</p>
  
  <pre><code>add_custom_target(compile_time.hpp)
  </code></pre>
  
  <p>to no effect.</p>