[CMake] cmake make generator do not handle header source dependicies?

Evgeniy Dushistov dushistov at gmail.com
Sun Oct 6 11:30:40 EDT 2013


In attachment(Is mail list accpet attachments?) simple example with
test.cpp and test.h.
test.cpp include test.h.
I generate on linux with help of cmake (2.8.11.2) make files, build it,
then exec "touch test.h", after that rerun make, and it do nothing:

$ mkdir build && cd build
$ cmake .. && make
bla bla bla
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/depend_bug/build
Scanning dependencies of target test_bin
[100%] Building CXX object CMakeFiles/test_bin.dir/test.cpp.o
Linking CXX executable test_bin
[100%] Built target test_bin
$ touch ../test.h && make
[100%] Built target test_bin

As you can see test.cpp not rebuilded.

test.cpp looks like:
<UTF-8 BOM>#include "test.h"
...

If I remove UTF-8 BOM all works as expected.
Is it known bug? Is it bug of some external dependicies tracker used
by cmake make file generator, or it is bug of cmake by itself?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: depend_bug.tar.gz
Type: application/x-gzip
Size: 317 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20131006/5ffc13f8/attachment.bin>


More information about the CMake mailing list