On 01/28/2011 02:50 PM, Alan W. Irwin wrote:
> add_custom_command(
>    OUTPUT
>    ${CMAKE_CURRENT_BINARY_DIR}/test1_parameters.h
>    COMMAND ${CMAKE_COMMAND}
>    -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/test_parameters.h 
> ${CMAKE_CURRENT_BINARY_DIR}/test1_parameters.h

The bug is here.  This should not be copy_if_different.  It should be just
copy.  Otherwise whenever the input is "touch"ed then the output is not
different so the copy does not occur and the output timestamp is not updated.
Then every "make" after that rechecks again and again but never updates the
timestamp.

The Fortran dependencies do have the header:

------------------------------------------------------------------------------
$ cat CMakeFiles/test_parameters.dir/depend.make
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8

CMakeFiles/test_parameters.dir/test_parameters.f.o: ./test1_parameters.h
------------------------------------------------------------------------------

but CMake won't rescan if the header's timestamp doesn't change.

-Brad
_______________________________________________
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