diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-04-03 22:02:14 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-04-08 09:05:54 (GMT) |
commit | 0caf08e43ef405a879393cb3a4bae0b6b87e26b6 (patch) | |
tree | 97613dadc9dff6bb8bd1f0c4e1a856730bdbd2e1 | |
parent | 0685ac6edc8f9285e7b12d32a182e569a372856c (diff) | |
download | CMake-0caf08e43ef405a879393cb3a4bae0b6b87e26b6.zip CMake-0caf08e43ef405a879393cb3a4bae0b6b87e26b6.tar.gz CMake-0caf08e43ef405a879393cb3a4bae0b6b87e26b6.tar.bz2 |
Features: Add cxx_auto_function.
-rw-r--r-- | Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst | 5 | ||||
-rw-r--r-- | Modules/Compiler/GNU-CXX-FeatureTests.cmake | 1 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 1 | ||||
-rw-r--r-- | Tests/CompileFeatures/cxx_trailing_return_types.cpp | 5 |
4 files changed, 12 insertions, 0 deletions
diff --git a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst index 073b0ca..0d1329c 100644 --- a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst +++ b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst @@ -42,6 +42,11 @@ The features known to this version of CMake are: .. _N1720: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html +``cxx_trailing_return_types`` + Automatic function return type, as defined in N2541_. + + .. _N2541: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm + ``cxx_variadic_templates`` Variadic templates, as defined in N2242_. diff --git a/Modules/Compiler/GNU-CXX-FeatureTests.cmake b/Modules/Compiler/GNU-CXX-FeatureTests.cmake index 87ed765..3549824 100644 --- a/Modules/Compiler/GNU-CXX-FeatureTests.cmake +++ b/Modules/Compiler/GNU-CXX-FeatureTests.cmake @@ -18,6 +18,7 @@ set(_cmake_feature_test_cxx_constexpr "${GNU46_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_trailing_return_types "${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, diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 8e4ba95..3c23045 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -48,6 +48,7 @@ F(cxx_final) \ F(cxx_override) \ F(cxx_static_assert) \ + F(cxx_trailing_return_types) \ F(cxx_variadic_templates) class cmMakefile::Internals diff --git a/Tests/CompileFeatures/cxx_trailing_return_types.cpp b/Tests/CompileFeatures/cxx_trailing_return_types.cpp new file mode 100644 index 0000000..01a76cb --- /dev/null +++ b/Tests/CompileFeatures/cxx_trailing_return_types.cpp @@ -0,0 +1,5 @@ + +auto someFunc() -> int +{ + return 42; +} |