Skip to content

Commit

Permalink
ci: set(CMAKE_CXX_STANDARD 17)
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Nov 6, 2024
1 parent b2d7078 commit 9b3dd4e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
17 changes: 17 additions & 0 deletions vcpkg-overlay/ports/maa-onnxruntime/0000-system-lib-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 5555fa6..87a99f7 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -39,12 +39,7 @@ include(CMakeDependentOption)
include(FetchContent)
include(CheckFunctionExists)

-# TODO: update this once all system adapt c++20
-if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-set(CMAKE_CXX_STANDARD 20)
-else()
set(CMAKE_CXX_STANDARD 17)
-endif()

if (MSVC)
# Make sure Visual Studio sets __cplusplus macro correctly: https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus
4 changes: 2 additions & 2 deletions vcpkg-overlay/ports/maa-onnxruntime/fix-pr-21348.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ index 2e9a50e52217154a9bf27355f211a8db0013befd..e9c7c307eb2aaacb36f7335f55a55cf8
include(CheckFunctionExists)
+include(GNUInstallDirs) # onnxruntime_providers_* require CMAKE_INSTALL_* variables

# TODO: update this once all system adapt c++20
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(CMAKE_CXX_STANDARD 17)

@@ -69,6 +70,7 @@ if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_
endif()

Expand Down
1 change: 1 addition & 0 deletions vcpkg-overlay/ports/maa-onnxruntime/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ vcpkg_from_github(
REF ${ORT_BRANCH}
SHA512 3bf25e431d175c61953d28b1bf8f6871376684263992451a5b2a66e670768fc66e7027f141c6e3f4d1eddeebeda51f31ea0adf4749e50d99ee89d0a26bec77ce
PATCHES
0000-system-lib-fix.patch
revert-pr-21492.patch
fix-pr-21348.patch # cmake, source changes of PR 21348
fix-cmake.patch
Expand Down

0 comments on commit 9b3dd4e

Please sign in to comment.