pin-server/0029-Pin-server-Adaptation-to-gcc12-only-solves-the-build.patch

45 lines
1.4 KiB
Diff
Raw Normal View History

From 868531920b4f5a16f636219d44fbf36a9abd401b Mon Sep 17 00:00:00 2001
From: dingguangya <dingguangya1@huawei.com>
Date: Mon, 7 Aug 2023 17:02:15 +0800
Subject: [PATCH 2/2] [Pin-server] Adaptation to gcc12 only solves the build
problem
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 233f345..0a72863 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,7 +17,7 @@ include(cmake/common.cmake)
#-------------------------------------------------------------------------------
set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON)
-set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to")
+set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to conform to")
find_package(MLIR REQUIRED CONFIG)
message(STATUS "Using MLIRConfig.cmake in: ${MLIR_DIR}")
@@ -46,7 +46,7 @@ add_definitions(${LLVM_DEFINITIONS})
include_directories(include)
-add_compile_options(-std=c++14 -Wall -fPIC)
+add_compile_options(-std=c++17 -Wall -fPIC)
# Proto file
get_filename_component(plg_proto "protos/plugin.proto" ABSOLUTE)
get_filename_component(plg_proto_path "${plg_proto}" PATH)
diff --git a/cmake/common.cmake b/cmake/common.cmake
index f18c25b..cf48699 100644
--- a/cmake/common.cmake
+++ b/cmake/common.cmake
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.5.1)
-set (CMAKE_CXX_STANDARD 14)
+set (CMAKE_CXX_STANDARD 17)
find_package(Threads REQUIRED)
--
2.33.0.windows.2