Remove optional-lite (#9424)

This commit is contained in:
Changming Sun 2021-10-22 16:45:45 -07:00 committed by GitHub
parent 3ed8ade675
commit d83adaaf9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 19 deletions

3
.gitmodules vendored
View file

@ -56,9 +56,6 @@
[submodule "cmake/external/SafeInt/safeint"]
path = cmake/external/SafeInt/safeint
url = https://github.com/dcleblanc/SafeInt.git
[submodule "cmake/external/optional-lite"]
path = cmake/external/optional-lite
url = https://github.com/martinmoene/optional-lite.git
[submodule "cmake/external/mp11"]
path = cmake/external/mp11
url = https://github.com/boostorg/mp11.git

View file

@ -837,11 +837,6 @@ set(SAFEINT_INCLUDE_DIR ${REPO_ROOT}/cmake/external/SafeInt)
add_library(safeint_interface INTERFACE)
target_include_directories(safeint_interface INTERFACE ${SAFEINT_INCLUDE_DIR})
set(OPTIONAL_LITE_INCLUDE_DIR ${REPO_ROOT}/cmake/external/optional-lite/include)
if (onnxruntime_DISABLE_EXCEPTIONS)
add_compile_definitions(optional_CONFIG_NO_EXCEPTIONS=1)
endif()
if (onnxruntime_PREFER_SYSTEM_LIB)
find_package(boost_mp11)
endif()

@ -1 +0,0 @@
Subproject commit 4acf4553baa886e10e6613fe1452b706b0250e78

View file

@ -2,23 +2,22 @@
// Licensed under the MIT License.
#pragma once
#include <nonstd/optional.hpp>
#include <optional>
namespace onnxruntime {
using nonstd::optional;
using std::optional;
#ifndef ORT_NO_EXCEPTIONS
using nonstd::bad_optional_access;
using std::bad_optional_access;
#endif
using nonstd::nullopt;
using nonstd::nullopt_t;
using std::nullopt;
using std::nullopt_t;
using nonstd::in_place;
using nonstd::in_place_t;
using std::in_place;
using std::in_place_t;
using nonstd::make_optional;
using std::make_optional;
} // namespace onnxruntime

View file

@ -454,7 +454,7 @@ def parse_arguments():
help="Enable operator implemented in language other than cpp")
parser.add_argument(
"--cmake_generator",
choices=['Visual Studio 15 2017', 'Visual Studio 16 2019', 'Ninja'],
choices=['Visual Studio 15 2017', 'Visual Studio 16 2019', 'Visual Studio 17 2022', 'Ninja'],
default='Visual Studio 16 2019' if is_windows() else None,
help="Specify the generator that CMake invokes. "
"This is only supported on Windows")