← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Build fixes: bitmaps and polygon

 

On 1/31/2019 11:27 AM, jp charras wrote:
> Le 31/01/2019 à 16:52, jp charras a écrit :
>> Le 31/01/2019 à 16:29, Wayne Stambaugh a écrit :
>>> JP,
>>>
>>> On 1/31/2019 10:11 AM, jp charras wrote:
>>>> Le 31/01/2019 à 15:40, John Beard a écrit :
>>>>> Hi,
>>>>>
>>>>> Two patches for building these libs:
>>>>>
>>>>> 1) Make bitmaps a "Proper" library. By splitting it off like this, the
>>>>> includes for each of the hundreds of XPM cpp files do not need to suck
>>>>> in WX headers. This speeds compilation by something like 10x or more
>>>>> (it now builds in <5 seconds with -j6), with a similar reduction in
>>>>> the size of libbitmaps.a. Also, making it a proper library allows to
>>>>> use the CMake dependency mechanism better.
>>>>> 2) Do the same for the CMake of the polygon libraries, again
>>>>> simplifying all the "downstream" targets - they no longer need to
>>>>> manually specify the linkage to polygon or the include dirs.
>>>>>
>>>>> Apparently, both these libraries were setting off static analysers, as
>>>>> they were a circular dependency. For example, bitmaps required common
>>>>> for the defs, but common required bitmaps for the images. This ended
>>>>> up pushing all the linkage down to the final executables, which is now
>>>>> much simpler (just link common, and you should get what you need, with
>>>>> includes set correctly).
>>>>>
>>>>> Jenkins passes (MSVC and Msys2), but might be worth getting an OSX
>>>>> build as there is a different CMake command in there!
>>>>>
>>>>> Cheers,
>>>>>
>>>>> John
>>>>
>>>> Hi John,
>>>>
>>>> I have this cmake error when trying to build Kicad with these patches:
>>>>
>>>> "CMake Error at pcbnew/CMakeLists.txt:645 (target_link_libraries):
>>>>   Object library target "pcbnew_kiface_objects" may not link to anything."
>>>>
>>>> (cmake version 3.7.2, W7 32bits, msys2)
>>>>
>>>>
>>>
>>> I didn't have any problem creating a 32 bit build using msys2.  It maybe
>>> your CMake version.  I'm using CMake 3.12.4.  I also did a clean build
>>> so that could the issue.  This change works pretty well so I hope it's
>>> not a CMake version issue.  I don't want to bump the CMake version if we
>>> don't have to.
>>>
>>> Cheers,
>>>
>>> Wayne
>>
>> I just tested with a more recent msys2 version (using cmake 3.11) on a
>> clean build, but no success.
>>
> 
> After tests:
> 
> Using cmake 3.12 works.
> But older versions do not work.
> 

Forcing CMake to 3.12 will severely limit the number of platforms that
would be able to build kicad so this patch set doesn't seem likely to be
accepted unless we can figure out a way to accomplish the same task with
older versions of CMake.  Ubuntu Trusty uses CMake 2.8.12 but
trusty-updates is 3.5.1 so I would reluctant to limit cmake to a newer
version that that.


Follow ups

References