lecrisut / cmakeextrautils Goto Github PK
View Code? Open in Web Editor NEWHelpful CMake modules for project management and export
License: GNU General Public License v3.0
Helpful CMake modules for project management and export
License: GNU General Public License v3.0
This is more nuanced as discussed in the PR. Need to investigate how setuptools_scm calculates it more carefully.
>> but computing the next M.m.p always seemed iffy -- perhaps scm has conventions nowadays.
Interesting, can you elaborate. I thought it was just the git describe info directly.
I was referring to .postN
being distance beyond the most recent tag, which is what one gets from git describe
. Whereas .devN
is distance on the way to the next tag, so the versioner software has to make a choice whether that's M+1.0 or M.m+1 or M.m.p+1, etc. I get around this in that psi4 script by having the user commit the intended upcoming tag, but I don't pretend that that's a feature :-) scm might well have conventions on this now -- I just haven't looked into it lately. https://packaging.python.org/en/latest/specifications/version-specifiers/#summary-of-permitted-suffixes-and-relative-ordering (succeeds pep440).
Originally posted by @loriab in #19 (comment)
Syntax like cmake_minimum_required(VERSION 3.20...3.29)
sets policies for up to 3.29
automatically. And since a new policy stack is created even when using include
and find_package
, all of these should be safe 1
I am not sure how this will interact with FetchContent
, SOURCE_DIR
and other such variables.
Failed to load packit config file:
Please correct data and retry.
For more info, please check out the documentation or contact the Packit team.
CMakeExtraUtils/cmake/DynamicVersion.cmake
Lines 511 to 527 in eac47a4
Should remove COMMAND_ERROR_IS_FATAL ANY
and instead parse the exit code
Need to test that fallthroughs: CONFIG -> Pkg-config -> manual work correctly
It is not ideal because you need to run cmake --build
twice to pick up changes on the commit/tag, etc. This is because it is consumed via configure_file
Potential alternatives:
file(WRITE)
script/function or other way to write the commit metadata at build time instead of configure timeHi @LecrisUT, we've chatted about CMake some over at Libxc. The Libint project could use something like your DynamicVersion, but they'd like to stick with cmake=3.16. Preliminary tests show DynamicVersion does not like 3.16. Possibly they might be willing to bump the version, but I wanted to inquire if (1) 3.16 is even feasible after modifications and (2) are you ready for users at this stage? Thanks!
For example if the latest tag is v2.1.0-rc1
, this is allowed by git describe --match=?[0-9.]*
. But there is an inconsistency between parsing from git_archival.txt
and setuptools-scm
git_archival.txt
: describe-name = v2.1.0-rc1-257-gcbc8618a5
PKG-INFO
: Version: 2.1.0rc2.dev257+gcbc8618
Issues are that the -
in the rc
is removed and the regex needs to account for the version syntax having -
suffix in its name.
I am trying to build libint as a Git submodule in another project. It is currently not building because of DynamicVersion.cmake, which I have traced here. The short document describing it here states:
Calculate the project version from the git tags or
.git_archival.txt
if the source is not a git repository
I have a feeling that this is the solution to my build problems, unless I hack DynamicVersion to silence errors. But what is it? A web search for .git_archival.txt
doesn't yield anything other than git archive
commands, which seems to generate a .zip, not a .txt file.
Not sure how git will handle this
Failed to load packit config file:
Cannot parse package config: ValidationError({'jobs': {0: {'packages': defaultdict(<class 'dict'>, {'cmake-extra-utils': {'value': {'files_to_sync': {3: {'deest': ['Unknown field.']}}}}})}, 1: {'packages': defaultdict(<class 'dict'>, {'cmake-extra-utils': {'value': {'files_to_sync': {3: {'deest': ['Unknown field.']}}}}})}, 2: {'packages': defaultdict(<class 'dict'>, {'cmake-extra-utils': {'value': {'files_to_sync': {3: {'deest': ['Unknown field.']}}}}})}, 3: {'packages': defaultdict(<class 'dict'>, {'cmake-extra-utils': {'value': {'files_to_sync': {3: {'deest': ['Unknown field.']}}}}})}, 4: {'packages': defaultdict(<class 'dict'>, {'cmake-extra-utils': {'value': {'files_to_sync': {3: {'deest': ['Unknown field.']}}}}})}}, 'packages': defaultdict(<class 'dict'>, {'cmake-extra-utils': {'value': {'files_to_sync': {3: {'deest': ['Unknown field.']}}}}})}).
For more info, please check out the documentation or contact the Packit team.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.