Dnia 2014-02-26, o godz. 12:56:30
Georg Rudoy <0xd34df...@gmail.com> napisał(a):

> 2014-02-26 12:52 GMT+04:00 Michał Górny <mgo...@gentoo.org>:
> > Dnia 2014-02-26, o godz. 12:26:06
> > Georg Rudoy <0xd34df...@gmail.com> napisał(a):
> >
> >> I'm currently considering using C++14 in my project, particularly
> >> features that aren't supported by gcc 4.8 and are barely supported by
> >> 4.9 [1], but the standard is already fully supported by clang 3.4 [2].
> >> Thus I wonder how bad is actually depending on recent clang in
> >> ebuilds?
> >
> > Well, you should note that DEPENDing on sys-devel/clang is currently
> > implemented as USE=clang in sys-devel/llvm (please don't depend on that
> > directly, we will split it back ASAP). So if someone doesn't have clang
> > enabled, he'd hit portage telling him to enable the flag.
> 
> And what about setting CMAKE_CXX_COMPILER in src_configure() (or where
> it should be overriden)? I don't think it's a good idea to forcefully
> set the compiler binary in CMakeLists.txt itself, is it better done in
> ebuild?

I don't know CMake well but I think it's enough to set CXX before
calling cmake-utils_src_configure(). You gotta know the details better.
And yes, it's better done in ebuild, it will also make it easier to
support new enough gcc.

You may add some checks for necessary features in CMake though,
and fail explicitly when the compiler doesn't provide them.

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: PGP signature

Reply via email to