Features: Add cxx_static_assert.

This commit is contained in:
Stephen Kelly 2014-04-04 00:00:28 +02:00
parent 91289312fa
commit 88542a6101
4 changed files with 11 additions and 0 deletions

View File

@ -27,6 +27,11 @@ The features known to this version of CMake are:
.. _N1986: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf
``cxx_static_assert``
Static assert, as defined in N1720_.
.. _N1720: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html
``cxx_variadic_templates``
Variadic templates, as defined in N2242_.

View File

@ -24,4 +24,7 @@ set(_cmake_feature_test_cxx_variadic_templates "${GNU44_CXX11}")
# 'completes' it, so that is the version we record as having the variadic
# templates capability in CMake. See
# http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf
# TODO: Should be supported by GNU 4.3
set(GNU43_CXX11 "${_oldestSupported} && __cplusplus >= 201103L")
set(_cmake_feature_test_cxx_static_assert "${GNU43_CXX11}")
set(_oldestSupported)

View File

@ -45,6 +45,7 @@
F(cxx_auto_type) \
F(cxx_constexpr) \
F(cxx_delegating_constructors) \
F(cxx_static_assert) \
F(cxx_variadic_templates)
class cmMakefile::Internals

View File

@ -0,0 +1,2 @@
static_assert(true, "static_assert test");