Skip to content

Commit

Permalink
CMakeLists.txt: Revise Kokkos_VERSION check
Browse files Browse the repository at this point in the history
Revsions suggested by @lucbv
- Allow versions greater than or equal to existing release
- If Kokkos_VERSION is greater than expected develop branch version,
  add warning to update the version check
  • Loading branch information
ndellingwood committed Oct 18, 2023
1 parent 3846ff9 commit 3db693b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,13 @@ ELSE()
IF (NOT KOKKOSKERNELS_HAS_TRILINOS AND NOT KOKKOSKERNELS_HAS_PARENT)
# This is a standalone build
FIND_PACKAGE(Kokkos REQUIRED)
IF((${Kokkos_VERSION} VERSION_EQUAL "4.0.1") OR (${Kokkos_VERSION} VERSION_EQUAL "4.1.00") OR (${Kokkos_VERSION} VERSION_EQUAL "4.1.99") OR (${Kokkos_VERSION} VERSION_EQUAL "4.2.00") OR (${Kokkos_VERSION} VERSION_EQUAL "4.2.99"))
IF((${Kokkos_VERSION} VERSION_EQUAL "4.1.00") OR (${Kokkos_VERSION} VERSION_GREATER_EQUAL "4.2.00"))
MESSAGE(STATUS "Found Kokkos version ${Kokkos_VERSION} at ${Kokkos_DIR}")
IF((${Kokkos_VERSION} VERSION_GREATER "4.2.99"))
MESSAGE(WARNING "Configuring with Kokkos ${Kokkos_VERSION} which is newer than the expected develop branch - version check may need update")
ENDIF()
ELSE()
MESSAGE(FATAL_ERROR "Kokkos Kernels ${KokkosKernels_VERSION} requires Kokkos 4.0.1, 4.1.00, 4.1.99, 4.2.00 or develop (4.2.99)")
MESSAGE(FATAL_ERROR "Kokkos Kernels ${KokkosKernels_VERSION} requires 4.1.00, 4.2.00 or develop")
ENDIF()
ENDIF()

Expand Down

0 comments on commit 3db693b

Please sign in to comment.