diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2019-11-04 16:51:40 (GMT) |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2019-11-04 22:16:57 (GMT) |
commit | 53cd86ea7846b55b7cb21886ea77482e626bbeb4 (patch) | |
tree | 0b5683102807dc02a647733f3f4a9cb220d98050 /Help/manual/cmake-compile-features.7.rst | |
parent | c1d5d5eb11e0260ffadda0851ac844ab46b6b179 (diff) | |
download | CMake-53cd86ea7846b55b7cb21886ea77482e626bbeb4.zip CMake-53cd86ea7846b55b7cb21886ea77482e626bbeb4.tar.gz CMake-53cd86ea7846b55b7cb21886ea77482e626bbeb4.tar.bz2 |
Help: Clarify what 'aware' means as it relates to C++ standards
Diffstat (limited to 'Help/manual/cmake-compile-features.7.rst')
-rw-r--r-- | Help/manual/cmake-compile-features.7.rst | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Help/manual/cmake-compile-features.7.rst b/Help/manual/cmake-compile-features.7.rst index 658694a..52f5652 100644 --- a/Help/manual/cmake-compile-features.7.rst +++ b/Help/manual/cmake-compile-features.7.rst @@ -90,21 +90,21 @@ Requiring Language Standards In projects that use a large number of commonly available features from a particular language standard (e.g. C++ 11) one may specify a meta-feature (e.g. ``cxx_std_11``) that requires use of a compiler mode -aware of that standard. This is simpler than specifying all the -features individually, but does not guarantee the existence of any -particular feature. Diagnosis of use of unsupported features will be -delayed until compile time. +that is at minimum aware of that standard, but could be greater. +This is simpler than specifying all the features individually, but does +not guarantee the existence of any particular feature. +Diagnosis of use of unsupported features will be delayed until compile time. For example, if C++ 11 features are used extensively in a project's -header files, then clients must use a compiler mode aware of C++ 11 -or above. This can be requested with the code: +header files, then clients must use a compiler mode that is no less +than C++ 11. This can be requested with the code: .. code-block:: cmake target_compile_features(mylib PUBLIC cxx_std_11) In this example, CMake will ensure the compiler is invoked in a mode -that is aware of C++ 11 (or above), adding flags such as +of at-least C++ 11 (or C++ 14, C++ 17, ...), adding flags such as ``-std=gnu++11`` if necessary. This applies to sources within ``mylib`` as well as any dependents (that may include headers from ``mylib``). |