Skip to content

Commit

Permalink
Merge pull request #2008 from martygrant/martin/updateCMakeWarningDPCXX
Browse files Browse the repository at this point in the history
Update CMake warning for tests hidden behind UR_DPCXX flag
  • Loading branch information
martygrant committed Sep 4, 2024
2 parents 229869c + ac6915f commit 6cb61f1
Showing 1 changed file with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions test/conformance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,19 @@ add_subdirectory(queue)
add_subdirectory(sampler)
add_subdirectory(virtual_memory)

set(TEST_SUBDIRECTORIES_DPCXX
"device_code"
"kernel"
"program"
"enqueue"
"integration"
"exp_command_buffer"
"exp_enqueue_native"
"exp_usm_p2p"
"exp_launch_properties"
"memory-migrate"
)

if(UR_DPCXX)
add_custom_target(generate_device_binaries)

Expand All @@ -143,18 +156,20 @@ if(UR_DPCXX)
string(REPLACE "," ";" TARGET_TRIPLES ${UR_CONFORMANCE_TARGET_TRIPLES})
endif()

add_subdirectory(device_code)
add_subdirectory(kernel)
add_subdirectory(program)
add_subdirectory(enqueue)
add_subdirectory(integration)
add_subdirectory(exp_command_buffer)
add_subdirectory(exp_enqueue_native)
add_subdirectory(exp_usm_p2p)
add_subdirectory(exp_launch_properties)
add_subdirectory(memory-migrate)
foreach(dir ${TEST_SUBDIRECTORIES_DPCXX})
add_subdirectory(${dir})
endforeach()
else()
set(DISABLED_TESTS "")
foreach(dir ${TEST_SUBDIRECTORIES_DPCXX})
if(NOT dir STREQUAL "device_code")
list(APPEND DISABLED_TESTS "test-${dir}")
endif()
endforeach()

string(REPLACE ";" ", " DISABLED_TESTS_STR "${DISABLED_TESTS}")

message(WARNING
"UR_DPCXX is not defined, the following conformance test executables \
are disabled: test-program, test-kernel, test-enqueue")
are disabled: ${DISABLED_TESTS_STR}")
endif()

0 comments on commit 6cb61f1

Please sign in to comment.