summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-04-04 12:10:17 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-08 09:05:56 (GMT)
commitff80c3b4201918c2f30241972d3553a99571eed8 (patch)
tree6f6c6d175a314e0e2ecd6e6a955563852cc865d2
parent7605fee593a00e0345a4842241ff1f2a043b7ebf (diff)
downloadCMake-ff80c3b4201918c2f30241972d3553a99571eed8.zip
CMake-ff80c3b4201918c2f30241972d3553a99571eed8.tar.gz
CMake-ff80c3b4201918c2f30241972d3553a99571eed8.tar.bz2
Features: Add cxx_attributes.
-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_attributes.cpp2
4 files changed, 9 insertions, 0 deletions
diff --git a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
index 7e10853..05fc1bd 100644
--- a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
+++ b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
@@ -27,6 +27,11 @@ The features known to this version of CMake are:
.. _N2341: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf
+``cxx_attributes``
+ Generic attributes, as defined in N2761_.
+
+ .. _N2761: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf
+
``cxx_auto_type``
Automatic type deduction, as defined in N1984_.
diff --git a/Modules/Compiler/GNU-CXX-FeatureTests.cmake b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
index 26b7ff6..be3c27e 100644
--- a/Modules/Compiler/GNU-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
@@ -8,6 +8,7 @@ set(_cmake_feature_test_cxx_reference_qualified_functions
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}")
# TODO: Should be supported by GNU 4.7
set(GNU47_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 2b76d45..63c00cc 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -45,6 +45,7 @@
F(cxx_alias_templates) \
F(cxx_alignas) \
F(cxx_alignof) \
+ F(cxx_attributes) \
F(cxx_auto_type) \
F(cxx_constexpr) \
F(cxx_decltype) \
diff --git a/Tests/CompileFeatures/cxx_attributes.cpp b/Tests/CompileFeatures/cxx_attributes.cpp
new file mode 100644
index 0000000..a3c89ea
--- /dev/null
+++ b/Tests/CompileFeatures/cxx_attributes.cpp
@@ -0,0 +1,2 @@
+
+void unusedFunc [[noreturn]] () { throw 1; }