-
Notifications
You must be signed in to change notification settings - Fork 120
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
Fix tarball versioning #326
Fix tarball versioning #326
Conversation
Thanks! This is one more step to get the CMake tarball behave a bit more like the autotools one. Ideally, building with one system from a tarball created by the other should work. Would we need analogous code in libsc? |
Yes, if this PR is ready, I will create an analogous PR in libsc. |
I like the approach to replicate the autotools git-version-gen vs. .tarball-version behaviour as closely as possible. Is there any more to be done? |
Cool, if it all works, let's take it there. |
The only remaining question for this PR is that the file For Autotools, Given that this issue seems to appear for t8code as well, I am interested in their perspective on this issue (cf. conversation in #325). If this does not lead to a solution, I could take a deeper dive and try to find a workaround. |
Thanks; should we merge at this point and fix the issue about calling some first build command later? With p4est, calling bootstrap is only needed on a fresh repository checkout; on unpacking a tarball bootstrap is not required. How does CMake behave when executed from an unpacked tarball? (We still produce different tarballs from automake and CMake. Hoping they'll get closer, eventually.) |
Sounds good to me! I pushed one small change to ensure full symmetry to the analogous code in lisbc by using the CMake project name in the name of the target that generates
In CMake the workflow from an unpacked tarball is the same as for a the git repository, i.e. calling the |
Fix tarball versioning
This PR addresses among others the issue of tarball naming in the CMake build system. Previously, an uninitialized variable,
git_version
, was used for the version in the package name, leading to incorrect tarball names.Moreover, this PR introduces a new CMake target
GenerateVersionFile
to generate the file.tarball-version
analogous to the file used in the Autotools-based creation of a tarball in p4est.Then the file
.tarball-version
is used by the scriptgit-version-gen
to get the version in the case.git
is not present, as it is the case for creating a tarball. This ensures a correctly populatedp4est_config.h
after configuring in a tarball directory.Currently, the CMake target
GenerateVersionFile
is only build if some arbitrary build command is executed. In particular calling onlymake package_source
does not suffice to trigger.tarball-version
's creation.