Rolf Eike Beer wrote:

> Stephen Kelly wrote:
>> Rolf Eike Beer wrote:
>> >> Given that you're gathering the versions of each feature availability
>> >> anyway, and given that boost.config and qcompilerdetection.h have the
>> >> same information, there is no need for all users of the module to run
>> >> all these try_compiles for all projects. Think of the energy waste :)!
>> >> 
>> >> I suggest you use CMAKE_CXX_COMPILER_ID and CMAKE_CXX_COMPILER_VERSION
>> >> to hardcode the features. You could even do so for known compilers,
>> >> and leave the try_compile stuff for not-known compilers if you really
>> >> want to, but I don't think that's worthwhile maintenance.
>> > 
>> > We already found out that this is a bad idea for Apple,
>> 
>> No we didn't :).
>> 
>> The AppleClang vs VanillaClang version issue is something that needs to
>> be solved anyway.
> 
> The "which c++ lib is used" one, too. So you can only score one point,
> either this one or the one below ;)

Not really. The set of language features implemented by the compiler is 
independent of the stdlib implementation and completeness.

> 
>> >> 4)
>> >> 
>> >> The COMPILE_OPTIONS for clang+apple might have to include
>> >> -stdlib=libc++ for binary compatibility reasons if any of the
>> >> dependencies use c++11 std library API in their interface and use
>> >> libc++.
>> >> 
>> >> See what I wrote about that here:
>> >>  http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/5813
>> > 
>> > I don't see how this is different with and without C++11, so how does
>> > it affect this module in a way that would not affect the user anyway?
>> 
>> You might have to investigate, for example, how system c++ libraries are
>> compiled. I'm not familiar enough with APPLE to know what kind of c++
>> libraries it comes with.
> 
> Again, how does that affect this module?

Yes, I see what you mean. I suppose this issue of std library implementation 
is orthogonal to your module. 

However, I think a complete 'CMake support for c++11' concept would include 
diagnostic of transitively incompatible stdlib implementations (because it 
can be a common problem nowadays as both libstdcxx and libcxx are in the 
wild as c++11 library implementations), *and* compiler feature enabling.

I guess you're only shooting for the latter, and not the 'complete package', 
but as I wrote before, I still think you should modernize regarding 
COMPILE_OPTIONS and target properties anyway.

Thanks,

Steve.


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to