From 7c40c51662e3d01edeb43a939acd1c8a8b562976 Mon Sep 17 00:00:00 2001 From: gsk <171930433@qq.com> Date: Sat, 9 Mar 2024 09:01:19 +0800 Subject: [PATCH] compile in 2204 --- CMakeLists.txt | 6 +++++- src/struct_pb/protoc-plugin/CMakeLists.txt | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b3f7079d6..8a5a49c0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,4 +31,8 @@ if(CMAKE_PROJECT_NAME STREQUAL "yaLanTingLibs") # if ylt is top-level project endif() -# add_subdirectory(src/struct_pb/protoc-plugin) +# set(CMAKE_C_COMPILER gcc-9) +# set(CMAKE_CXX_COMPILER g++-9) +list(APPEND CMAKE_PREFIX_PATH "/home/gsk/pro/CyberRT/install/") + +add_subdirectory(src/struct_pb/protoc-plugin) diff --git a/src/struct_pb/protoc-plugin/CMakeLists.txt b/src/struct_pb/protoc-plugin/CMakeLists.txt index 82aaaee16..167b01a38 100644 --- a/src/struct_pb/protoc-plugin/CMakeLists.txt +++ b/src/struct_pb/protoc-plugin/CMakeLists.txt @@ -1,6 +1,5 @@ cmake_minimum_required(VERSION 3.10) -set(CMAKE_C_COMPILER gcc-9) -set(CMAKE_CXX_COMPILER g++-9) + set(CMAKE_CXX_STANDARD 17) project(protoc-gen-struct_pb)