https://git.reactos.org/?p=reactos.git;a=commitdiff;h=29c1089983ce678430a1c120a38b1a183aebcbbd

commit 29c1089983ce678430a1c120a38b1a183aebcbbd
Author:     Serge Gautherie <reactos-git_serge_171...@gautherie.fr>
AuthorDate: Sat Aug 17 01:14:36 2019 +0200
Commit:     Thomas Faber <18138474+thfa...@users.noreply.github.com>
CommitDate: Sun Mar 8 13:30:10 2020 +0100

    [CMAKE] gcc.cmake: '-Wno-unused-const-variable' applies to GCC 6.1+
    
    GCC 4.7.2 logs
    'cc1: error: unrecognized command line option "-Wno-unused-const-variable" 
[-Werror]'
    
    Addendum to 8eb7a1a2f4a9cce5a70a9c48efb30cdfa59bf56f.
---
 sdk/cmake/gcc.cmake | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sdk/cmake/gcc.cmake b/sdk/cmake/gcc.cmake
index d91a9483e83..d37d1c06553 100644
--- a/sdk/cmake/gcc.cmake
+++ b/sdk/cmake/gcc.cmake
@@ -113,7 +113,9 @@ endif()
 
 add_compile_flags("-Wall -Wpointer-arith")
 add_compile_flags("-Wno-char-subscripts -Wno-multichar -Wno-unused-value")
-add_compile_flags("-Wno-unused-const-variable")
+if(NOT GCC_VERSION VERSION_LESS 6.1)
+    add_compile_flags("-Wno-unused-const-variable")
+endif()
 add_compile_flags("-Wno-unused-local-typedefs")
 add_compile_flags("-Wno-deprecated")
 

Reply via email to