cmake: Require C++17

Newer versions of protobuf apparently don't build with older versions of
the C++ standard.
This commit is contained in:
Robert Edmonds 2023-07-02 22:58:48 -04:00
parent 1937ba946b
commit 7582b6e7d6

View File

@ -96,7 +96,7 @@ if (MSVC AND NOT BUILD_SHARED_LIBS)
endif (MSVC AND NOT BUILD_SHARED_LIBS)
IF(BUILD_PROTOC)
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_STANDARD 17)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
SET(CMAKE_CXX_EXTENSIONS OFF)
ADD_CUSTOM_COMMAND(OUTPUT protobuf-c/protobuf-c.pb.cc protobuf-c/protobuf-c.pb.h