This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, master has been updated via e09c606eb47c13bd435892625943e95bb9452996 (commit) via 85415afbdc65baa5dbe86a61008a3a3373e74e09 (commit) via 616282a5ce05d29ddad12c43e64e0764d91e817b (commit) from 1e9cb46c8a9c78261d22ad40af5aff1635b919cf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e09c606eb47c13bd435892625943e95bb9452996 commit e09c606eb47c13bd435892625943e95bb9452996 Merge: 1e9cb46 85415af Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Mar 21 14:02:59 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Thu Mar 21 10:03:10 2019 -0400 Merge topic 'dont_do_compiler_feature_checks_for_version_with_no_features' 85415afbdc CompileFeatures: Don't try_compile for language levels with no features 616282a5ce CMake: Provide language level compile features lists Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3128 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=85415afbdc65baa5dbe86a61008a3a3373e74e09 commit 85415afbdc65baa5dbe86a61008a3a3373e74e09 Author: Robert Maynard <robert.mayn...@kitware.com> AuthorDate: Wed Mar 6 12:24:48 2019 -0500 Commit: Robert Maynard <robert.mayn...@kitware.com> CommitDate: Wed Mar 20 09:10:10 2019 -0700 CompileFeatures: Don't try_compile for language levels with no features Previously Compilers always had to run a try_compile to determine what language level each feature mapped to. Now we can skip the try_compile when a language level has no features. diff --git a/Modules/Internal/FeatureTesting.cmake b/Modules/Internal/FeatureTesting.cmake index de336e7..b9c20ec 100644 --- a/Modules/Internal/FeatureTesting.cmake +++ b/Modules/Internal/FeatureTesting.cmake @@ -71,10 +71,20 @@ endmacro() macro(_record_compiler_features_c std) list(APPEND CMAKE_C${std}_COMPILE_FEATURES c_std_${std}) - _record_compiler_features(C "${CMAKE_C${std}_STANDARD_COMPILE_OPTION}" CMAKE_C${std}_COMPILE_FEATURES) + + get_property(lang_level_has_features GLOBAL PROPERTY CMAKE_C${std}_KNOWN_FEATURES) + if(lang_level_has_features) + _record_compiler_features(C "${CMAKE_C${std}_STANDARD_COMPILE_OPTION}" CMAKE_C${std}_COMPILE_FEATURES) + endif() + unset(lang_level_has_features) endmacro() macro(_record_compiler_features_cxx std) list(APPEND CMAKE_CXX${std}_COMPILE_FEATURES cxx_std_${std}) - _record_compiler_features(CXX "${CMAKE_CXX${std}_STANDARD_COMPILE_OPTION}" CMAKE_CXX${std}_COMPILE_FEATURES) + + get_property(lang_level_has_features GLOBAL PROPERTY CMAKE_CXX${std}_KNOWN_FEATURES) + if(lang_level_has_features) + _record_compiler_features(CXX "${CMAKE_CXX${std}_STANDARD_COMPILE_OPTION}" CMAKE_CXX${std}_COMPILE_FEATURES) + endif() + unset(lang_level_has_features) endmacro() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=616282a5ce05d29ddad12c43e64e0764d91e817b commit 616282a5ce05d29ddad12c43e64e0764d91e817b Author: Robert Maynard <robert.mayn...@kitware.com> AuthorDate: Fri Mar 1 17:12:35 2019 -0500 Commit: Robert Maynard <robert.mayn...@kitware.com> CommitDate: Wed Mar 20 09:10:07 2019 -0700 CMake: Provide language level compile features lists Now CMake stores what compile features are associated with each language level and exposes them as global properties. diff --git a/Source/cmState.cxx b/Source/cmState.cxx index a08e9b8..fa7df0b 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -556,9 +556,28 @@ const char* cmState::GetGlobalProperty(const std::string& prop) if (prop == "CMAKE_C_KNOWN_FEATURES") { return &FOR_EACH_C_FEATURE(STRING_LIST_ELEMENT)[1]; } + if (prop == "CMAKE_C90_KNOWN_FEATURES") { + return &FOR_EACH_C90_FEATURE(STRING_LIST_ELEMENT)[1]; + } + if (prop == "CMAKE_C99_KNOWN_FEATURES") { + return &FOR_EACH_C99_FEATURE(STRING_LIST_ELEMENT)[1]; + } + if (prop == "CMAKE_C11_KNOWN_FEATURES") { + return &FOR_EACH_C11_FEATURE(STRING_LIST_ELEMENT)[1]; + } if (prop == "CMAKE_CXX_KNOWN_FEATURES") { return &FOR_EACH_CXX_FEATURE(STRING_LIST_ELEMENT)[1]; } + if (prop == "CMAKE_CXX98_KNOWN_FEATURES") { + return &FOR_EACH_CXX98_FEATURE(STRING_LIST_ELEMENT)[1]; + } + if (prop == "CMAKE_CXX11_KNOWN_FEATURES") { + return &FOR_EACH_CXX11_FEATURE(STRING_LIST_ELEMENT)[1]; + } + if (prop == "CMAKE_CXX14_KNOWN_FEATURES") { + return &FOR_EACH_CXX14_FEATURE(STRING_LIST_ELEMENT)[1]; + } + #undef STRING_LIST_ELEMENT return this->GlobalProperties.GetPropertyValue(prop); } diff --git a/Source/cmake.h b/Source/cmake.h index 1ffeabc..778b8a6 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -562,40 +562,38 @@ private: "not errors." \ } +#define FOR_EACH_C90_FEATURE(F) F(c_function_prototypes) + +#define FOR_EACH_C99_FEATURE(F) \ + F(c_restrict) \ + F(c_variadic_macros) + +#define FOR_EACH_C11_FEATURE(F) F(c_static_assert) + #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) + FOR_EACH_C90_FEATURE(F) \ + FOR_EACH_C99_FEATURE(F) \ + FOR_EACH_C11_FEATURE(F) -#define FOR_EACH_CXX_FEATURE(F) \ - F(cxx_std_98) \ - F(cxx_std_11) \ - F(cxx_std_14) \ - F(cxx_std_17) \ - F(cxx_std_20) \ - F(cxx_aggregate_default_initializers) \ +#define FOR_EACH_CXX98_FEATURE(F) F(cxx_template_template_parameters) + +#define FOR_EACH_CXX11_FEATURE(F) \ F(cxx_alias_templates) \ F(cxx_alignas) \ F(cxx_alignof) \ F(cxx_attributes) \ - F(cxx_attribute_deprecated) \ F(cxx_auto_type) \ - F(cxx_binary_literals) \ F(cxx_constexpr) \ - F(cxx_contextual_conversions) \ F(cxx_decltype) \ - F(cxx_decltype_auto) \ 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_digit_separators) \ F(cxx_enum_forward_declarations) \ F(cxx_explicit_conversions) \ F(cxx_extended_friend_declarations) \ @@ -603,11 +601,9 @@ private: F(cxx_final) \ F(cxx_func_identifier) \ F(cxx_generalized_initializers) \ - F(cxx_generic_lambdas) \ F(cxx_inheriting_constructors) \ F(cxx_inline_namespaces) \ F(cxx_lambdas) \ - F(cxx_lambda_init_captures) \ F(cxx_local_type_template_args) \ F(cxx_long_long_type) \ F(cxx_noexcept) \ @@ -617,22 +613,41 @@ private: F(cxx_range_for) \ F(cxx_raw_string_literals) \ F(cxx_reference_qualified_functions) \ - F(cxx_relaxed_constexpr) \ - F(cxx_return_type_deduction) \ 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_variable_templates) \ F(cxx_variadic_macros) \ F(cxx_variadic_templates) +#define FOR_EACH_CXX14_FEATURE(F) \ + F(cxx_aggregate_default_initializers) \ + F(cxx_attribute_deprecated) \ + F(cxx_binary_literals) \ + F(cxx_contextual_conversions) \ + F(cxx_decltype_auto) \ + F(cxx_digit_separators) \ + F(cxx_generic_lambdas) \ + F(cxx_lambda_init_captures) \ + F(cxx_relaxed_constexpr) \ + F(cxx_return_type_deduction) \ + F(cxx_variable_templates) + +#define FOR_EACH_CXX_FEATURE(F) \ + F(cxx_std_98) \ + F(cxx_std_11) \ + F(cxx_std_14) \ + F(cxx_std_17) \ + F(cxx_std_20) \ + FOR_EACH_CXX98_FEATURE(F) \ + FOR_EACH_CXX11_FEATURE(F) \ + FOR_EACH_CXX14_FEATURE(F) + #endif ----------------------------------------------------------------------- Summary of changes: Modules/Internal/FeatureTesting.cmake | 14 +++++++-- Source/cmState.cxx | 19 +++++++++++ Source/cmake.h | 59 ++++++++++++++++++++++------------- 3 files changed, 68 insertions(+), 24 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org https://cmake.org/mailman/listinfo/cmake-commits