[cmake-developers] Work on the graphviz support - compatibility ?

Eric Noulard eric.noulard at gmail.com
Sun Feb 6 15:42:15 EST 2011


2011/2/5 Alexander Neundorf <neundorf at kde.org>:
> Hi,
>
> in general we keep cmake as backward compatible as possible, so no builds are
> broken.
>
> In a local branch I have a version of cmake with a small improvement to the
> graphviz support in cmake.
> It turns the variable GRAPHVIZ_IGNORE_TARGETS from a list of strings into a
> list of regular expressions. I.e. everything which was before in
> GRAPHVIZ_IGNORE_TARGETS and excluded from the dot-files, is now still
> excluded, but now there may be more targets excluded (e.g. for "kio" now not
> only "kio" is excluded, but also "kio_ftp" etc.)
> Also, with this change, the variable GRAPHVIZ_TARGET_IGNORE_REGEX is not
> supported anymore, so targets previously excluded from the dot-files via this
> (one) regex are now included.
>
> Both issues can be fixed by, for the first, putting "^...$" around the string,
> and for the second by just putting the regex now into
> GRAPHVIZ_IGNORE_TARGETS .
>
> Strictly speaking, this breaks compatibility regarding the graphviz support.
> But, do we care about this ?
> * it is and was completely undocumented (will write a wiki page soon)
> * the changes don't influence the build itself, so no build can be broken by
> this change
>
> What do you think ?

I think that, I didn't even know the existence of this, so I wouldn't care
about breaking it :-]
Moreover I am basically ok that the breakage of an undocumented feature
is not a real breakage.

Now may be you can:
    1) rename GRAPHVIZ_IGNORE_TARGETS to "CMAKE_GRAPHVIZ_IGNORE_TARGETS"
        which is more consistent with other var names.

    2) check GRAPHVIZ_IGNORE_TARGETS and GRAPHVIZ_TARGET_IGNORE_REGEX
    and issue a WARNING if they are used.

2) may even be unecessary with the new "--warn-unused-vars" option.

the baseline is if you break it, then break it ALL there won't be any confusion.

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org



More information about the cmake-developers mailing list