mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-08 17:17:15 +00:00
### Description This PR updates the triplets files that manage the compile flags for vcpkg packages. All the changes are autogenerated except for the gen.py file in this PR. Main changes: 1. Enable debug info for all Linux build config(Release and Debug) 2. Set CMAKE_CXX_STANDARD in each triplet. The value is set to 20 for macOS targets and 17 for the others. 3. Only set _FORTIFY_SOURCE in release build. This is to address a build issue on some platforms with the following glibc change: "Warn if user requests __FORTIFY_SOURCE but it is disabled" https://sourceware.org/git/?p=glibc.git;a=commit;f=include/features.h;h=05c2c9618f583ea4acd69b3fe5ae2a2922dd2ddc ### Motivation and Context Address a Linux build error.
24 lines
867 B
CMake
24 lines
867 B
CMake
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
# Licensed under the MIT License.
|
|
set(VCPKG_TARGET_ARCHITECTURE arm64)
|
|
set(VCPKG_CRT_LINKAGE dynamic)
|
|
set(VCPKG_LIBRARY_LINKAGE static)
|
|
set(VCPKG_C_FLAGS "-g")
|
|
set(VCPKG_CXX_FLAGS "-g")
|
|
set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3")
|
|
set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3")
|
|
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF)
|
|
set(VCPKG_LINKER_FLAGS "-g")
|
|
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=17)
|
|
if(PORT MATCHES "onnx")
|
|
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
|
|
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
|
|
)
|
|
endif()
|
|
if(PORT MATCHES "benchmark")
|
|
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
|
|
"-DBENCHMARK_ENABLE_WERROR=OFF"
|
|
)
|
|
endif()
|