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  7cb0f785fcffb32141a4e643fd354d2f86596534 (commit)
       via  0fb4869a78bad0c529bbf8d59ef91d47ac19384f (commit)
      from  4008f1f1d1ee1ae9f1f16d555aee3ea40b4f7cc8 (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=7cb0f785fcffb32141a4e643fd354d2f86596534
commit 7cb0f785fcffb32141a4e643fd354d2f86596534
Merge: 4008f1f 0fb4869
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Wed Nov 2 08:26:36 2016 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Wed Nov 2 08:26:36 2016 -0400

    Merge topic 'compile-features-for-language-standards' into next
    
    0fb4869a Revert topic 'compile-features-for-language-standards'


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0fb4869a78bad0c529bbf8d59ef91d47ac19384f
commit 0fb4869a78bad0c529bbf8d59ef91d47ac19384f
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Wed Nov 2 08:26:02 2016 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Wed Nov 2 08:26:02 2016 -0400

    Revert topic 'compile-features-for-language-standards'
    
    It needs to be revised and restored later.

diff --git a/Help/manual/cmake-compile-features.7.rst 
b/Help/manual/cmake-compile-features.7.rst
index 6018f6c..7289e61 100644
--- a/Help/manual/cmake-compile-features.7.rst
+++ b/Help/manual/cmake-compile-features.7.rst
@@ -84,33 +84,6 @@ Feature requirements are evaluated transitively by consuming 
the link
 implementation.  See :manual:`cmake-buildsystem(7)` for more on
 transitive behavior of build properties and usage requirements.
 
-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.
-
-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:
-
-.. 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
-``-std=gnu++11`` if necessary.  This applies to sources within ``mylib``
-as well as any dependents (that may include headers from ``mylib``).
-
-Availability of Compiler Extensions
------------------------------------
-
 Because the :prop_tgt:`CXX_EXTENSIONS` target property is ``ON`` by default,
 CMake uses extended variants of language dialects by default, such as
 ``-std=gnu++11`` instead of ``-std=c++11``.  That target property may be
diff --git a/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst 
b/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst
index 00a5104..e8f4d2a 100644
--- a/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst
+++ b/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst
@@ -14,15 +14,6 @@ compile features and a list of supported compilers.
 
 The features known to this version of CMake are:
 
-``cxx_std_98``
-  Compiler mode is aware of C++ 98.
-
-``cxx_std_11``
-  Compiler mode is aware of C++ 11.
-
-``cxx_std_14``
-  Compiler mode is aware of C++ 14.
-
 ``cxx_aggregate_default_initializers``
   Aggregate default initializers, as defined in N3605_.
 
diff --git a/Help/prop_gbl/CMAKE_C_KNOWN_FEATURES.rst 
b/Help/prop_gbl/CMAKE_C_KNOWN_FEATURES.rst
index 3707fef..a08af00 100644
--- a/Help/prop_gbl/CMAKE_C_KNOWN_FEATURES.rst
+++ b/Help/prop_gbl/CMAKE_C_KNOWN_FEATURES.rst
@@ -13,15 +13,6 @@ compile features and a list of supported compilers.
 
 The features known to this version of CMake are:
 
-``c_std_90``
-  Compiler mode is aware of C 90.
-
-``c_std_99``
-  Compiler mode is aware of C 99.
-
-``c_std_11``
-  Compiler mode is aware of C 11.
-
 ``c_function_prototypes``
   Function prototypes, as defined in ``ISO/IEC 9899:1990``.
 
diff --git a/Help/release/dev/compile-features-for-language-standards.rst 
b/Help/release/dev/compile-features-for-language-standards.rst
deleted file mode 100644
index 20473b7..0000000
--- a/Help/release/dev/compile-features-for-language-standards.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-compile-features-for-language-standards
----------------------------------------
-
-* The :manual:`Compile Features <cmake-compile-features(7)>` functionality
-  now offers meta-features that request compiler modes for specific language
-  standard levels.  See :prop_gbl:`CMAKE_C_KNOWN_FEATURES` and
-  :prop_gbl:`CMAKE_CXX_KNOWN_FEATURES`.
diff --git a/Modules/CMakeDetermineCompileFeatures.cmake 
b/Modules/CMakeDetermineCompileFeatures.cmake
index ea51847..5ca72cc 100644
--- a/Modules/CMakeDetermineCompileFeatures.cmake
+++ b/Modules/CMakeDetermineCompileFeatures.cmake
@@ -7,9 +7,9 @@ function(cmake_determine_compile_features lang)
   if(lang STREQUAL C AND COMMAND cmake_record_c_compile_features)
     message(STATUS "Detecting ${lang} compile features")
 
-    set(CMAKE_C90_COMPILE_FEATURES c_std_90)
-    set(CMAKE_C99_COMPILE_FEATURES c_std_99)
-    set(CMAKE_C11_COMPILE_FEATURES c_std_11)
+    set(CMAKE_C90_COMPILE_FEATURES)
+    set(CMAKE_C99_COMPILE_FEATURES)
+    set(CMAKE_C11_COMPILE_FEATURES)
 
     include("${CMAKE_ROOT}/Modules/Internal/FeatureTesting.cmake")
 
@@ -27,13 +27,7 @@ function(cmake_determine_compile_features lang)
       list(REMOVE_ITEM CMAKE_C99_COMPILE_FEATURES 
${CMAKE_C90_COMPILE_FEATURES})
     endif()
 
-    if(CMAKE_C_COMPILE_FEATURES)
-      list(INSERT CMAKE_C_COMPILE_FEATURES 0
-        c_std_90
-        c_std_99
-        c_std_11
-        )
-    else()
+    if(NOT CMAKE_C_COMPILE_FEATURES)
       set(CMAKE_C_COMPILE_FEATURES
         ${CMAKE_C90_COMPILE_FEATURES}
         ${CMAKE_C99_COMPILE_FEATURES}
@@ -51,9 +45,9 @@ function(cmake_determine_compile_features lang)
   elseif(lang STREQUAL CXX AND COMMAND cmake_record_cxx_compile_features)
     message(STATUS "Detecting ${lang} compile features")
 
-    set(CMAKE_CXX98_COMPILE_FEATURES cxx_std_98)
-    set(CMAKE_CXX11_COMPILE_FEATURES cxx_std_11)
-    set(CMAKE_CXX14_COMPILE_FEATURES cxx_std_14)
+    set(CMAKE_CXX98_COMPILE_FEATURES)
+    set(CMAKE_CXX11_COMPILE_FEATURES)
+    set(CMAKE_CXX14_COMPILE_FEATURES)
 
     include("${CMAKE_ROOT}/Modules/Internal/FeatureTesting.cmake")
 
@@ -71,13 +65,7 @@ function(cmake_determine_compile_features lang)
       list(REMOVE_ITEM CMAKE_CXX11_COMPILE_FEATURES 
${CMAKE_CXX98_COMPILE_FEATURES})
     endif()
 
-    if(CMAKE_CXX_COMPILE_FEATURES)
-      list(INSERT CMAKE_CXX_COMPILE_FEATURES 0
-        cxx_std_98
-        cxx_std_11
-        cxx_std_14
-        )
-    else()
+    if(NOT CMAKE_CXX_COMPILE_FEATURES)
       set(CMAKE_CXX_COMPILE_FEATURES
         ${CMAKE_CXX98_COMPILE_FEATURES}
         ${CMAKE_CXX11_COMPILE_FEATURES}
diff --git a/Modules/WriteCompilerDetectionHeader.cmake 
b/Modules/WriteCompilerDetectionHeader.cmake
index a390f4b..82e8fba 100644
--- a/Modules/WriteCompilerDetectionHeader.cmake
+++ b/Modules/WriteCompilerDetectionHeader.cmake
@@ -76,7 +76,6 @@
 # Available features in this version of CMake are listed in the
 # :prop_gbl:`CMAKE_C_KNOWN_FEATURES` and
 # :prop_gbl:`CMAKE_CXX_KNOWN_FEATURES` global properties.
-# The ``{c,cxx}_std_*`` meta-features are ignored if requested.
 #
 # See the :manual:`cmake-compile-features(7)` manual for information on
 # compile features.
@@ -359,11 +358,7 @@ function(write_compiler_detection_header
   endif()
 
   foreach(feature ${_WCD_FEATURES})
-    if (feature MATCHES "^c_std_")
-      # ignored
-    elseif (feature MATCHES "^cxx_std_")
-      # ignored
-    elseif (feature MATCHES "^cxx_")
+    if (feature MATCHES "^cxx_")
       list(APPEND _langs CXX)
       list(APPEND CXX_features ${feature})
     elseif (feature MATCHES "^c_")
diff --git a/Source/cmake.h b/Source/cmake.h
index 6e8d9c8..cd00c61 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -535,18 +535,12 @@ 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)                                                              \
diff --git a/Tests/CompileFeatures/CMakeLists.txt 
b/Tests/CompileFeatures/CMakeLists.txt
index 9f61186..9f08523 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -23,12 +23,10 @@ macro(run_test feature lang)
 endmacro()
 
 get_property(c_features GLOBAL PROPERTY CMAKE_C_KNOWN_FEATURES)
-list(REMOVE_ITEM c_features c_std_90 c_std_99 c_std_11)
 foreach(feature ${c_features})
   run_test(${feature} C)
 endforeach()
 get_property(cxx_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES)
-list(REMOVE_ITEM cxx_features cxx_std_98 cxx_std_11 cxx_std_14)
 foreach(feature ${cxx_features})
   run_test(${feature} CXX)
 endforeach()
@@ -398,7 +396,7 @@ if (CMAKE_CXX_COMPILE_FEATURES)
   )
 
   add_executable(CompileFeaturesGenex2 genex_test.cpp)
-  target_compile_features(CompileFeaturesGenex2 PRIVATE cxx_std_11)
+  target_compile_features(CompileFeaturesGenex2 PRIVATE cxx_static_assert)
   target_compile_definitions(CompileFeaturesGenex2 PRIVATE
     HAVE_OVERRIDE_CONTROL=$<COMPILE_FEATURES:cxx_final,cxx_override>
     HAVE_AUTO_TYPE=$<COMPILE_FEATURES:cxx_auto_type>
@@ -407,10 +405,10 @@ if (CMAKE_CXX_COMPILE_FEATURES)
     
HAVE_INHERITING_CONSTRUCTORS_AND_FINAL=$<COMPILE_FEATURES:cxx_inheriting_constructors,cxx_final>
   )
 
-  add_library(std_11_iface INTERFACE)
-  target_compile_features(std_11_iface INTERFACE cxx_std_11)
+  add_library(static_assert_iface INTERFACE)
+  target_compile_features(static_assert_iface INTERFACE cxx_static_assert)
   add_executable(CompileFeaturesGenex3 genex_test.cpp)
-  target_link_libraries(CompileFeaturesGenex3 PRIVATE std_11_iface)
+  target_link_libraries(CompileFeaturesGenex3 PRIVATE static_assert_iface)
   target_compile_definitions(CompileFeaturesGenex3 PRIVATE
     HAVE_OVERRIDE_CONTROL=$<COMPILE_FEATURES:cxx_final,cxx_override>
     HAVE_AUTO_TYPE=$<COMPILE_FEATURES:cxx_auto_type>
diff --git 
a/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle.cmake 
b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle.cmake
index 2d14a9e..09594bd 100644
--- a/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle.cmake
+++ b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle.cmake
@@ -3,13 +3,13 @@ add_library(empty1 empty.cpp)
 
 add_library(empty2 INTERFACE)
 add_library(empty3 INTERFACE)
-target_compile_features(empty3 INTERFACE cxx_std_11)
+target_compile_features(empty3 INTERFACE cxx_static_assert)
 
 target_link_libraries(empty1
   # When starting, $<COMPILE_FEATURES:cxx_auto_type> is '0', so 'freeze' the
   # CXX_STANDARD at 98 during computation.
   $<$<COMPILE_FEATURES:cxx_auto_type>:empty2>
-  # This would add cxx_std_11, but that would require CXX_STANDARD = 11,
+  # This would add cxx_static_assert, but that would require CXX_STANDARD = 11,
   # which is not allowed after freeze.  Report an error.
   empty3
 )
diff --git 
a/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycleSolved.cmake 
b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycleSolved.cmake
index a04dcec..bbcf4e0 100644
--- a/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycleSolved.cmake
+++ b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycleSolved.cmake
@@ -3,7 +3,7 @@ add_library(empty1 empty.cpp)
 
 add_library(empty2 INTERFACE)
 add_library(empty3 INTERFACE)
-target_compile_features(empty3 INTERFACE cxx_std_11)
+target_compile_features(empty3 INTERFACE cxx_static_assert)
 
 target_link_libraries(empty1
   $<$<COMPILE_FEATURES:cxx_nullptr>:empty2>

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

Summary of changes:
 Help/manual/cmake-compile-features.7.rst           |   27 -------------------
 Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst         |    9 -------
 Help/prop_gbl/CMAKE_C_KNOWN_FEATURES.rst           |    9 -------
 .../compile-features-for-language-standards.rst    |    7 -----
 Modules/CMakeDetermineCompileFeatures.cmake        |   28 ++++++--------------
 Modules/WriteCompilerDetectionHeader.cmake         |    7 +----
 Source/cmake.h                                     |    6 -----
 Tests/CompileFeatures/CMakeLists.txt               |   10 +++----
 .../LinkImplementationFeatureCycle.cmake           |    4 +--
 .../LinkImplementationFeatureCycleSolved.cmake     |    2 +-
 10 files changed, 16 insertions(+), 93 deletions(-)
 delete mode 100644 Help/release/dev/compile-features-for-language-standards.rst


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to