Skip to content

Commit

Permalink
Do not use -Wsuggest-override option if KICAD_SCRIPTING is enabled be…
Browse files Browse the repository at this point in the history
…cause it creates too many useless warnings when compiling pcbnewPYTHON_wrap.cxx
  • Loading branch information
jp-charras committed Sep 30, 2016
1 parent 67faa5e commit c9fec4a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit c9fec4a

Please sign in to comment.