Skip to content

Commit

Permalink
Add Tapir versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored and tarunprabhu committed Apr 4, 2023
1 parent ed8dc16 commit 665c8f3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
10 changes: 10 additions & 0 deletions llvm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ if(NOT DEFINED LLVM_VERSION_SUFFIX)
set(LLVM_VERSION_SUFFIX)
endif()

if(NOT DEFINED TAPIR_VERSION_MAJOR)
set(TAPIR_VERSION_MAJOR 1)
endif()
if(NOT DEFINED TAPIR_VERSION_MINOR)
set(TAPIR_VERSION_MINOR 0)
endif()
if(NOT DEFINED TAPIR_VERSION_PATCH)
set(TAPIR_VERSION_PATCH 0)
endif()

if (NOT PACKAGE_VERSION)
set(PACKAGE_VERSION
"${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}")
Expand Down
9 changes: 9 additions & 0 deletions llvm/include/llvm/Config/llvm-config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@
/* LLVM version string */
#define LLVM_VERSION_STRING "${PACKAGE_VERSION}"

/* Major version of the Tapir API */
#define TAPIR_VERSION_MAJOR ${TAPIR_VERSION_MAJOR}

/* Minor version of the Tapir API */
#define TAPIR_VERSION_MINOR ${TAPIR_VERSION_MINOR}

/* Patch version of the Tapir API */
#define TAPIR_VERSION_PATCH ${TAPIR_VERSION_PATCH}

/* Whether LLVM records statistics for use with GetStatistics(),
* PrintStatistics() or PrintStatisticsJSON()
*/
Expand Down

0 comments on commit 665c8f3

Please sign in to comment.