Compiler blacklist 'shorthand'

Marcus Calhoun-Lopez mcalhoun at macports.org
Sun May 6 02:14:44 UTC 2018


There is some code written to do something like this.

The PortGroup is: https://github.com/macports/macports-ports/blob/master/_resources/port1.0/group/languages-1.0.tcl
The associated ticket is: https://trac.macports.org/ticket/55139

PortGroup languages 1.0
compiler.cxx_standard 2014

I have been intending to make a more concerted effort to get the code tested and eventually merged into the base.
Alas, however, other priorities keep getting in the way.

-Marcus

> On May 5, 2018, at 5:36 PM, Craig Treleaven <ctreleaven at macports.org> wrote:
> 
> Hi:
> 
> A couple of times recently, I’ve noticed boilerplate in ports that require C++14.  After including the compiler_blacklist_versions portgroup, they then do some gymnastics like:
> 
> compiler.blacklist          *gcc-3.* *gcc-4.* {*gcc-5.[0-3]} \
>                            {clang < 800} macports-clang-3.4 macports-clang-3.5 macports-clang-3.6 macports-clang-3.7
> 
> Would it not be easier to use and maintain if we had some shorthand definitions.  Maybe something like:
> 
> compiler.blacklist      ${min_cxx14}
> 
> “min_cxx14” would be defined in the portgroup and then expand to the above...assuming the above actually does a good job of blacklisting compilers that don’t support C++14!
> 
> A major advantage is that if our list of non-C++14 compilers ever changes, it only needs to be updated in one spot.
> 
> I suspect there would be a few other shorthand lists that could be pre-defined.
> 
> Thoughts?
> 
> Craig



More information about the macports-dev mailing list