-
Notifications
You must be signed in to change notification settings - Fork 9
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
1677: dont rerun cmake for git ref #1683
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1683 +/- ##
===========================================
+ Coverage 83.42% 83.46% +0.03%
===========================================
Files 799 799
Lines 30934 30934
===========================================
+ Hits 25807 25819 +12
+ Misses 5127 5115 -12
|
… empty if not on a named branch
…he git repository directory
1dbf89a
to
6803ce6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good code-wise, still requires confirmation from Phil about the intended behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EMPIRE build seems to behave appropriately with this integrated.
…-git-ref 1677: dont rerun cmake for git ref
…-git-ref 1677: dont rerun cmake for git ref
…-git-ref 1677: dont rerun cmake for git ref
…-git-ref 1677: dont rerun cmake for git ref
Fixes #1677
This PR uses
add_custom_command
to act as a source file generator forsrc/vt/configs/generated/vt_git_revision.cc
. It runs a cmake script (adapted from the earlier script) when any of:.git/HEAD
,.git/packed-refs
or.git/refs/<named-branch-ref>
are modified. If they are modified, only vt_git_revision.cc will be rebuilt, and VT will need to be relinked. This will happen automatically. This avoids re-running cmake multiple times for no reason.This additionally works correctly if a new branch was made and other changes to git occur.