###############################################################################
# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC
# and RAJA project contributors. See the RAJA/LICENSE file for details.
#
# SPDX-License-Identifier: (BSD-3-Clause)
###############################################################################

#
# Generate kernel hyperplane tests for each enabled RAJA back-end.
#
set(TESTTYPES 2D 3D)

foreach( BACKEND ${KERNEL_BACKENDS} )
  foreach( TEST_TYPE ${TESTTYPES} )
    # Removing Sycl backend, implementation of Hyperplane does not exist
    if( NOT ((BACKEND STREQUAL "Sycl")) AND NOT ((BACKEND STREQUAL "OpenMPTarget")) )
      configure_file( test-kernel-hyperplane-${TEST_TYPE}.cpp.in
                      test-kernel-hyperplane-${TEST_TYPE}-${BACKEND}.cpp )
      raja_add_test( NAME test-kernel-hyperplane-${TEST_TYPE}-${BACKEND}
                     SOURCES ${CMAKE_CURRENT_BINARY_DIR}/test-kernel-hyperplane-${TEST_TYPE}-${BACKEND}.cpp )

      target_include_directories(test-kernel-hyperplane-${TEST_TYPE}-${BACKEND}.exe
                                 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
    endif()
  endforeach()
endforeach()

unset( TESTTYPES )
