From 66ddda956b299bfe8c6c001f15b0164980d70dad Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Thu, 12 Aug 2021 08:04:22 +0300 Subject: [PATCH] fix build with Fedora requirements --simplify warnings and add formalt security checks BUG:440759 --- CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4acbf24d7..1ee5ce24c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,8 +77,15 @@ include(WriteBasicConfigVersionFile) include(Definitions.cmake) +#hide warnings string(REPLACE "-Wall" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) -string(REPLACE "-Wformat-security" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) +string(REPLACE "-Wdeprecated-declarations" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) +string(REPLACE "-Wreorder" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) +string(REPLACE "-Wunused-variable" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) +string(REPLACE "-Wunused-parameter" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + +#add format security check +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Werror=format-security") message(STATUS "COMPILER FLAGS : ${CMAKE_CXX_FLAGS}")