Skip to content

Commit a6083f5

Browse files
authored
Merge pull request #534 from PatKamin/ci-debug-builds
[ci] Add CI Debug builds
2 parents 20d4c6b + 9b7774c commit a6083f5

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

CMakeLists.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (C) 2022-2023 Intel Corporation
22
# SPDX-License-Identifier: MIT
33

4-
cmake_minimum_required(VERSION 3.15.0 FATAL_ERROR)
4+
cmake_minimum_required(VERSION 3.14.0 FATAL_ERROR)
55
project(unified-runtime VERSION 0.6.0)
66

77
include(GNUInstallDirs)
@@ -70,10 +70,9 @@ if(NOT MSVC)
7070
link_libraries(stdc++fs)
7171
endif()
7272
elseif(MSVC)
73-
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
7473
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
7574
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
76-
add_compile_options(/MP /W3)
75+
add_compile_options(/MP /W3 /MD$<$<CONFIG:Debug>:d>)
7776

7877
if(UR_DEVELOPER_MODE)
7978
add_compile_options(/WX)
@@ -101,8 +100,6 @@ if(UR_ENABLE_TRACING)
101100
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
102101
)
103102
if (MSVC)
104-
set_property(TARGET xpti PROPERTY MSVC_RUNTIME_LIBRARY "${CMAKE_MSVC_RUNTIME_LIBRARY}")
105-
set_property(TARGET xptifw PROPERTY MSVC_RUNTIME_LIBRARY "${CMAKE_MSVC_RUNTIME_LIBRARY}")
106103
set(TARGET_XPTI $<IF:$<CONFIG:Release>,xpti,xptid>)
107104

108105
# disable warning C4267: The compiler detected a conversion from size_t to a smaller type.

test/tools/urtrace/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function(add_trace_test name CLI_ARGS)
88
add_test(NAME ${TEST_NAME}
99
COMMAND ${CMAKE_COMMAND}
1010
-D TEST_FILE=${Python3_EXECUTABLE}
11-
-D TEST_ARGS="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/urtrace --stdout ${CLI_ARGS} $<TARGET_FILE:hello_world>"
11+
-D TEST_ARGS="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/urtrace --stdout ${CLI_ARGS} --flush info $<TARGET_FILE:hello_world>"
1212
-D MODE=stdout
1313
-D MATCH_FILE=${CMAKE_CURRENT_SOURCE_DIR}/${name}.match
1414
-P ${PROJECT_SOURCE_DIR}/cmake/match.cmake

tools/urtrace/urtrace

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ parser.add_argument("--time-unit", choices=['ns', 'us', 'ms', 's', 'auto'], defa
5656
parser.add_argument("--libpath", default=['.', '../lib/', '/lib/', '/usr/local/lib/', '/usr/lib/'], action="append", help="Search path for adapters and xpti libraries.")
5757
parser.add_argument("--recursive", help="Use recursive library search.", action="store_true")
5858
parser.add_argument("--debug", help="Print tool debug information.", action="store_true")
59+
parser.add_argument("--flush", choices=['debug', 'info', 'warning', 'error'], default='error', help="Set the flushing level of messages.", )
5960
args = parser.parse_args()
6061
config = vars(args)
6162
if args.debug:
@@ -80,10 +81,9 @@ env['UR_COLLECTOR_ARGS'] = collector_args
8081
log_collector = ""
8182
if args.debug:
8283
log_collector += "level:debug;"
83-
log_collector += "flush:debug;"
8484
else:
8585
log_collector += "level:info;"
86-
log_collector += "flush:info;"
86+
log_collector += f"flush:{args.flush};"
8787
if args.file:
8888
log_collector += "output:file," + args.file + ";"
8989
elif args.stdout:

0 commit comments

Comments
 (0)