Skip to content

Commit

Permalink
CMake: error out in certain case (kokkos#2115)
Browse files Browse the repository at this point in the history
Graph unit tests are unique in that they use default_scalar for the
KokkosKernelsHandle. So if test-eti-only is ON, but neither float nor
double is instatiated, then error out for the graph unit tests.

Users can still build without float or double if they want, but only if
they turn off tests or the graph component.
  • Loading branch information
brian-kelley committed Mar 14, 2024
1 parent a9cf21e commit 17d940f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions graph/unit_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ KOKKOSKERNELS_INCLUDE_DIRECTORIES(REQUIRED_DURING_INSTALLATION_TESTING ${CMAKE_C
# #
#####################

IF (KokkosKernels_TEST_ETI_ONLY)
IF (NOT KokkosKernels_INST_DOUBLE AND NOT KokkosKernels_INST_FLOAT)
MESSAGE(FATAL_ERROR "Because only ETI'd type combinations are enabled for testing, the Kokkos Kernels graph tests require that double or float is enabled in ETI.")
ENDIF ()
ENDIF ()

#####################
# #
# Add GPU backends #
Expand Down

0 comments on commit 17d940f

Please sign in to comment.