mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 02:47:48 +00:00
buildinfo: report the release version instead of a hardcoded fallback #8164
When ADD_COMMIT_SHA is off (the default for release tarballs), buildinfo.cpp fell back to a hardcoded "0.8.0", so a 0.8.5/0.8.6 build reported 0.8.0 from IfcConvert --version and in written file headers. Pass CMake's RELEASE_VERSION (read from the VERSION file) to IfcParse as IFCOPENSHELL_VERSION_STRING and use it as the fallback, mirroring how the branch/commit defines are handled. The commit-sha build and the last-resort literal are unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
committed by
Thomas Krijnen
parent
6b4c0194ff
commit
5e539890f1
@@ -30,6 +30,10 @@
|
||||
|
||||
#if defined(IFCOPENSHELL_BRANCH) && defined(IFCOPENSHELL_COMMIT)
|
||||
const char *IFCOPENSHELL_VERSION = STRINGIFY(IFCOPENSHELL_BRANCH) "-" STRINGIFY(IFCOPENSHELL_COMMIT);
|
||||
#elif defined(IFCOPENSHELL_VERSION_STRING)
|
||||
// Set from CMake's RELEASE_VERSION (the repository VERSION file) so a release
|
||||
// build without commit-sha info still reports the correct version. See #8164.
|
||||
const char *IFCOPENSHELL_VERSION = STRINGIFY(IFCOPENSHELL_VERSION_STRING);
|
||||
#else
|
||||
const char *IFCOPENSHELL_VERSION = "0.8.0";
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user