[Cmake-commits] CMake branch, next, updated. v3.0.0-rc4-2693-g8c60ae4

Stephen Kelly steveire at gmail.com
Fri May 2 04:09:13 EDT 2014


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, next has been updated
       via  8c60ae4f773be8b4cf2530ad0212d9d1942f9695 (commit)
       via  feca740802aef85ce7fb10ac8fb06db698b86f3a (commit)
      from  720211dc54e90e8f610477d6d9c068b2dc0a0a0c (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8c60ae4f773be8b4cf2530ad0212d9d1942f9695
commit 8c60ae4f773be8b4cf2530ad0212d9d1942f9695
Merge: 720211d feca740
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri May 2 04:09:12 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri May 2 04:09:12 2014 -0400

    Merge topic 'CMAKE_CXX_KNOWN_FEATURES-global-property' into next
    
    feca7408 Features: Make CMAKE_CXX_KNOWN_FEATURES a property.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=feca740802aef85ce7fb10ac8fb06db698b86f3a
commit feca740802aef85ce7fb10ac8fb06db698b86f3a
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri May 2 10:03:24 2014 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri May 2 10:03:44 2014 +0200

    Features: Make CMAKE_CXX_KNOWN_FEATURES a property.
    
    As a 'built-in' variable it imposes a cost on all variable lookups
    and it is expected to be rarely used.

diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index a82522d..da21e29 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -16,6 +16,7 @@ Properties of Global Scope
    /prop_gbl/ALLOW_DUPLICATE_CUSTOM_TARGETS
    /prop_gbl/AUTOGEN_TARGETS_FOLDER
    /prop_gbl/AUTOMOC_TARGETS_FOLDER
+   /prop_gbl/CMAKE_CXX_KNOWN_FEATURES
    /prop_gbl/DEBUG_CONFIGURATIONS
    /prop_gbl/DISABLED_FEATURES
    /prop_gbl/ENABLED_FEATURES
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index dfdd09b..82242f5 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -258,7 +258,6 @@ Variables for Languages
 
    /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_KNOWN_FEATURES.rst b/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst
similarity index 98%
rename from Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
rename to Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst
index 7533f6d..b8b0fcd 100644
--- a/Help/variable/CMAKE_CXX_KNOWN_FEATURES.rst
+++ b/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst
@@ -3,7 +3,7 @@ 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
+The features listed in this global property 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.
 
diff --git a/Help/variable/CMAKE_CXX_COMPILE_FEATURES.rst b/Help/variable/CMAKE_CXX_COMPILE_FEATURES.rst
index 6be0124..1102c21 100644
--- a/Help/variable/CMAKE_CXX_COMPILE_FEATURES.rst
+++ b/Help/variable/CMAKE_CXX_COMPILE_FEATURES.rst
@@ -4,5 +4,5 @@ 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.
+list is a subset of the features listed in the :prop_gbl:`CMAKE_CXX_KNOWN_FEATURES`
+global property.
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
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index ce5004b..501138d 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -22,7 +22,8 @@ macro(run_test feature)
   endif()
 endmacro()
 
-foreach(feature ${CMAKE_CXX_KNOWN_FEATURES})
+get_property(features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES)
+foreach(feature ${features})
   run_test(${feature})
 endforeach()
 

-----------------------------------------------------------------------

Summary of changes:
 Help/manual/cmake-properties.7.rst                 |    1 +
 Help/manual/cmake-variables.7.rst                  |    1 -
 .../CMAKE_CXX_KNOWN_FEATURES.rst                   |    2 +-
 Help/variable/CMAKE_CXX_COMPILE_FEATURES.rst       |    4 +-
 Source/cmMakefile.cxx                              |   54 --------------------
 Source/cmake.cxx                                   |    6 +++
 Source/cmake.h                                     |   48 +++++++++++++++++
 Tests/CompileFeatures/CMakeLists.txt               |    3 +-
 8 files changed, 60 insertions(+), 59 deletions(-)
 rename Help/{variable => prop_gbl}/CMAKE_CXX_KNOWN_FEATURES.rst (98%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list