Hi all,

Using 2.8.2 I'm trying to make a rule to create a timestamp header, but only if 
a certain file has changed, like so:

ADD_CUSTOM_COMMAND(
  OUTPUT src/timestamp.h
  COMMAND tools/win32/timestamper
  ARGS src/timestamp.h
  DEPENDS Version.cmake
  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
  COMMENT "Generating timestamp header..."
)

but the rule is always executed, even if the Version.cmake file has not 
changed. What am I doing wrong ?

TIA
/Rob
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to