Add a new warnings variable that can be used for injecting new warnings

This variable can be used to add in more warnings to the compilation
that only apply to the KiCad code and not the SWIG or third-party code.
This commit is contained in:
Ian McInerney 2021-04-22 22:08:00 +01:00
parent 2e15de97e0
commit fcca4bc3e6
1 changed files with 7 additions and 0 deletions

View File

@ -176,4 +176,11 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
set( WARN_FLAGS_CXX "${WARN_FLAGS_CXX} -Wno-psabi" )
message( STATUS "Disabling warning -Wpsabi" )
endif()
# Append any additional warning flags so the end of the warning string
if( KICAD_ADDITIONAL_WARN_FLAGS )
set( WARN_FLAGS_CXX "${WARN_FLAGS_CXX} ${KICAD_ADDITIONAL_WARN_FLAGS}" )
message( STATUS "Adding additional warning flags: ${KICAD_ADDITIONAL_WARN_FLAGS}")
endif()
endif()