From 3bf0b9534c0a6b877ff8ab5952e2f2dcd5838e6c Mon Sep 17 00:00:00 2001 From: Simon Richter Date: Thu, 23 Feb 2017 17:04:26 +0100 Subject: [PATCH] Fix incorrect parameter if the compiler doesn't support -Wshadow option --- pcbnew/CMakeLists.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 2c22916f0f..34b9fc504e 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -342,11 +342,14 @@ set( PCBNEW_SCRIPTING_PYTHON_HELPERS ) -# .cpp files are compiled with extra ${WSHADOW_FLAGS}, but not .cxx files -set_source_files_properties( - ${PCBNEW_SRCS} ${PCBNEW_COMMON_SRCS} ${PCBNEW_SCRIPTING_DIALOGS} ${PCBNEW_SCRIPTING_PYTHON_HELPERS} - PROPERTIES COMPILE_FLAGS ${WSHADOW_FLAGS} -) +if( COMPILER_SUPPORTS_WSHADOW ) + # .cpp files are compiled with extra ${WSHADOW_FLAGS}, but not .cxx files + set_source_files_properties( + ${PCBNEW_SRCS} ${PCBNEW_COMMON_SRCS} ${PCBNEW_SCRIPTING_DIALOGS} ${PCBNEW_SCRIPTING_PYTHON_HELPERS} + PROPERTIES COMPILE_FLAGS ${WSHADOW_FLAGS} + ) +endif() + if( KICAD_SCRIPTING ) set( PCBNEW_SCRIPTING_SRCS