How to automatically get version and build number into a C++ executable

Name
Last commit
Last update
.gitignore Loading commit data...
CMakeLists.txt Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
main.cpp Loading commit data...
makeversion.sh Loading commit data...
version.h Loading commit data...