← Back to team overview

kicad-developers team mailing list archive

Re: [RFC] [PATCH] simple C++ tests

 


On 9/12/2016 11:04 AM, Tomasz Wlostowski wrote:
> On 08.09.2016 18:49, Wayne Stambaugh wrote:
>>
>> Hey Tom,
>>
>> Here is the patch that fixes the linking as well.  I linked against the
>> static libraries.  That shouldn't be an issue.
>>
> Hi Wayne,
> 
> Thanks for the patch. It looks like the config.h file is generated in
> the build directory, not the source one. I was building in-tree so I
> didn't notice the problem.
> 
> Concerning static linking, I would like to have an option (say,
> KICAD_TESTS_USE_KIFACE_DLLL) to avoid it and link directly to the
> .kiface DLL. This results in way faster linking times and omits
> dependency calculations, which I find very annoying (especially when I
> know I didn't change anything that would result in an incompatible DLL
> binary).

Linking to the dynamic library in the pcbnew/ build path is problematic.
 On linux, you would have to run ldconfig, on windows you would have set
the $PATH environment variable, and I believe osx also has some type of
dynamic library loader that would require configuration otherwise the
tests would fail because the os wont be able to find the dynamic
library.  That's why I statically linked it.  I would think that would
be acceptable for unit testing purposes.

> 
> Cheers,
> Tom
> 


Follow ups

References