Compiler blacklist 'shorthand'

Craig Treleaven ctreleaven at macports.org
Sun May 6 00:36:54 UTC 2018


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