From 45baeb32a7db8930cf3dc4f32cb5fefba742c6b5 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Thu, 11 Jul 2024 19:52:54 +0800 Subject: populate slang-tag-version with cmake (#4611) At the moment it is always "unknown" --- slang.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'slang.h') diff --git a/slang.h b/slang.h index 0f75c4c95..2f8f8d15d 100644 --- a/slang.h +++ b/slang.h @@ -1658,15 +1658,18 @@ extern "C" void* userData); /*! - @brief Get the build version 'tag' string. The string is the same as produced via `git describe --tags` - for the project. If Slang is built separately from the automated build scripts - the contents will by default be 'unknown'. Any string can be set by changing the - contents of 'slang-tag-version.h' file and recompiling the project. - - This function will return exactly the same result as the method getBuildTag string on IGlobalSession. - - An advantage of using this function over the method is that doing so does not require the creation of - a session, which can be a fairly costly operation. + @brief Get the build version 'tag' string. The string is the same as + produced via `git describe --tags --match v*` for the project. If such a + version could not be determined at build time then the contents will be + 0.0.0-unknown. Any string can be set by passing + -DSLANG_VERSION_FULL=whatever during the cmake invocation. + + This function will return exactly the same result as the method + getBuildTagString on IGlobalSession. + + An advantage of using this function over the method is that doing so does + not require the creation of a session, which can be a fairly costly + operation. @return The build tag string */ -- cgit v1.2.3