[CMake] one source file should depend on every other

Denis Stuenkel dstuenkel at googlemail.com
Thu Apr 12 16:00:28 EDT 2007


Hi,

currently my CMakeLists.txt looks basically like this:

  file(GLOB sources *.cc)
  add_executable(myprog ${sources})

One of these cc-files just contains:

  const char* build_date() {return __DATE__;}

The obvious problem here is that this build-date doesn't change
because the object stays the same until I make a change to that
specific source file.

How can I tell cmake that I want this file to be rebuilt every
time I make a change to one of the other source files?

Thank you.


More information about the CMake mailing list