summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-04-03 17:29:17 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-08 09:05:55 (GMT)
commitbd2a025eb0ec26dc32d6eb4c9c3da22f68608b27 (patch)
treec374f465b26bd93f7e1de1801eb959b476bf0586
parent15cdf6f51dde9a394ffc7a398e201e59cc959111 (diff)
downloadCMake-bd2a025eb0ec26dc32d6eb4c9c3da22f68608b27.zip
CMake-bd2a025eb0ec26dc32d6eb4c9c3da22f68608b27.tar.gz
CMake-bd2a025eb0ec26dc32d6eb4c9c3da22f68608b27.tar.bz2
Features: Add cxx_nonstatic_member_init.
-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_nonstatic_member_init.cpp4
4 files changed, 11 insertions, 0 deletions
diff --git a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
index 9441e57..373b67f 100644
--- a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
+++ b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
@@ -62,6 +62,11 @@ The features known to this version of CMake are:
.. _N2927: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2927.pdf
+``cxx_nonstatic_member_init``
+ Non-static data member initialization, as defined in N2756.
+
+ .. _N2756: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2756.htm
+
``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 f182cea..b291524 100644
--- a/Modules/Compiler/GNU-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
@@ -8,6 +8,7 @@ set(_cmake_feature_test_cxx_inheriting_constructors "${GNU48_CXX11}")
set(GNU47_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
set(_cmake_feature_test_cxx_delegating_constructors "${GNU47_CXX11}")
set(_cmake_feature_test_cxx_final "${GNU47_CXX11}")
+set(_cmake_feature_test_cxx_nonstatic_member_init "${GNU47_CXX11}")
set(_cmake_feature_test_cxx_override "${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
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 9352ca5..2a55fde 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -52,6 +52,7 @@
F(cxx_final) \
F(cxx_inheriting_constructors) \
F(cxx_lambdas) \
+ F(cxx_nonstatic_member_init) \
F(cxx_override) \
F(cxx_static_assert) \
F(cxx_strong_enums) \
diff --git a/Tests/CompileFeatures/cxx_nonstatic_member_init.cpp b/Tests/CompileFeatures/cxx_nonstatic_member_init.cpp
new file mode 100644
index 0000000..6b7fa70
--- /dev/null
+++ b/Tests/CompileFeatures/cxx_nonstatic_member_init.cpp
@@ -0,0 +1,4 @@
+class A
+{
+ int m_i = 42;
+};