File tree Expand file tree Collapse file tree 3 files changed +27
-12
lines changed
src/cmake_dpct_compile_sycl_code Expand file tree Collapse file tree 3 files changed +27
-12
lines changed Original file line number Diff line number Diff line change 164
164
<test testName =" bt-language-warning" configFile =" config/TEMPLATE_behavior_tests.xml" />
165
165
<test testName =" bt-check-unexpected-message" configFile =" config/TEMPLATE_behavior_tests.xml" />
166
166
<test testName =" cmp-cmds-linker-entry-src-files" configFile =" config/TEMPLATE_behavior_tests_lin.xml" />
167
- <test testName =" cmake_dpct_compile_sycl_code" configFile =" config/TEMPLATE_behavior_tests_lin .xml" />
167
+ <test testName =" cmake_dpct_compile_sycl_code" configFile =" config/TEMPLATE_behavior_tests .xml" />
168
168
</tests >
169
169
170
170
</suite >
Original file line number Diff line number Diff line change 6
6
#
7
7
#===----------------------------------------------------------------------===//
8
8
9
- cmake_minimum_required (VERSION 3.23 )
9
+ cmake_minimum_required (VERSION 3.10 )
10
10
11
- project (cmake_ptx LANGUAGES CXX )
11
+ project (cmake_ptx NONE )
12
12
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsycl" )
13
13
find_program (
14
14
dpct_bin_path
@@ -22,13 +22,13 @@ dpct_compile_sycl_code(cuda_ptx_files jit.dp.cpp)
22
22
23
23
set (_generated_files "" )
24
24
add_custom_command (
25
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR} /app
26
- COMMAND icpx -fsycl -o ${CMAKE_CURRENT_BINARY_DIR} /app
25
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR} /app.run
26
+ COMMAND icpx -fsycl -o ${CMAKE_CURRENT_BINARY_DIR} /app.run
27
27
${CMAKE_SOURCE_DIR} /kernel_library.cpp.dp.cpp
28
28
DEPENDS ${CMAKE_SOURCE_DIR} /kernel_library.cpp.dp.cpp
29
- COMMENT "Generating app" )
29
+ COMMENT "Generating app.run " )
30
30
31
- list (APPEND _generated_files ${CMAKE_CURRENT_BINARY_DIR} /app )
31
+ list (APPEND _generated_files ${CMAKE_CURRENT_BINARY_DIR} /app.run )
32
32
33
33
set (_copy_files "" )
34
34
add_custom_command (
Original file line number Diff line number Diff line change @@ -21,11 +21,26 @@ def setup_test():
21
21
def migrate_test ():
22
22
# clean previous migration output
23
23
if (os .path .exists ("build" )):
24
- shutil .rmtree ("build" )
25
- call_subprocess (" mkdir build && cd build && cmake -DCMAKE_CXX_COMPILER=icpx ../ && make" )
26
- return os .path .exists (os .path .join ("build" , "app" ))
24
+ shutil .rmtree ("build" )
25
+
26
+ ret = call_subprocess ("mkdir build" )
27
+ if not ret :
28
+ print ("Error to create build folder:" , test_config .command_output )
29
+
30
+ ret = change_dir ("build" )
31
+ if not ret :
32
+ print ("Error to go to build folder:" , test_config .command_output )
33
+
34
+ ret = call_subprocess ("cmake -G \" Unix Makefiles\" -DCMAKE_CXX_COMPILER=icpx ../" )
35
+ if not ret :
36
+ print ("Error to run cmake configure:" , test_config .command_output )
37
+
38
+ ret = call_subprocess ("make" )
39
+ if not ret :
40
+ print ("Error to run build process:" , test_config .command_output )
41
+
42
+ return os .path .exists ("app.run" )
27
43
def build_test ():
28
44
return True
29
45
def run_test ():
30
- change_dir ("build" )
31
- return call_subprocess (os .path .join (os .path .curdir , "app" ))
46
+ return call_subprocess ("./app.run" )
You can’t perform that action at this time.
0 commit comments