Files
termux-packages/x11-packages/python-torch/0007-enable-cxx17-by-default.patch

14 lines
440 B
Diff

Enable C++17 by default, because torch needs at least C++17 to build since 2.1.0.
--- a/third_party/onnx/CMakeLists.txt.orig
+++ b/third_party/onnx/CMakeLists.txt
@@ -58,7 +58,7 @@
# Required to use /std:c++17 or higher on Windows
# For other platforms, set C++11 as standard for the whole project
if(NOT MSVC)
- set(CMAKE_CXX_STANDARD 11)
+ set(CMAKE_CXX_STANDARD 17)
else()
string(APPEND CMAKE_CXX_FLAGS " /std:c++17")
endif()