#
# Copyright (C) 2018-2022 Intel Corporation
#
# SPDX-License-Identifier: MIT
#

set(IGDRCL_SRCS_tests_command_queue
    ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
    ${CMAKE_CURRENT_SOURCE_DIR}/blit_enqueue_fixture.h
    ${CMAKE_CURRENT_SOURCE_DIR}/blit_enqueue_1_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/blit_enqueue_2_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/buffer_operations_fixture.h
    ${CMAKE_CURRENT_SOURCE_DIR}/command_enqueue_fixture.h
    ${CMAKE_CURRENT_SOURCE_DIR}/command_queue_hw_1_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/command_queue_hw_2_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/command_queue_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/csr_selection_args_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/dispatch_walker_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_barrier_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_command_without_kernel_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_copy_buffer_event_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_copy_buffer_fixture.h
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_copy_buffer_rect_fixture.h
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_copy_buffer_rect_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_copy_buffer_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_copy_buffer_to_image_fixture.h
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_copy_buffer_to_image_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_copy_image_fixture.h
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_copy_image_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_copy_image_to_buffer_fixture.h
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_copy_image_to_buffer_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_debug_kernel_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_fill_buffer_event_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_fill_buffer_fixture.h
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_fill_buffer_negative_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_fill_buffer_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_fill_image_fixture.h
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_fill_image_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_fixture.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_fixture.h
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_handler_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_kernel_1_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_kernel_2_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_kernel_event_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_kernel_global_offset_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_kernel_local_work_size_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_kernel_two_ioq_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_kernel_two_ooq_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_kernel_two_walker_ioq_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_kernel_two_walker_ooq_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_map_buffer_fixture.h
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_map_buffer_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_map_image_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_marker_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_media_kernel.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_migrate_mem_objects_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_read_buffer_event_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_read_buffer_fixture.h
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_read_buffer_rect_fixture.h
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_read_buffer_rect_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_read_buffer_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_read_image_fixture.h
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_read_image_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_resource_barier_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_svm_mem_copy_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_svm_mem_fill_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_svm_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_thread_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_unmap_memobject_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_waitlist_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_with_walker_partition_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_write_buffer_event_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_write_buffer_rect_fixture.h
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_write_buffer_rect_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_write_buffer_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_write_image_fixture.h
    ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_write_image_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/finish_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/flush_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/get_command_queue_info_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/get_size_required_buffer_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/get_size_required_image_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/get_size_required_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/hardware_interface_helper.h
    ${CMAKE_CURRENT_SOURCE_DIR}/ioq_task_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/local_work_size_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/multi_dispatch_info_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/multiple_map_buffer_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/multiple_map_image_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/oom_buffer_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/oom_image_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/oom_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/ooq_task_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/read_write_buffer_cpu_copy.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/sync_buffer_handler_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/work_group_size_tests.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/zero_size_enqueue_tests.cpp
)

if(TESTS_XEHP_AND_LATER)
  list(APPEND IGDRCL_SRCS_tests_command_queue
       ${CMAKE_CURRENT_SOURCE_DIR}/dispatch_walker_tests_xehp_and_later.cpp
       ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_resource_barier_tests_xehp_and_later.cpp
  )
endif()

if(TESTS_DG2_AND_LATER)
  list(APPEND IGDRCL_SRCS_tests_command_queue
       ${CMAKE_CURRENT_SOURCE_DIR}/dispatch_walker_tests_dg2_and_later.cpp
       ${CMAKE_CURRENT_SOURCE_DIR}/enqueue_command_without_kernel_tests_dg2_and_later.cpp
  )
endif()

if(TESTS_PVC_AND_LATER)
  list(APPEND IGDRCL_SRCS_tests_command_queue
       ${CMAKE_CURRENT_SOURCE_DIR}/command_queue_tests_pvc_and_later.cpp
  )
endif()

target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_command_queue})
add_subdirectories()
