summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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_enum_forward_declarations.cpp8
4 files changed, 15 insertions, 0 deletions
diff --git a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
index 1f9cbbd..5ac646c 100644
--- a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
+++ b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
@@ -72,6 +72,11 @@ The features known to this version of CMake are:
.. _N2346: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm
+``cxx_enum_forward_declarations``
+ Enum forward declarations, as defined in N2764_.
+
+ .. _N2764: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2764.pdf
+
``cxx_explicit_conversions``
Explicit conversion operators, as defined in N2437_.
diff --git a/Modules/Compiler/GNU-CXX-FeatureTests.cmake b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
index 94a31c8..d1bd4a0 100644
--- a/Modules/Compiler/GNU-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
@@ -29,6 +29,7 @@ set(_cmake_feature_test_cxx_user_literals "${GNU47_CXX11}")
# 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_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}")
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 577aa37..7c5ec81 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -54,6 +54,7 @@
F(cxx_defaulted_functions) \
F(cxx_delegating_constructors) \
F(cxx_deleted_functions) \
+ F(cxx_enum_forward_declarations) \
F(cxx_explicit_conversions) \
F(cxx_extern_templates) \
F(cxx_final) \
diff --git a/Tests/CompileFeatures/cxx_enum_forward_declarations.cpp b/Tests/CompileFeatures/cxx_enum_forward_declarations.cpp
new file mode 100644
index 0000000..a7e1445
--- /dev/null
+++ b/Tests/CompileFeatures/cxx_enum_forward_declarations.cpp
@@ -0,0 +1,8 @@
+
+enum SomeEnum : short;
+
+void someFunc()
+{
+ SomeEnum value;
+ int i = value;
+}