From 6fc1f164c0495baab810b358077c49e088d22034 Mon Sep 17 00:00:00 2001 From: Tao He Date: Tue, 19 Sep 2023 20:42:49 +0800 Subject: [PATCH] Fixes the extra-smi error in code generated by protobuf (#251) Signed-off-by: Tao He --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d2520fe..5aa1310 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -181,9 +181,13 @@ if(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC") endif() check_cxx_compiler_flag(-Wno-c++17-extensions W_NO_CPP17_EXTENSIONS) +check_cxx_compiler_flag(-Wno-extra-semi W_NO_EXTRA_SEMI) if(W_NO_CPP17_EXTENSIONS) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++17-extensions") endif() +if(W_NO_EXTRA_SEMI) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-extra-semi") +endif() set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)