-
Notifications
You must be signed in to change notification settings - Fork 52
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
cmake: don't recompile at each build #60
Conversation
not working for me, I get |
On the same setup but without this patch, does it fill the FESOM_GIT_SHA variable? |
@hegish Any news on this one? :) |
O sorry, I did not notice the PR has changed. Will try again ASAP. |
Without this patch, the file `fesom_version_info-generated.F90` is generated at each build, rebuilding all its dependencies up to the fesom executable. The patch generates the fesom_version_info-generated.F90 only when the FESOM_GIT_SHA value changes to reflect the current git status at the time of building Fesom. With this patch it allows to not recompile Fesom if not necessary. For example calling make; make (in a row), without any new commits between the two make will compile fesom only once. Currently, with this example, fesom_version_info-generated.F90 is recompiled because of a new timestamp, thus recompiling fesom.
607582c
to
0778b81
Compare
Hi, @hegish I've pushed an update, worth to try. |
Ah, did the previous PR not work with out of source builds? This maybe was the issue I had with it. |
The issue was that the working directory of the git describe command was wrong and we get the error:
It's now fixed in the latest update. |
Any issue on this one? |
This has been integrated in #515 |
Sorry and apologies for being tardy and not merge changes from this PR before. |
Without this patch, the file
fesom_version_info-generated.F90
is generatedat each build, rebuilding all its dependencies up to the fesom executable.
The patch generates the fesom_version_info-generated.F90 only when the
FESOM_GIT_SHA value changes to reflect the current git status at the
time of building Fesom.
With this patch it allows to not recompile Fesom if not necessary. For
example calling make; make (in a row), without any new commits between
the two make will compile fesom only once. Currently, with this example,
fesom_version_info-generated.F90 is recompiled because of a new
timestamp, thus recompiling fesom.