← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Run time advanced options


Whoops: the 16kB 0001 patch should not be there, that's a very old draft!


On Thu, Dec 13, 2018 at 12:57 PM John Beard <john.j.beard@xxxxxxxxx> wrote:
> Hi,
> This is a patch for run time options, which are a more flexible alternative to compiler flags. Advantages include:
> * you can change the config without rebuilding
> * it's sensitive to XDG_CONFIG_DIR, so you can quickly flip back and forth
> * there's better documention for the config (it's in doxygen all in one place) and theres a trace to show it
> * better type safety if the config has a value
> * better compiler coverage, so less opportunity to break a different build which uses a different preprocessor block and better static analysis coverage
> These configs are not intended for general use by users so they are in their own file. You don't need this file, if you don't have it, you get defaults.
> The second patch uses the framework to add a config for the SVG import. The disablement is recast so it happens in a single place, and the same system could be used in future for other experimental importers. The reason it's done as a blacklist is so that a unit test could be written that *doesn't* disable the SVG plugin. However, nothing in Pcbnew can be unit tested yet, as I haven't worked out how to link Pcbnew code as a unit test.
> The third patch does another one for disabling legacy canvas on GTK3. Again, this is done at run-time to avoid conditionally compiling code.
> Cheers,
> John

Follow ups