-
Notifications
You must be signed in to change notification settings - Fork 716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chapter-06/Recipe-07 does not seem to update the git hash every time the code is built #506
Comments
Thanks for the very detailed report. I followed your steps and I cannot reproduce the problem. The |
That is very interesting... I tried it a few times from start to finish with a fresh build directory and the results are consistent. Have you tried in a Windows environment (using Visual Studio, not MSYS) with CMake 3.13? |
I had previously tried it from my work PC (Windows 7), but I just tried again from my home PC (Windows 10) and got the same result. It may be related to either Visual Studio, or just the newer version of CMake. I am using Visual Studio 2017 and CMake 3.13.3 in both cases. |
I ran on my local copy of the repository on Linux with CMake 3.12 I'll try in the Docker image after updating to latest CMake and report. |
Also note that I'm doing a |
I am sorry, cannot reproduce even in a pristine Linux environment with CMake 3.13 Maybe printing the output and error streams from the |
Hmm... It must be Windows related somehow. As far as i can tell executing |
Changing After making the change the
Although... if |
I will try to reproduce it on Windows but I need to (re-)create a virtual machine for that so it might take few days. Other thing to try is to build using Ninja. I will hopefully report soon about my findings. |
Expected Behavior
When creating a new commit and running
cmake --build .
it should update the header file with the new commit hash.Current Behavior
The commit hash is not updated after
cmake --build .
Steps to Reproduce (for bugs)
Create a git repo as follows:
The build the project:
Run the project:
Create a new git commit:
Rebuild the project (without re-running CMake)
Run the project:
Note that the code has not picked up any change to the commit hash; however running the Git command to print the hash reveals that the hash should be different.
Your Environment
CMake version 3.13
Windows 7
Visual Studio 2017
The text was updated successfully, but these errors were encountered: