Currently I'm managing a huge C++ pullrequest which I (git) rebase regularly on the origin's master to keep it up-to-date.
However Visual Studio seems to rebuild all sources after a rebase because the timestamp of most files changed but the content of most files stayed the same (CMake is used as build system).
Is there a way to tell Visual Studio compiler to check whether the file content stayed the same (through checksums) instead of using the last timestamp written to the file to prevent it from rebuilding my huge solution?
It is possible that different files have the same checksum (in fact, since there are a finite number of checksums but an infinite number of possible files, there must be an infinite number of different files that have the same checksum). But it is not possible for identical files to have different checksums.
A checksum is a string of numbers and letters used to uniquely identify a file. Checksum is most commonly used to verify if a copy of a file is identical to an original, such as downloaded copies of ArcGIS product installation or patch files.
A workaround would be to write a script/small software, and include it in the pre-build actions, that checks the before and after source files and if the content has not changed (via a checksum), then it changes the creation date of the after-source file to match the already compiled obj.
Or, even better, the script could be responsible for the source file copying, and it doesn't even copy a source file if its content is the same as the old source.
I don't think VS Builder has such a native option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With