IF (NOT Kokkos_INSTALL_TESTING)
  ADD_SUBDIRECTORY(src)
ENDIF()

FUNCTION(KOKKOS_ADD_BENCHMARK_DIRECTORY DIR_NAME)
  IF(NOT Kokkos_ENABLE_BENCHMARKS)
    RETURN()
  ENDIF()

  IF(KOKKOS_HAS_TRILINOS)
    message(
      STATUS
      "Benchmarks are not supported when building as part of Trilinos"
    )
    RETURN()
  ENDIF()

  ADD_SUBDIRECTORY(${DIR_NAME})
ENDFUNCTION()

KOKKOS_ADD_TEST_DIRECTORIES(unit_test)
KOKKOS_ADD_BENCHMARK_DIRECTORY(perf_test)
