diff options
author | Brad King <brad.king@kitware.com> | 2014-05-06 17:48:42 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-05-06 17:48:42 (GMT) |
commit | 8e767a27d29a1ca4d456e6484893a51347f0d484 (patch) | |
tree | 860841861e9b63d8c02f70600d9e7bb601e05707 /Source | |
parent | 58557486db5343f7d63f709177be980ad8ced590 (diff) | |
parent | 3fdfa5d3fc1170f1cc69636765502ca14b1821ef (diff) | |
download | CMake-8e767a27d29a1ca4d456e6484893a51347f0d484.zip CMake-8e767a27d29a1ca4d456e6484893a51347f0d484.tar.gz CMake-8e767a27d29a1ca4d456e6484893a51347f0d484.tar.bz2 |
Merge topic 'CMAKE_CXX_KNOWN_FEATURES-global-property'
3fdfa5d3 Features: Make CMAKE_CXX_KNOWN_FEATURES a property.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 54 | ||||
-rw-r--r-- | Source/cmake.cxx | 6 | ||||
-rw-r--r-- | Source/cmake.h | 48 |
3 files changed, 54 insertions, 54 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index e758720..9ad637a 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -41,54 +41,6 @@ #include <ctype.h> // for isspace #include <assert.h> -#define FOR_EACH_CXX_FEATURE(F) \ - F(cxx_alias_templates) \ - F(cxx_alignas) \ - F(cxx_alignof) \ - F(cxx_attributes) \ - F(cxx_auto_type) \ - F(cxx_constexpr) \ - F(cxx_decltype) \ - F(cxx_decltype_incomplete_return_types) \ - F(cxx_default_function_template_args) \ - F(cxx_defaulted_functions) \ - F(cxx_defaulted_move_initializers) \ - F(cxx_delegating_constructors) \ - F(cxx_deleted_functions) \ - F(cxx_enum_forward_declarations) \ - F(cxx_explicit_conversions) \ - F(cxx_extended_friend_declarations) \ - F(cxx_extern_templates) \ - F(cxx_final) \ - F(cxx_func_identifier) \ - F(cxx_generalized_initializers) \ - F(cxx_inheriting_constructors) \ - F(cxx_inline_namespaces) \ - F(cxx_lambdas) \ - F(cxx_local_type_template_args) \ - F(cxx_long_long_type) \ - F(cxx_noexcept) \ - F(cxx_nonstatic_member_init) \ - F(cxx_nullptr) \ - F(cxx_override) \ - F(cxx_range_for) \ - F(cxx_raw_string_literals) \ - F(cxx_reference_qualified_functions) \ - F(cxx_right_angle_brackets) \ - F(cxx_rvalue_references) \ - F(cxx_sizeof_member) \ - F(cxx_static_assert) \ - F(cxx_strong_enums) \ - F(cxx_template_template_parameters) \ - F(cxx_thread_local) \ - F(cxx_trailing_return_types) \ - F(cxx_unicode_literals) \ - F(cxx_uniform_initialization) \ - F(cxx_unrestricted_unions) \ - F(cxx_user_literals) \ - F(cxx_variadic_macros) \ - F(cxx_variadic_templates) - class cmMakefile::Internals { public: @@ -2499,12 +2451,6 @@ const char* cmMakefile::GetDefinition(const std::string& name) const { this->Internal->VarUsageStack.top().insert(name); } - if (name == "CMAKE_CXX_KNOWN_FEATURES") - { -#define STRING_LIST_ELEMENT(F) ";" #F - return FOR_EACH_CXX_FEATURE(STRING_LIST_ELEMENT) + 1; -#undef STRING_LIST_ELEMENT - } const char* def = this->Internal->VarStack.top().Get(name); if(!def) { diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 7aada4b..3e78990 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2273,6 +2273,12 @@ const char *cmake::GetProperty(const std::string& prop, } this->SetProperty("ENABLED_LANGUAGES", lang.c_str()); } + if (prop == "CMAKE_CXX_KNOWN_FEATURES") + { +#define STRING_LIST_ELEMENT(F) ";" #F + return FOR_EACH_CXX_FEATURE(STRING_LIST_ELEMENT) + 1; +#undef STRING_LIST_ELEMENT + } return this->Properties.GetPropertyValue(prop, scope, chain); } diff --git a/Source/cmake.h b/Source/cmake.h index 76a3179..33b4f74 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -458,4 +458,52 @@ private: {"-Wno-dev", "Suppress developer warnings."},\ {"-Wdev", "Enable developer warnings."} +#define FOR_EACH_CXX_FEATURE(F) \ + F(cxx_alias_templates) \ + F(cxx_alignas) \ + F(cxx_alignof) \ + F(cxx_attributes) \ + F(cxx_auto_type) \ + F(cxx_constexpr) \ + F(cxx_decltype) \ + F(cxx_decltype_incomplete_return_types) \ + F(cxx_default_function_template_args) \ + F(cxx_defaulted_functions) \ + F(cxx_defaulted_move_initializers) \ + F(cxx_delegating_constructors) \ + F(cxx_deleted_functions) \ + F(cxx_enum_forward_declarations) \ + F(cxx_explicit_conversions) \ + F(cxx_extended_friend_declarations) \ + F(cxx_extern_templates) \ + F(cxx_final) \ + F(cxx_func_identifier) \ + F(cxx_generalized_initializers) \ + F(cxx_inheriting_constructors) \ + F(cxx_inline_namespaces) \ + F(cxx_lambdas) \ + F(cxx_local_type_template_args) \ + F(cxx_long_long_type) \ + F(cxx_noexcept) \ + F(cxx_nonstatic_member_init) \ + F(cxx_nullptr) \ + F(cxx_override) \ + F(cxx_range_for) \ + F(cxx_raw_string_literals) \ + F(cxx_reference_qualified_functions) \ + F(cxx_right_angle_brackets) \ + F(cxx_rvalue_references) \ + F(cxx_sizeof_member) \ + F(cxx_static_assert) \ + F(cxx_strong_enums) \ + F(cxx_template_template_parameters) \ + F(cxx_thread_local) \ + F(cxx_trailing_return_types) \ + F(cxx_unicode_literals) \ + F(cxx_uniform_initialization) \ + F(cxx_unrestricted_unions) \ + F(cxx_user_literals) \ + F(cxx_variadic_macros) \ + F(cxx_variadic_templates) + #endif |