CMake doesn't keep headers in sync between source and build directories.
ehein6 opened this issue · comments
CMake copies all the headers into the build directory when it generates Makefiles. Then it instructs the compiler to include the headers in the build directory instead of the source directory
For example, see https://github.com/stingergraph/stinger/blob/master/lib/stinger_alg/CMakeLists.txt#L24
As a result, changes to a header file in the source directory get ignored until I re-run cmake manually.
The headers in the build directory should be kept up to date on every build, perhaps with a custom build step like this: http://stackoverflow.com/questions/13429656/cmake-how-to-copy-contents-of-a-directory-into-build-directory-after-make