From c9fec4a4ed1cac494288d73630d831629c401682 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 30 Sep 2016 18:38:23 +0200 Subject: [PATCH] Do not use -Wsuggest-override option if KICAD_SCRIPTING is enabled because it creates too many useless warnings when compiling pcbnewPYTHON_wrap.cxx --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e3e0eec5f5..6d96872add 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -180,7 +180,9 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) CHECK_CXX_COMPILER_FLAG("-Wsuggest-override" COMPILER_SUPPORTS_WSUGGEST_OVERRIDE) - if(COMPILER_SUPPORTS_WSUGGEST_OVERRIDE) + # Swig generated files do not use override specifier and create a lot of warnings + # So do not use -Wsuggest-override with KICAD_SCRIPTING ON, untill a best way is found + if(COMPILER_SUPPORTS_WSUGGEST_OVERRIDE AND NOT KICAD_SCRIPTING) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override") endif() endif()