Skip to content

Commit dc48295

Browse files
committed
fix(ci): set VCPKG_BUILD_TYPE and suppress C4275 for infer-common
- Add missing VCPKG_BUILD_TYPE=release for Windows vcpkg install step - Suppress MSVC C4275 warning for dstools-infer-common (static lib inherited by DLL-exported classes)
1 parent cfb04fe commit dc48295

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ jobs:
152152
shell: cmd
153153
working-directory: ${{github.workspace}}/vcpkg
154154
run: |
155+
set VCPKG_BUILD_TYPE=release
155156
vcpkg.exe install --x-manifest-root=../scripts/vcpkg-manifest --x-install-root=./installed --overlay-triplets=../scripts/vcpkg/triplets --triplet=${{ matrix.triplet }}
156157
env:
157158
CMAKE_PREFIX_PATH: ${{env.QT_DIR}}

src/framework/infer/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ install(FILES
3636
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
3737
)
3838

39+
if(MSVC)
40+
# C4275: non dll-interface class used as base for dll-interface class.
41+
# This is expected because dstools-infer-common is a static library whose
42+
# classes are inherited by DLL-exported classes in consumer libraries
43+
# (hubert-infer, game-infer, rmvpe-infer). The static lib is linked
44+
# directly into each DLL, so the warning is benign.
45+
target_compile_options(${PROJECT_NAME} PUBLIC /wd4275)
46+
endif()
47+
3948
if(ONNXRUNTIME_ENABLE_DML)
4049
target_compile_definitions(${PROJECT_NAME} PUBLIC ONNXRUNTIME_ENABLE_DML)
4150
endif()

0 commit comments

Comments
 (0)