diff options
author | Brad King <brad.king@kitware.com> | 2016-10-26 20:11:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-11-02 14:00:28 (GMT) |
commit | b0996a3fa223370edcdb40a1d8b66d1a3a734daf (patch) | |
tree | 9b08869843c60df30b4fec54ae9b2224c4643f5b /Source/cmake.h | |
parent | 8b6cc2518a8019314af43a32702a09bff318b777 (diff) | |
download | CMake-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 'Source/cmake.h')
-rw-r--r-- | Source/cmake.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmake.h b/Source/cmake.h index cd00c61..6e8d9c8 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -535,12 +535,18 @@ private: } #define FOR_EACH_C_FEATURE(F) \ + F(c_std_90) \ + F(c_std_99) \ + F(c_std_11) \ F(c_function_prototypes) \ F(c_restrict) \ F(c_static_assert) \ F(c_variadic_macros) #define FOR_EACH_CXX_FEATURE(F) \ + F(cxx_std_98) \ + F(cxx_std_11) \ + F(cxx_std_14) \ F(cxx_aggregate_default_initializers) \ F(cxx_alias_templates) \ F(cxx_alignas) \ |