From 0bc9ef61ca14fcb711bdff919dc5720c86ca686a Mon Sep 17 00:00:00 2001 From: MistEO Date: Thu, 17 Oct 2024 17:50:59 +0800 Subject: [PATCH] fix: osx build of ort --- vcpkg-overlay/triplets/maa-arm64-osx.cmake | 10 ++++++---- vcpkg-overlay/triplets/maa-x64-osx.cmake | 8 +++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/vcpkg-overlay/triplets/maa-arm64-osx.cmake b/vcpkg-overlay/triplets/maa-arm64-osx.cmake index fb32378..628c475 100644 --- a/vcpkg-overlay/triplets/maa-arm64-osx.cmake +++ b/vcpkg-overlay/triplets/maa-arm64-osx.cmake @@ -12,7 +12,9 @@ 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 + message("add -Wno-error for ${PORT}") + string(APPEND VCPKG_C_FLAGS " -Wno-error=shorten-64-to-32") + string(APPEND VCPKG_CXX_FLAGS " -Wno-error=shorten-64-to-32") + string(APPEND VCPKG_C_FLAGS " -Wno-error=c99-extensions") + string(APPEND VCPKG_CXX_FLAGS " -Wno-error=c99-extensions") +endif() diff --git a/vcpkg-overlay/triplets/maa-x64-osx.cmake b/vcpkg-overlay/triplets/maa-x64-osx.cmake index 5d8d0d2..ae285ae 100644 --- a/vcpkg-overlay/triplets/maa-x64-osx.cmake +++ b/vcpkg-overlay/triplets/maa-x64-osx.cmake @@ -12,7 +12,9 @@ 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") + message("add -Wno-error for ${PORT}") + string(APPEND VCPKG_C_FLAGS " -Wno-error=shorten-64-to-32") + string(APPEND VCPKG_CXX_FLAGS " -Wno-error=shorten-64-to-32") + string(APPEND VCPKG_C_FLAGS " -Wno-error=c99-extensions") + string(APPEND VCPKG_CXX_FLAGS " -Wno-error=c99-extensions") endif()