From d6b75b47a5e842b2e294790dbfd035927bb0310b Mon Sep 17 00:00:00 2001 From: MistEO Date: Wed, 16 Oct 2024 17:50:57 +0800 Subject: [PATCH] fix(osx): -Wno-error=shorten-64-to-32 --- vcpkg-overlay/triplets/maa-arm64-osx.cmake | 6 ++++++ vcpkg-overlay/triplets/maa-x64-osx.cmake | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/vcpkg-overlay/triplets/maa-arm64-osx.cmake b/vcpkg-overlay/triplets/maa-arm64-osx.cmake index 7f9ebb1..fb32378 100644 --- a/vcpkg-overlay/triplets/maa-arm64-osx.cmake +++ b/vcpkg-overlay/triplets/maa-arm64-osx.cmake @@ -10,3 +10,9 @@ string(APPEND VCPKG_C_FLAGS "-g -DNDEBUG") string(APPEND VCPKG_CXX_FLAGS "-g -DNDEBUG") include(${CMAKE_CURRENT_LIST_DIR}/maa-linux-library-override.cmake) + +if(PORT MATCHES "onnxruntime") + message("add -Wno-error=shorten-64-to-32 for ${PORT}") + string(APPEND VCPKG_C_FLAGS "-Wno-error=shorten-64-to-32") + string(APPEND VCPKG_CXX_FLAGS "-Wno-error=shorten-64-to-32") +endif() \ No newline at end of file diff --git a/vcpkg-overlay/triplets/maa-x64-osx.cmake b/vcpkg-overlay/triplets/maa-x64-osx.cmake index 59e2af9..5d8d0d2 100644 --- a/vcpkg-overlay/triplets/maa-x64-osx.cmake +++ b/vcpkg-overlay/triplets/maa-x64-osx.cmake @@ -10,3 +10,9 @@ string(APPEND VCPKG_C_FLAGS "-g -DNDEBUG") string(APPEND VCPKG_CXX_FLAGS "-g -DNDEBUG") include(${CMAKE_CURRENT_LIST_DIR}/maa-linux-library-override.cmake) + +if(PORT MATCHES "onnxruntime") + message("add -Wno-error=shorten-64-to-32 for ${PORT}") + string(APPEND VCPKG_C_FLAGS "-Wno-error=shorten-64-to-32") + string(APPEND VCPKG_CXX_FLAGS "-Wno-error=shorten-64-to-32") +endif()