From 802800341c0a4bdece6d682437caaf9b504da10e Mon Sep 17 00:00:00 2001 From: Dmitri Tikhonov Date: Fri, 4 May 2018 15:32:16 +0000 Subject: [PATCH] Disable misleading indent warnings in gcc 6+ --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2cb8d62..1cf09d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,12 @@ SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} -fno-omit-frame-pointer") IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9.3) SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} -Wno-missing-field-initializers") ENDIF() +IF(CMAKE_COMPILER_IS_GNUCC AND ( + CMAKE_C_COMPILER_VERSION VERSION_EQUAL 6.0.0 + OR + CMAKE_C_COMPILER_VERSION VERSION_GREATER 6)) + SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} -Wno-misleading-indentation") +ENDIF() IF(DEVEL_MODE EQUAL 1) SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} -O0 -g3") # -Werror is used to force us to fix warnings early.