summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-10-17 09:47:29 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-07 14:48:44 (GMT)
commitfaeddf64f21b592a5663803ca8accdf9f4b73c29 (patch)
tree532605f328c1297d89a84999c1fe93a25378cfde /Help
parent913394af249d6b1892a6e609d2abfed001fa1dc4 (diff)
downloadCMake-faeddf64f21b592a5663803ca8accdf9f4b73c29.zip
CMake-faeddf64f21b592a5663803ca8accdf9f4b73c29.tar.gz
CMake-faeddf64f21b592a5663803ca8accdf9f4b73c29.tar.bz2
project: Add infrastructure for recording CXX compiler features
Add a feature test using the compiler macros and the preprocessor to determine available features. Add a CMAKE_CXX_COMPILE_FEATURES variable which contains all features known to the loaded compiler, and a CMAKE_CXX_KNOWN_FEATURES variable containing all features known to CMake. Add language standard specific variables for internal use to determine the standard-specific compile flags to use. This will be extended to other languages in the future. Follow-up commits will add features which will be recorded by the feature test.
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake-variables.7.rst2
-rw-r--r--Help/variable/CMAKE_CXX_COMPILE_FEATURES.rst8
-rw-r--r--Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst8
3 files changed, 18 insertions, 0 deletions
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 62a7cce..dfdd09b 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -257,6 +257,8 @@ Variables for Languages
:maxdepth: 1
/variable/CMAKE_COMPILER_IS_GNULANG
+ /variable/CMAKE_CXX_COMPILE_FEATURES
+ /variable/CMAKE_CXX_KNOWN_FEATURES
/variable/CMAKE_CXX_STANDARD
/variable/CMAKE_CXX_EXTENSIONS
/variable/CMAKE_Fortran_MODDIR_DEFAULT
diff --git a/Help/variable/CMAKE_CXX_COMPILE_FEATURES.rst b/Help/variable/CMAKE_CXX_COMPILE_FEATURES.rst
new file mode 100644
index 0000000..6be0124
--- /dev/null
+++ b/Help/variable/CMAKE_CXX_COMPILE_FEATURES.rst
@@ -0,0 +1,8 @@
+CMAKE_CXX_COMPILE_FEATURES
+--------------------------
+
+List of features known to the C++ compiler
+
+These features are known to be available for use with the C++ compiler. This
+list is a subset of the features listed in the :variable:`CMAKE_CXX_KNOWN_FEATURES`
+variable.
diff --git a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
new file mode 100644
index 0000000..7466d44
--- /dev/null
+++ b/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
@@ -0,0 +1,8 @@
+CMAKE_CXX_KNOWN_FEATURES
+------------------------
+
+List of C++ features known to this version of CMake.
+
+The features listed in this variable may be known to be available to the
+C++ compiler. If the feature is available with the C++ compiler, it will
+be listed in the :variable:`CMAKE_CXX_COMPILE_FEATURES` variable.