← Back to team overview

kicad-developers team mailing list archive

Re: -Wsuggest-override with scripting enabled

 

Le 06/10/2016 à 14:30, Wayne Stambaugh a écrit :
> On 10/6/2016 2:58 AM, John Beard wrote:
>> On Thu, Oct 6, 2016 at 7:10 AM, jp charras <jp.charras@xxxxxxxxxx> wrote:
>>>
>>> It works for me, but I had to  modify the patch
>>> the change in pcbnew/CMakeLists.txt is
>>>     if( COMPILER_SUPPORTS_WSUGGEST_OVERRIDE )
>>>         set_source_files_properties(pcbnew_wrap.cxx pcbnewPYTHON_wrap.cxx
>>>             PROPERTIES COMPILE_FLAGS -Wno-suggest-override
>>>         )
>>>
>>> instead of
>>>     if( COMPILER_SUPPORTS_WSUGGEST_OVERRIDE )
>>>         set_source_files_properties(pcbnew_wrap.cxx
>>>             PROPERTIES COMPILE_FLAGS -Wno-suggest-override
>>>         )
> 
> @JP, I will go ahead and commit John's patch as is.  If you want me to,
> I can add your changes as a separate commit or you can commit the
> changes.  Please let me know.

If my changes are also working for you, add them.
Thanks.

> 
>>
>> That's seems strange that adding the file to that list would just
>> work. Since CMake doesn't know about that file (it's not declared as
>> an output or a compiled file anywhere), how does it ever get compiled
>> in the first place, let alone get special flags applied to it? Are you
>> sure the file is being rebuilt the second time?
> 
> I was wondering about that myself.  I grepped pcbnew/CMakeLists.txt and
> there is no pcbnewPYTHON_wrap.cxx so I'm not sure where this is getting
> pulled in unless it's something swig is generating.

I did not found it in CMakeLists.txt.
However it is in a .make autogenerated file.

Unfortunately I have a very limited knowledge of cmake an swig, and I don't know exactly what tool
has generated the commands (in build.make) to build/compile pcbnewPYTHON_wrap.cxx.


> 
>>
>> I may have missed the warnings from the pcbnewPYTHON file, as they did
>> overrun my terminal scrollback, but on cleaning and rebuilding, I
>> don't actually see that file being created or compiled at all. I do
>> see pcbnew_wrap.cpp being created and compiled as expected. When do
>> others see that file appear in the build tree (I assume at the same
>> time as pcbnew_wrap.cxx?) and when does pcbnewPYTHON_wrap.cxx appear
>> in the compilation output (approximately, exact result depend on
>> CMake's multithreading)?
>>
>> GCC 6.2.1 is the compiler, CMake 3.6.2, SWIG 3.0.10, on Arch Linux.


-- 
Jean-Pierre CHARRAS


Follow ups

References