@@ -14,7 +14,7 @@ set(onnxruntime_common_src_patterns
1414 "${ONNXRUNTIME_ROOT} /core/platform/check_intel.h"
1515 "${ONNXRUNTIME_ROOT} /core/platform/check_intel.cc"
1616 "${ONNXRUNTIME_ROOT} /core/platform/device_discovery.h"
17- "${ONNXRUNTIME_ROOT} /core/platform/device_discovery .cc"
17+ "${ONNXRUNTIME_ROOT} /core/platform/device_discovery_common .cc"
1818 "${ONNXRUNTIME_ROOT} /core/platform/env.h"
1919 "${ONNXRUNTIME_ROOT} /core/platform/env.cc"
2020 "${ONNXRUNTIME_ROOT} /core/platform/env_time.h"
@@ -32,26 +32,38 @@ set(onnxruntime_common_src_patterns
3232
3333if (WIN32 )
3434 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"
3747 "${ONNXRUNTIME_ROOT} /core/platform/windows/logging/*.h"
3848 "${ONNXRUNTIME_ROOT} /core/platform/windows/logging/*.cc"
3949 )
4050
4151else ()
4252 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"
4556 )
4657
58+ # logging files
4759 if (onnxruntime_USE_SYSLOG)
4860 list (APPEND onnxruntime_common_src_patterns
4961 "${ONNXRUNTIME_ROOT} /core/platform/posix/logging/*.h"
5062 "${ONNXRUNTIME_ROOT} /core/platform/posix/logging/*.cc"
5163 )
5264 endif ()
5365
54- if (CMAKE_SYSTEM_NAME STREQUAL "Android" )
66+ if (ANDROID )
5567 list (APPEND onnxruntime_common_src_patterns
5668 "${ONNXRUNTIME_ROOT} /core/platform/android/logging/*.h"
5769 "${ONNXRUNTIME_ROOT} /core/platform/android/logging/*.cc"
@@ -66,6 +78,21 @@ else()
6678 endif ()
6779endif ()
6880
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+
6996if (onnxruntime_target_platform STREQUAL "ARM64EC" )
7097 if (MSVC )
7198 link_directories ("$ENV{VCINSTALLDIR} /Tools/MSVC/$ENV{VCToolsVersion} /lib/ARM64EC" )
@@ -216,8 +243,6 @@ endif()
216243
217244if (RISCV64 OR ARM64 OR ARM OR X86 OR X64 OR X86_64)
218245 # 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.
221246 if (CPUINFO_SUPPORTED)
222247 onnxruntime_add_include_to_target(onnxruntime_common cpuinfo::cpuinfo)
223248 list (APPEND onnxruntime_EXTERNAL_LIBRARIES cpuinfo::cpuinfo ${ONNXRUNTIME_CLOG_TARGET_NAME} )
0 commit comments