diff --git a/code/Version.cpp b/code/Version.cpp index fe9a2fdaafa82f45457d3133f0b05097a95708aa..eb4cab417b53da2e62e520697a452e2b16bfd0de 100644 --- a/code/Version.cpp +++ b/code/Version.cpp @@ -111,6 +111,10 @@ ASSIMP_API unsigned int aiGetVersionRevision() { return GitVersion; } +ASSIMP_API const char *aiGetBranchName() { + return GitBranch; +} + // ------------------------------------------------------------------------------------------------ ASSIMP_API aiScene::aiScene() : mFlags(0) diff --git a/include/assimp/version.h b/include/assimp/version.h index d1821fa2bf4b6b9738e12949a5b91fa9677aca42..20ece7fa0e09bc979693aedb1f73ec657317d4cd 100644 --- a/include/assimp/version.h +++ b/include/assimp/version.h @@ -82,6 +82,12 @@ ASSIMP_API unsigned int aiGetVersionMajor (void); */ ASSIMP_API unsigned int aiGetVersionRevision (void); +// --------------------------------------------------------------------------- +/** @brief Returns the branchname of the Assimp runtime. + * @return The current branch name. + */ +ASSIMP_API const char *aiGetBranchName(); + //! Assimp was compiled as a shared object (Windows: DLL) #define ASSIMP_CFLAGS_SHARED 0x1 //! Assimp was compiled against STLport diff --git a/test/unit/utVersion.cpp b/test/unit/utVersion.cpp index a424a27cfb36d69d5651202460031e87116e136e..af16211a1d5a8d5dfcac0bb4375dfbc8bb3d3b32 100644 --- a/test/unit/utVersion.cpp +++ b/test/unit/utVersion.cpp @@ -69,3 +69,8 @@ TEST_F( utVersion, aiGetVersionRevisionTest ) { EXPECT_NE( aiGetVersionRevision(), 0U ); } +TEST_F( utVersion, aiGetBranchNameTest ) { + EXPECT_NE( nullptr, aiGetBranchName() ); +} + +