Skip to content

Commit

Permalink
Don't error out if graph unit tests disabled
Browse files Browse the repository at this point in the history
Graph unit tests, with TEST_ETI_ONLY=ON, require double and/or
float to be enabled as scalars. Instead of erroring out the configure,
just give a warning and disable the graph tests.
  • Loading branch information
brian-kelley committed Aug 8, 2024
1 parent b11dba2 commit 7f1dfec
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions graph/unit_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ KOKKOSKERNELS_INCLUDE_DIRECTORIES(REQUIRED_DURING_INSTALLATION_TESTING ${CMAKE_C
# #
#####################

SET(KK_ENABLE_GRAPH_TESTS ON)

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.")
MESSAGE(WARNING "Because only ETI'd type combinations are enabled for testing, the Kokkos Kernels graph tests require that double or float is enabled in ETI.")
SET(KK_ENABLE_GRAPH_TESTS OFF)
ENDIF ()
ENDIF ()

IF(KK_ENABLE_GRAPH_TESTS)

#####################
# #
# Add GPU backends #
Expand Down Expand Up @@ -97,4 +102,4 @@ IF (KOKKOS_ENABLE_THREADS)
COMPONENTS graph
)
ENDIF ()

ENDIF ()

0 comments on commit 7f1dfec

Please sign in to comment.