onnxruntime/cmake/onnxruntime_config.h.in
Dmitri Smirnov 896a963492
Adust GetVersionString() GetBuildInfoString() signatures and move them to OrtApi (#15921)
### Description

This PR partially reverts changes introduced in
https://github.com/microsoft/onnxruntime/pull/15643

We make two API return std::string always in UTF-8.

We also move the entry points from OrtApiBase to OrtApi to make them
versioned.

### Motivation and Context

`GetVersionString` always returns x.y.z numbers that are not subject to
internationalization.
`GetBuildInfoString` can hold international chars, but UTF-8 should be
fine to contain those.
We prefix them with u8"" in case the compiler default charset is not
UTF-8.
Furthermore, creating platform dependent APIs is discouraged.
`ORTCHAR_T` is platform dependent and was created for paths only.
On non-unix platforms would still produce `std::string` that can only
contain UTF-8

The API was introduced after the latest release, and can still be
adjusted.
2023-05-13 13:45:07 -07:00

25 lines
843 B
C

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#cmakedefine HAS_UNUSED_BUT_SET_PARAMETER
#cmakedefine HAS_UNUSED_BUT_SET_VARIABLE
#cmakedefine HAS_UNUSED_VARIABLE
#cmakedefine HAS_CAST_FUNCTION_TYPE
#cmakedefine HAS_PARENTHESES
#cmakedefine HAS_USELESS_CAST
#cmakedefine HAS_NONNULL_COMPARE
#cmakedefine HAS_TAUTOLOGICAL_POINTER_COMPARE
#cmakedefine HAS_CATCH_VALUE
#cmakedefine HAS_MISSING_BRACES
#cmakedefine HAS_IGNORED_ATTRIBUTES
#cmakedefine HAS_DEPRECATED_COPY
#cmakedefine HAS_CLASS_MEMACCESS
#cmakedefine HAS_MAYBE_UNINITIALIZED
#cmakedefine HAS_DEPRECATED_DECLARATIONS
#cmakedefine HAS_FORMAT_TRUNCATION
#cmakedefine HAS_BITWISE_INSTEAD_OF_LOGICAL
#cmakedefine HAS_REALLOCARRAY
#cmakedefine ORT_VERSION u8"@ORT_VERSION@"
#cmakedefine ORT_BUILD_INFO u8"@ORT_BUILD_INFO@"