Skip to content

Commit 261586a

Browse files
Change CMake version and test to run on windows OS
Signed-off-by: Ahmed, Daiyaan <[email protected]>
1 parent 303d0fc commit 261586a

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

behavior_tests/src/cmake_target_link_libraries/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.24)
1+
cmake_minimum_required(VERSION 3.10)
22
project(foo LANGUAGES CXX )
33
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsycl")
44
find_program(dpct_bin_path NAMES dpct PATHS)
@@ -12,4 +12,4 @@ set(SOURCES
1212
${CMAKE_SOURCE_DIR}/main.dp.cpp
1313
)
1414
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})

behavior_tests/src/cmake_target_link_libraries/do_test.py

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,26 @@ def setup_test():
2121
def migrate_test():
2222
# clean previous migration output
2323
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")
2743
def build_test():
2844
return True
2945
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")

0 commit comments

Comments
 (0)