-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add semantic version checks for CCCL package.
- Loading branch information
1 parent
5c84765
commit 2e899d7
Showing
2 changed files
with
15 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |