File tree Expand file tree Collapse file tree 2 files changed +22
-7
lines changed
behavior_tests/src/cmake_target_link_libraries Expand file tree Collapse file tree 2 files changed +22
-7
lines changed Original file line number Diff line number Diff line change 1
- cmake_minimum_required (VERSION 3.24 )
1
+ cmake_minimum_required (VERSION 3.10 )
2
2
project (foo LANGUAGES CXX )
3
3
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsycl" )
4
4
find_program (dpct_bin_path NAMES dpct PATHS )
@@ -12,4 +12,4 @@ set(SOURCES
12
12
${CMAKE_SOURCE_DIR} /main.dp.cpp
13
13
)
14
14
add_executable (foo-bar ${SOURCES} )
15
- target_link_libraries (foo-bar PUBLIC -qmkl ${DNN_LIB} )
15
+ target_link_libraries (foo-bar PUBLIC -qmkl ${DNN_LIB} )
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" , "foo-bar" ))
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 ("foo-bar" )
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 , "foo-bar" ))
46
+ return call_subprocess ("./foo-bar" )
You can’t perform that action at this time.
0 commit comments