diff options
author | Brad King <brad.king@kitware.com> | 2014-04-15 14:32:13 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-04-15 14:32:13 (GMT) |
commit | 8472ef243ffc9988ea8fb83cbc7acdf3f0daa239 (patch) | |
tree | 01f9a38f7db6de77c81bd2c7e2bd0cd13ad04e9f /Modules | |
parent | b56a9ae7f14189fd2bce2ca3e9441060ca231638 (diff) | |
parent | 60c0d2dd812af663b2b009a253072dc481b604fe (diff) | |
download | CMake-8472ef243ffc9988ea8fb83cbc7acdf3f0daa239.zip CMake-8472ef243ffc9988ea8fb83cbc7acdf3f0daa239.tar.gz CMake-8472ef243ffc9988ea8fb83cbc7acdf3f0daa239.tar.bz2 |
Merge topic 'cxx11-features'
60c0d2dd Features: Add cxx_defaulted_move_initializers.
c4e67235 Features: Add cxx_long_long_type.
dcaafada Features: Add cxx_func_identifier.
251a1f02 Features: Add cxx_local_type_template_args.
53fe7773 Features: Add cxx_extended_friend_declarations.
16603f7c Features: Add cxx_enum_forward_declarations.
adf22f61 Features: Add cxx_default_function_template_args.
7b3e8a05 Features: Add cxx_right_angle_brackets.
9a49fd21 Features: Add cxx_decltype_incomplete_return_types.
1889045c Features: Add cxx_sizeof_member.
ab455eba Features: Add cxx_thread_local.
300ce248 Features: Add cxx_inline_namespaces.
f9d04a96 Features: Add cxx_variadic_macros.
3d76656f Features: Add cxx_uniform_initialization.
e74b216c Features: Add cxx_generalized_initializers.
ff80c3b4 Features: Add cxx_attributes.
...
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Compiler/GNU-CXX-FeatureTests.cmake | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/Modules/Compiler/GNU-CXX-FeatureTests.cmake b/Modules/Compiler/GNU-CXX-FeatureTests.cmake index b36315f..3f169d2 100644 --- a/Modules/Compiler/GNU-CXX-FeatureTests.cmake +++ b/Modules/Compiler/GNU-CXX-FeatureTests.cmake @@ -2,7 +2,76 @@ # Reference: http://gcc.gnu.org/projects/cxx0x.html set(_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 408") +# Introduced in GCC 4.8.1 +set(GNU481_CXX11 "((__GNUC__ * 100 + __GNUC_MINOR__) > 408 || __GNUC_PATCHLEVEL__ >= 1) && __cplusplus >= 201103L") +set(_cmake_feature_test_cxx_decltype_incomplete_return_types "${GNU481_CXX11}") +set(_cmake_feature_test_cxx_reference_qualified_functions "${GNU481_CXX11}") +set(GNU48_CXX11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L") +set(_cmake_feature_test_cxx_alignas "${GNU48_CXX11}") +set(_cmake_feature_test_cxx_alignof "${GNU48_CXX11}") +set(_cmake_feature_test_cxx_attributes "${GNU48_CXX11}") +set(_cmake_feature_test_cxx_inheriting_constructors "${GNU48_CXX11}") +set(_cmake_feature_test_cxx_thread_local "${GNU48_CXX11}") +# TODO: Should be supported by GNU 4.7 +set(GNU47_CXX11 "${_oldestSupported} && __cplusplus >= 201103L") +set(_cmake_feature_test_cxx_alias_templates "${GNU47_CXX11}") +set(_cmake_feature_test_cxx_delegating_constructors "${GNU47_CXX11}") +set(_cmake_feature_test_cxx_extended_friend_declarations "${GNU47_CXX11}") +set(_cmake_feature_test_cxx_final "${GNU47_CXX11}") +set(_cmake_feature_test_cxx_noexcept "${GNU47_CXX11}") +set(_cmake_feature_test_cxx_nonstatic_member_init "${GNU47_CXX11}") +set(_cmake_feature_test_cxx_override "${GNU47_CXX11}") +set(_cmake_feature_test_cxx_user_literals "${GNU47_CXX11}") +# NOTE: C++11 was ratified in September 2011. GNU 4.7 is the first minor +# release following that (March 2012), and the first minor release to +# support -std=c++11. Prior to that, support for C++11 features is technically +# experiemental and possibly incomplete (see for example the note below about +# cxx_variadic_template_template_parameters) +# TODO: Should be supported by GNU 4.6 +set(GNU46_CXX11 "${_oldestSupported} && __cplusplus >= 201103L") +set(_cmake_feature_test_cxx_constexpr "${GNU46_CXX11}") +set(_cmake_feature_test_cxx_defaulted_move_initializers "${GNU46_CXX11}") +set(_cmake_feature_test_cxx_enum_forward_declarations "${GNU46_CXX11}") +set(_cmake_feature_test_cxx_nullptr "${GNU46_CXX11}") +set(_cmake_feature_test_cxx_range_for "${GNU46_CXX11}") +set(_cmake_feature_test_cxx_unrestricted_unions "${GNU46_CXX11}") +# TODO: Should be supported by GNU 4.5 +set(GNU45_CXX11 "${_oldestSupported} && __cplusplus >= 201103L") +set(_cmake_feature_test_cxx_explicit_conversions "${GNU45_CXX11}") +set(_cmake_feature_test_cxx_lambdas "${GNU45_CXX11}") +set(_cmake_feature_test_cxx_local_type_template_args "${GNU45_CXX11}") +set(_cmake_feature_test_cxx_raw_string_literals "${GNU45_CXX11}") # TODO: Should be supported by GNU 4.4 set(GNU44_CXX11 "${_oldestSupported} && __cplusplus >= 201103L") set(_cmake_feature_test_cxx_auto_type "${GNU44_CXX11}") +set(_cmake_feature_test_cxx_defaulted_functions "${GNU44_CXX11}") +set(_cmake_feature_test_cxx_deleted_functions "${GNU44_CXX11}") +set(_cmake_feature_test_cxx_generalized_initializers "${GNU44_CXX11}") +set(_cmake_feature_test_cxx_inline_namespaces "${GNU44_CXX11}") +set(_cmake_feature_test_cxx_sizeof_member "${GNU44_CXX11}") +set(_cmake_feature_test_cxx_strong_enums "${GNU44_CXX11}") +set(_cmake_feature_test_cxx_trailing_return_types "${GNU44_CXX11}") +set(_cmake_feature_test_cxx_unicode_literals "${GNU44_CXX11}") +set(_cmake_feature_test_cxx_uniform_initialization "${GNU44_CXX11}") +set(_cmake_feature_test_cxx_variadic_templates "${GNU44_CXX11}") +# TODO: If features are ever recorded for GNU 4.3, there should possibly +# be a new feature added like cxx_variadic_template_template_parameters, +# which is implemented by GNU 4.4, but not 4.3. cxx_variadic_templates is +# actually implemented by GNU 4.3, but variadic template template parameters +# 'completes' it, so that is the version we record as having the variadic +# templates capability in CMake. See +# http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf +# TODO: Should be supported by GNU 4.3 +set(GNU43_CXX11 "${_oldestSupported} && __cplusplus >= 201103L") +set(_cmake_feature_test_cxx_decltype "${GNU43_CXX11}") +set(_cmake_feature_test_cxx_default_function_template_args "${GNU43_CXX11}") +set(_cmake_feature_test_cxx_long_long_type "${GNU43_CXX11}") +set(_cmake_feature_test_cxx_right_angle_brackets "${GNU43_CXX11}") +set(_cmake_feature_test_cxx_rvalue_references "${GNU43_CXX11}") +set(_cmake_feature_test_cxx_static_assert "${GNU43_CXX11}") +# TODO: Should be supported since GNU 3.4? +set(_cmake_feature_test_cxx_extern_templates "${_oldestSupported} && __cplusplus >= 201103L") +# TODO: Should be supported forever? +set(_cmake_feature_test_cxx_func_identifier "${_oldestSupported} && __cplusplus >= 201103L") +set(_cmake_feature_test_cxx_variadic_macros "${_oldestSupported} && __cplusplus >= 201103L") set(_oldestSupported) |