Skip to content

Commit b2d8e02

Browse files
authored
Merge pull request #1382 from sideeffects/sendupstream_package_placeholder
Add a placeholder in version.h for the URL and revision to be stored
2 parents 5fb5c31 + 18d4aef commit b2d8e02

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

openvdb/openvdb/version.h.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@
9292
/// @hideinitializer
9393
#define OPENVDB_LIBRARY_VERSION_NUMBER ${OPENVDB_PACKED_VERSION}
9494

95+
/// @brief Where this version was compiled from if it comes from a
96+
/// git repo.
97+
#define OPENVDB_PACKAGE_URL "@OPENVDB_PACKAGE_URL@"
98+
#define OPENVDB_PACKAGE_REVISION "@OPENVDB_PACKAGE_REVISION@"
99+
95100
/// @brief The version namespace name for this library version
96101
/// @hideinitializer
97102
///
@@ -256,6 +261,8 @@ inline constexpr const char* getLibraryVersionString() { return OPENVDB_LIBRARY_
256261
inline constexpr const char* getLibraryAbiVersionString() {
257262
return OPENVDB_LIBRARY_ABI_VERSION_STRING;
258263
}
264+
inline constexpr const char* getPackageUrl() { return OPENVDB_PACKAGE_URL; }
265+
inline constexpr const char* getPackageRevision() { return OPENVDB_PACKAGE_REVISION; }
259266

260267

261268
struct VersionId {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Build:
2+
- Add a placeholder to inject the specific revision and URL used
3+
to build OpenVDB, useful for 3rd party build scripts to publish
4+
their exact versions.

0 commit comments

Comments
 (0)