From 9c87fe79ea3b46b12c0b31ca0ff8a8b3d4264f38 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Tue, 24 May 2022 15:06:01 +0300 Subject: [PATCH] [openssl] suppress deprecation messages Signed-off-by: R4SAS --- Makefile | 2 +- build/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e9bd9187..44a8abdc 100644 --- a/Makefile +++ b/Makefile @@ -72,7 +72,7 @@ ifeq ($(USE_GIT_VERSION),yes) NEEDED_CXXFLAGS += -DGITVER=\"$(GIT_VERSION)\" endif -NEEDED_CXXFLAGS += -MMD -MP -I$(LIB_SRC_DIR) -I$(LIB_CLIENT_SRC_DIR) -I$(LANG_SRC_DIR) +NEEDED_CXXFLAGS += -MMD -MP -I$(LIB_SRC_DIR) -I$(LIB_CLIENT_SRC_DIR) -I$(LANG_SRC_DIR) -DOPENSSL_SUPPRESS_DEPRECATED LIB_OBJS += $(patsubst %.cpp,obj/%.o,$(LIB_SRC)) LIB_CLIENT_OBJS += $(patsubst %.cpp,obj/%.o,$(LIB_CLIENT_SRC)) diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index cf0416cd..82b04497 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -210,7 +210,7 @@ if(NOT DEFINED OPENSSL_INCLUDE_DIR) endif() if(OPENSSL_VERSION VERSION_GREATER_EQUAL "3.0.0") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations") + add_definitions(-DOPENSSL_SUPPRESS_DEPRECATED) endif() if(WITH_UPNP)