Skip to content

Commit

Permalink
Add semantic version checks for CCCL package.
Browse files Browse the repository at this point in the history
  • Loading branch information
alliepiper committed May 16, 2023
1 parent 5c84765 commit 2e899d7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion libcudacxx
18 changes: 14 additions & 4 deletions share/cmake/cccl/cccl-config-version.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
# TODO we should parse this from a header, and update to CalVer if that's still POR
# TODO How should we encode this as a source of truth?
set(CCCL_VERSION_MAJOR 2)
set(CCCL_VERSION_MINOR 1)
set(CCCL_VERSION_PATCH 0)
set(CCCL_VERSION_TWEAK 0)

set(CCCL_VERSION "${CCCL_VERSION_MAJOR}.${CCCL_VERSION_MINOR}.${CCCL_VERSION_PATCH}.${CCCL_VERSION_TWEAK}")

# TODO decide and implement versioning logic.
set(PACKAGE_VERSION ${CCCL_VERSION})
set(PACKAGE_VERSION_COMPATIBLE TRUE)
set(PACKAGE_VERSION_EXACT TRUE)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
set(PACKAGE_VERSION_EXACT FALSE)
set(PACKAGE_VERSION_UNSUITABLE FALSE)
gi
# Semantic versioning:
if(PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION)
if(CCCL_VERSION_MAJOR VERSION_EQUAL PACKAGE_FIND_VERSION_MAJOR)
set(PACKAGE_VERSION_COMPATIBLE TRUE)
endif()

if(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()

0 comments on commit 2e899d7

Please sign in to comment.