Denis Stuenkel wrote:
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?

It sounds like you want to "See the OBJECT_DEPENDS option in SET_SOURCE_FILES_PROPERTIES to add file-level dependencies to object files." I.e. make the object of your build_date source depend on every other source.

--
Matthew
GDRLaH - Grin, Duck, and Run Like a Hippo! :-)

_______________________________________________
CMake mailing list
[EMAIL PROTECTED]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to