Let's say that I have a compilation of code at some point from cmake 2.8 to linux.
I change the file "my_changed_file", run cmake, and only this file is created. So far so good.
Now I want to fix this:
git add my_changed_file
git commit
If I started cmake again, I would expect nothing to happen. But all my files were recompiled, despite the fact that I did not touch anything! The timestamp seems untouched when I do ls -l.
I have the following lines:
execute_process(
COMMAND git describe --abbrev=8 --dirty --always --tags
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_CODE_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
add_definitions("-DCODE_VERSION=${GIT_CODE_VERSION}")
But this only affects the main.cpp file
What's happening?
thank
source
share