Skip to content

Commit

Permalink
KokkosKernels: adding variable that returns version as a single number
Browse files Browse the repository at this point in the history
This makes our code consistent with what Kokkos is doing and
provides users with an easy way to verify in their code that
a compatible version of Kokkos Kernels is being used.
  • Loading branch information
lucbv committed Jan 27, 2022
1 parent bcc505d commit 65bc1ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ IF(NOT KOKKOSKERNELS_HAS_TRILINOS)
SET(KokkosKernels_VERSION_MAJOR 3)
SET(KokkosKernels_VERSION_MINOR 5)
SET(KokkosKernels_VERSION_PATCH 99)
SET(KokkosKernels_VERSION "${KokkosKernels_VERSION_MAJOR}.${KokkosKernels_VERSION_MINOR}.${KokkosKernels_VERSION_PATCH}")
MATH(EXPR KOKKOSKERNELS_VERSION "${KokkosKernels_VERSION_MAJOR} * 10000 + ${KokkosKernels_VERSION_MINOR} * 100 + ${KokkosKernels_VERSION_PATCH}")
ENDIF()

IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12.0")
Expand Down
3 changes: 3 additions & 0 deletions cmake/KokkosKernels_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
#endif
// clang-format on

/* Define the current version of Kokkos Kernels */
#cmakedefine KOKKOSKERNELS_VERSION @KOKKOSKERNELS_VERSION@

/* Define if fortran blas 1 function can return complex type */
#cmakedefine KOKKOSKERNELS_TPL_BLAS_RETURN_COMPLEX

Expand Down

0 comments on commit 65bc1ba

Please sign in to comment.