Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #426 from allisonvacanti/fix_version_check
Browse files Browse the repository at this point in the history
Fix version checks in CMake packages.
  • Loading branch information
alliepiper authored Jan 24, 2022
2 parents d195a4a + c16f8ff commit 8500ac0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cub/cmake/cub-config-version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ set(PACKAGE_VERSION_EXACT FALSE)
set(PACKAGE_VERSION_UNSUITABLE FALSE)

if(PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION)
if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CUB_VERSION_MAJOR)
if(CUB_VERSION_MAJOR VERSION_EQUAL PACKAGE_FIND_VERSION_MAJOR AND
CUB_VERSION_MINOR VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MINOR)
set(PACKAGE_VERSION_COMPATIBLE TRUE)
endif()

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

0 comments on commit 8500ac0

Please sign in to comment.