@@ -14,7 +14,7 @@ set(onnxruntime_common_src_patterns
14
14
"${ONNXRUNTIME_ROOT} /core/platform/check_intel.h"
15
15
"${ONNXRUNTIME_ROOT} /core/platform/check_intel.cc"
16
16
"${ONNXRUNTIME_ROOT} /core/platform/device_discovery.h"
17
- "${ONNXRUNTIME_ROOT} /core/platform/device_discovery .cc"
17
+ "${ONNXRUNTIME_ROOT} /core/platform/device_discovery_common .cc"
18
18
"${ONNXRUNTIME_ROOT} /core/platform/env.h"
19
19
"${ONNXRUNTIME_ROOT} /core/platform/env.cc"
20
20
"${ONNXRUNTIME_ROOT} /core/platform/env_time.h"
@@ -32,26 +32,38 @@ set(onnxruntime_common_src_patterns
32
32
33
33
if (WIN32 )
34
34
list (APPEND onnxruntime_common_src_patterns
35
- "${ONNXRUNTIME_ROOT} /core/platform/windows/*.h"
36
- "${ONNXRUNTIME_ROOT} /core/platform/windows/*.cc"
35
+ "${ONNXRUNTIME_ROOT} /core/platform/windows/debug_alloc.cc"
36
+ "${ONNXRUNTIME_ROOT} /core/platform/windows/debug_alloc.h"
37
+ "${ONNXRUNTIME_ROOT} /core/platform/windows/dll_load_error.cc"
38
+ "${ONNXRUNTIME_ROOT} /core/platform/windows/dll_load_error.h"
39
+ "${ONNXRUNTIME_ROOT} /core/platform/windows/env_time.cc"
40
+ "${ONNXRUNTIME_ROOT} /core/platform/windows/env.cc"
41
+ "${ONNXRUNTIME_ROOT} /core/platform/windows/env.h"
42
+ "${ONNXRUNTIME_ROOT} /core/platform/windows/hardware_core_enumerator.cc"
43
+ "${ONNXRUNTIME_ROOT} /core/platform/windows/hardware_core_enumerator.h"
44
+ "${ONNXRUNTIME_ROOT} /core/platform/windows/stacktrace.cc"
45
+ "${ONNXRUNTIME_ROOT} /core/platform/windows/telemetry.cc"
46
+ "${ONNXRUNTIME_ROOT} /core/platform/windows/telemetry.h"
37
47
"${ONNXRUNTIME_ROOT} /core/platform/windows/logging/*.h"
38
48
"${ONNXRUNTIME_ROOT} /core/platform/windows/logging/*.cc"
39
49
)
40
50
41
51
else ()
42
52
list (APPEND onnxruntime_common_src_patterns
43
- "${ONNXRUNTIME_ROOT} /core/platform/posix/*.h"
44
- "${ONNXRUNTIME_ROOT} /core/platform/posix/*.cc"
53
+ "${ONNXRUNTIME_ROOT} /core/platform/posix/env_time.cc"
54
+ "${ONNXRUNTIME_ROOT} /core/platform/posix/env.cc"
55
+ "${ONNXRUNTIME_ROOT} /core/platform/posix/stacktrace.cc"
45
56
)
46
57
58
+ # logging files
47
59
if (onnxruntime_USE_SYSLOG)
48
60
list (APPEND onnxruntime_common_src_patterns
49
61
"${ONNXRUNTIME_ROOT} /core/platform/posix/logging/*.h"
50
62
"${ONNXRUNTIME_ROOT} /core/platform/posix/logging/*.cc"
51
63
)
52
64
endif ()
53
65
54
- if (CMAKE_SYSTEM_NAME STREQUAL "Android" )
66
+ if (ANDROID )
55
67
list (APPEND onnxruntime_common_src_patterns
56
68
"${ONNXRUNTIME_ROOT} /core/platform/android/logging/*.h"
57
69
"${ONNXRUNTIME_ROOT} /core/platform/android/logging/*.cc"
@@ -66,6 +78,21 @@ else()
66
78
endif ()
67
79
endif ()
68
80
81
+ # platform-specific device discovery files
82
+ if (WIN32 )
83
+ list (APPEND onnxruntime_common_src_patterns
84
+ "${ONNXRUNTIME_ROOT} /core/platform/windows/device_discovery.cc" )
85
+ elseif (LINUX)
86
+ list (APPEND onnxruntime_common_src_patterns
87
+ "${ONNXRUNTIME_ROOT} /core/platform/linux/device_discovery.cc" )
88
+ elseif (APPLE )
89
+ list (APPEND onnxruntime_common_src_patterns
90
+ "${ONNXRUNTIME_ROOT} /core/platform/apple/device_discovery.cc" )
91
+ else ()
92
+ list (APPEND onnxruntime_common_src_patterns
93
+ "${ONNXRUNTIME_ROOT} /core/platform/device_discovery_default.cc" )
94
+ endif ()
95
+
69
96
if (onnxruntime_target_platform STREQUAL "ARM64EC" )
70
97
if (MSVC )
71
98
link_directories ("$ENV{VCINSTALLDIR} /Tools/MSVC/$ENV{VCToolsVersion} /lib/ARM64EC" )
@@ -216,8 +243,6 @@ endif()
216
243
217
244
if (RISCV64 OR ARM64 OR ARM OR X86 OR X64 OR X86_64)
218
245
# Link cpuinfo if supported
219
- # Using it mainly in ARM with Android.
220
- # Its functionality in detecting x86 cpu features are lacking, so is support for Windows.
221
246
if (CPUINFO_SUPPORTED)
222
247
onnxruntime_add_include_to_target(onnxruntime_common cpuinfo::cpuinfo)
223
248
list (APPEND onnxruntime_EXTERNAL_LIBRARIES cpuinfo::cpuinfo ${ONNXRUNTIME_CLOG_TARGET_NAME} )
0 commit comments