File tree Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -21,17 +21,22 @@ foreach(tf ${spirv-test-files})
21
21
file (COPY ${tf} DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
22
22
endforeach ()
23
23
24
- if (DPCTL_GENERATE_COVERAGE )
25
- file (GLOB_RECURSE
26
- sources ${CMAKE_CURRENT_SOURCE_DIR} /*.cpp
27
- )
24
+ file (GLOB_RECURSE
25
+ sources ${CMAKE_CURRENT_SOURCE_DIR} /*.cpp
26
+ )
28
27
29
- # Add all dpctl sources into a single executable so that we can run coverage
30
- # analysis and generate a report.
31
- add_executable (dpctl_c_api_tests
32
- EXCLUDE_FROM_ALL
33
- ${sources}
34
- )
28
+ # Add all dpctl sources into a single executable so that we can run coverage
29
+ # analysis and generate a report.
30
+ add_executable (dpctl_c_api_tests
31
+ EXCLUDE_FROM_ALL
32
+ ${sources}
33
+ )
34
+ add_sycl_to_target (
35
+ TARGET dpctl_c_api_tests
36
+ SOURCES ${CMAKE_CURRENT_SOURCE_DIR} /test_helper.cpp
37
+ )
38
+
39
+ if (DPCTL_GENERATE_COVERAGE )
35
40
target_include_directories (dpctl_c_api_tests
36
41
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR} /../helper/include"
37
42
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR} /../include"
@@ -90,8 +95,6 @@ if(DPCTL_GENERATE_COVERAGE)
90
95
DEPENDS dpctl_c_api_tests
91
96
)
92
97
else ()
93
- file (GLOB_RECURSE sources ${CMAKE_CURRENT_SOURCE_DIR} /*.cpp )
94
- add_executable (dpctl_c_api_tests EXCLUDE_FROM_ALL ${sources} )
95
98
target_link_libraries (dpctl_c_api_tests
96
99
${CMAKE_THREAD_LIBS_INIT}
97
100
GTest::GTest
You can’t perform that action at this time.
0 commit comments