@@ -122,6 +122,19 @@ add_subdirectory(queue)
122122add_subdirectory (sampler)
123123add_subdirectory (virtual_memory)
124124
125+ set (TEST_SUBDIRECTORIES_DPCXX
126+ "device_code"
127+ "kernel"
128+ "program"
129+ "enqueue"
130+ "integration"
131+ "exp_command_buffer"
132+ "exp_enqueue_native"
133+ "exp_usm_p2p"
134+ "exp_launch_properties"
135+ "memory-migrate"
136+ )
137+
125138if (UR_DPCXX)
126139 add_custom_target (generate_device_binaries)
127140
@@ -143,18 +156,20 @@ if(UR_DPCXX)
143156 string (REPLACE "," ";" TARGET_TRIPLES ${UR_CONFORMANCE_TARGET_TRIPLES} )
144157 endif ()
145158
146- add_subdirectory (device_code)
147- add_subdirectory (kernel)
148- add_subdirectory (program )
149- add_subdirectory (enqueue)
150- add_subdirectory (integration)
151- add_subdirectory (exp_command_buffer)
152- add_subdirectory (exp_enqueue_native)
153- add_subdirectory (exp_usm_p2p)
154- add_subdirectory (exp_launch_properties)
155- add_subdirectory (memory-migrate)
159+ foreach (dir ${TEST_SUBDIRECTORIES_DPCXX} )
160+ add_subdirectory (${dir} )
161+ endforeach ()
156162else ()
163+ set (DISABLED_TESTS "" )
164+ foreach (dir ${TEST_SUBDIRECTORIES_DPCXX} )
165+ if (NOT dir STREQUAL "device_code" )
166+ list (APPEND DISABLED_TESTS "test-${dir} " )
167+ endif ()
168+ endforeach ()
169+
170+ string (REPLACE ";" ", " DISABLED_TESTS_STR "${DISABLED_TESTS} " )
171+
157172 message (WARNING
158173 "UR_DPCXX is not defined, the following conformance test executables \
159- are disabled: test-program, test-kernel, test-enqueue " )
174+ are disabled: ${DISABLED_TESTS_STR} " )
160175endif ()
0 commit comments