[CMake] [BUG?] Fortran file dependency scanner appears to not work properly for generated include files
Brad King
brad.king at kitware.com
Fri Jan 28 16:38:58 EST 2011
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
More information about the CMake
mailing list