[cmake-developers] [Review request] TopicFind GTK2_sigc++_c++11
Daniele E. Domenichelli
ddomenichelli at drdanz.it
Tue Oct 6 12:20:30 EDT 2015
Thanks Brad for the review.
I updated the topic according to your comments. The new commit is this:
FindGTK2: Enable c++11 for sigc++ 2.5.1 or later
https://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=33eb8fa
On 06/10/2015 17:05, Brad King wrote:
>> + set_property(TARGET GTK2::sigc++ PROPERTY INTERFACE_COMPILE_FEATURES cxx_alias_templates cxx_lambdas)
>
> Nice. Please add a comment to explain that these are the features
> needed by clients in order to include the project headers.
I examined the headers a bit more and found out that c++11 is used a lot
more than I was expecting:
* cxx_lambdas is _not_ required (the lambda that I noticed was actually
in a comment).
* at least these features are required:
- cxx_alias_templates
- cxx_auto_type
- cxx_decltype
- cxx_deleted_functions
- cxx_noexcept
- cxx_nullptr
- cxx_right_angle_brackets
- cxx_rvalue_references
- cxx_variadic_templates
* The <type_traits> header is required, but I don't think that there is
a feature for that. Also checking if the header exists it is not
good, because (at least for gcc) it does exist, but including it with
c++11 disabled will cause an #error. Is there a way for c++11 headers?
* std::move is used in the headers, but I'm not sure if there is a
feature for that.
I updated the set_property command accordingly, but I'm not 100% sure
that there aren't other c++11 features used, because I just had a quick
look at the headers.
Cheers,
Daniele
More information about the cmake-developers
mailing list