summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-04-03 17:23:40 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-08 09:05:55 (GMT)
commit15cdf6f51dde9a394ffc7a398e201e59cc959111 (patch)
tree2329e25164e824e8dd2f517fccd0176418ce826e
parenta579a0aab4e55aeb0a71dc7c1b58db3d126e1fd4 (diff)
downloadCMake-15cdf6f51dde9a394ffc7a398e201e59cc959111.zip
CMake-15cdf6f51dde9a394ffc7a398e201e59cc959111.tar.gz
CMake-15cdf6f51dde9a394ffc7a398e201e59cc959111.tar.bz2
Features: Add cxx_lambdas.
-rw-r--r--Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst5
-rw-r--r--Modules/Compiler/GNU-CXX-FeatureTests.cmake1
-rw-r--r--Source/cmMakefile.cxx1
-rw-r--r--Tests/CompileFeatures/cxx_lambdas.cpp5
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 41820e0..9441e57 100644
--- a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
+++ b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
@@ -57,6 +57,11 @@ The features known to this version of CMake are:
.. _N2540: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm
+``cxx_lambdas``
+ Lambda functions, as defined in N2927_.
+
+ .. _N2927: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2927.pdf
+
``cxx_override``
Override control ``override`` keyword, as defined in N2928_.
diff --git a/Modules/Compiler/GNU-CXX-FeatureTests.cmake b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
index 6844e28..f182cea 100644
--- a/Modules/Compiler/GNU-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
@@ -20,6 +20,7 @@ set(_cmake_feature_test_cxx_constexpr "${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}")
# TODO: Should be supported by GNU 4.4
set(GNU44_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
set(_cmake_feature_test_cxx_auto_type "${GNU44_CXX11}")
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 25a6fee..9352ca5 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -51,6 +51,7 @@
F(cxx_explicit_conversions) \
F(cxx_final) \
F(cxx_inheriting_constructors) \
+ F(cxx_lambdas) \
F(cxx_override) \
F(cxx_static_assert) \
F(cxx_strong_enums) \
diff --git a/Tests/CompileFeatures/cxx_lambdas.cpp b/Tests/CompileFeatures/cxx_lambdas.cpp
new file mode 100644
index 0000000..eecaa23
--- /dev/null
+++ b/Tests/CompileFeatures/cxx_lambdas.cpp
@@ -0,0 +1,5 @@
+
+void someFunc()
+{
+ [](){}();
+}