Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump CMAKE_CXX_STANDARD as 17 globally #5612

Merged
merged 11 commits into from
Oct 26, 2023
7 changes: 0 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,8 @@ else()
set(Protobuf_USE_STATIC_LIBS ON)
endif()

# Required to use C++17 or higher on Windows
# For other platforms, set C++14 as standard for the whole project
if(NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
if(MSVC AND CMAKE_CXX_STANDARD LESS 17)
set(CMAKE_CXX_STANDARD 17)
justinchuby marked this conversation as resolved.
Show resolved Hide resolved
elseif(CMAKE_CXX_STANDARD LESS 14)
set(CMAKE_CXX_STANDARD 14)
endif()

include(GNUInstallDirs)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ conda install -c conda-forge onnx

Before building from source uninstall any existing versions of onnx `pip uninstall onnx`.

c++17 or higher C++ compiler version is required to build ONNX from source on Windows. For other platforms, please use C++14 or higher versions.
c++17 or higher C++ compiler version is required to build ONNX from source. Still, users can specify their own `CMAKE_CXX_STANDARD` version for building ONNX.

If you don't have protobuf installed, ONNX will internally download and build protobuf for ONNX build.

Expand Down