summaryrefslogtreecommitdiffstats
path: root/Help/prop_gbl
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-26 20:11:01 (GMT)
committerBrad King <brad.king@kitware.com>2016-11-02 14:00:28 (GMT)
commitb0996a3fa223370edcdb40a1d8b66d1a3a734daf (patch)
tree9b08869843c60df30b4fec54ae9b2224c4643f5b /Help/prop_gbl
parent8b6cc2518a8019314af43a32702a09bff318b777 (diff)
downloadCMake-b0996a3fa223370edcdb40a1d8b66d1a3a734daf.zip
CMake-b0996a3fa223370edcdb40a1d8b66d1a3a734daf.tar.gz
CMake-b0996a3fa223370edcdb40a1d8b66d1a3a734daf.tar.bz2
Features: Add meta-features requesting awareness of a particular standard
A common use case of `target_compile_features` is simply to specify that the compiler should be run in a mode that is aware of e.g. C++11. Some projects simply specify a particular C++11-only feature to request this. Provide a first-class way to do this by naming features after the corresponding language standard. Record them as always available in the corresponding standard level so that requesting them always ensures that standard (or higher) is used.
Diffstat (limited to 'Help/prop_gbl')
-rw-r--r--Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst9
-rw-r--r--Help/prop_gbl/CMAKE_C_KNOWN_FEATURES.rst9
2 files changed, 18 insertions, 0 deletions
diff --git a/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst b/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst
index e8f4d2a..00a5104 100644
--- a/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst
+++ b/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst
@@ -14,6 +14,15 @@ compile features and a list of supported compilers.
The features known to this version of CMake are:
+``cxx_std_98``
+ Compiler mode is aware of C++ 98.
+
+``cxx_std_11``
+ Compiler mode is aware of C++ 11.
+
+``cxx_std_14``
+ Compiler mode is aware of C++ 14.
+
``cxx_aggregate_default_initializers``
Aggregate default initializers, as defined in N3605_.
diff --git a/Help/prop_gbl/CMAKE_C_KNOWN_FEATURES.rst b/Help/prop_gbl/CMAKE_C_KNOWN_FEATURES.rst
index a08af00..3707fef 100644
--- a/Help/prop_gbl/CMAKE_C_KNOWN_FEATURES.rst
+++ b/Help/prop_gbl/CMAKE_C_KNOWN_FEATURES.rst
@@ -13,6 +13,15 @@ compile features and a list of supported compilers.
The features known to this version of CMake are:
+``c_std_90``
+ Compiler mode is aware of C 90.
+
+``c_std_99``
+ Compiler mode is aware of C 99.
+
+``c_std_11``
+ Compiler mode is aware of C 11.
+
``c_function_prototypes``
Function prototypes, as defined in ``ISO/IEC 9899:1990``.