Re: How to build-depend on a C++11-capable compiler?
On Mon, Jul 21, 2014, at 12:48, Thibaut Paumard wrote:
> The new release of my package Gyoto should be built preferably with a
> C++11-capable compiler. It can be built with a reduced feature-set
> without, though.
> Is there a clever way to ensure that the default compiler is
> C++11-capable, if available in the archive, or should I simply
> Build-Depend on g++ (>=4:4.7)? (The goal behind this question is to make
> life easier for backporters and persons trying alternate toolchains).
Stable has g++-4.7 as default on amd64, i386, kfreebsd-amd64,
so I would say - make a note to README.source and leave that
clang and default gcc in jessie+ is C++11, so I would suggest to not
If you really insist you would have to:
- depend on g++-4.7 | g++ (>= 4:4.7)
- detect default CC in d/rules and pass correct CXX=g++-4.7
And that would only lead to non-deterministic builds confusing people
mangle CC/CXX (for good reasons).
I would suggest modifying configure check that would fail to compile if
the compiler is not C++11 instead of compiling with reduced feature set.
Ondřej Surý <firstname.lastname@example.org>
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server