[CMake] Source is not rebuild when header changes

Florian Lindner mailinglists at xgm.de
Tue Aug 1 05:18:56 EDT 2017


Hello,

on my project, which I'm currently testing with cmake, I just noticed, that when I modify a header, the project is not
rebuilt.

The CMakeLists.txt in the root dir is here: https://pastebin.com/vfReTM1N

The other CMakeLists.txt resides in root/src and lists all the source (*.cpp) files using GLOBS and adds them to the
parent scope:

set (sourcesAllNoMain ${sourcesAllNoMain} PARENT_SCOPE)
set (sourcesTests ${sourcesTests} PARENT_SCOPE)
set (sourcesTarchTests ${sourcesTarchTests} PARENT_SCOPE)


the questionable header file was not added recently, so I don't think its related to the GLOBs.

The header file is also not listed in depends.make file.

What other information can I give?

Thanks,
Florian


More information about the CMake mailing list