[Cmake-commits] CMake branch, next, updated. v3.1.1-2484-g2982298

Brad King brad.king at kitware.com
Thu Jan 29 16:01:24 EST 2015


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  2982298c9ce6cbd7402cc7a189c3382b1743ea51 (commit)
       via  52b89b09713f03fcf81202a5065b2bf146e42cb2 (commit)
      from  faeef8432b3bcf7623846de2b1715de3b2acdb13 (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=2982298c9ce6cbd7402cc7a189c3382b1743ea51
commit 2982298c9ce6cbd7402cc7a189c3382b1743ea51
Merge: faeef84 52b89b0
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jan 29 16:01:24 2015 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jan 29 16:01:24 2015 -0500

    Merge topic 'feature-record-msvc' into next
    
    52b89b09 fixup! Features: Record for MSVC 2010-2015


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52b89b09713f03fcf81202a5065b2bf146e42cb2
commit 52b89b09713f03fcf81202a5065b2bf146e42cb2
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jan 29 15:26:16 2015 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jan 29 15:59:53 2015 -0500

    fixup! Features: Record for MSVC 2010-2015

diff --git a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake
index d69a7ef..c770211 100644
--- a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake
@@ -12,18 +12,19 @@ set(_cmake_feature_test_cxx_alignas "${MSVC_2015}")
 set(_cmake_feature_test_cxx_alignof "${MSVC_2015}")
 set(_cmake_feature_test_cxx_binary_literals "${MSVC_2015}")
 set(_cmake_feature_test_cxx_decltype_auto "${MSVC_2015}")
-# In theory decltype incomplete return types was added in 2012
-# but without support for decltype_auto and return type deduction this
-# feature is unusable
-set(_cmake_feature_test_cxx_decltype_incomplete_return_types "${MSVC_2015}")
+# Digit separators are not available as of VS 2015 Preview, but a footnote
+# says they will be available in the RTM.
 set(_cmake_feature_test_cxx_digit_separators "${MSVC_2015}")
 set(_cmake_feature_test_cxx_func_identifier "${MSVC_2015}")
 # http://blogs.msdn.com/b/vcblog/archive/2014/11/17/c-11-14-17-features-in-vs-2015-preview.aspx
-# Note 1. While previous version of VisualStudio said they supported this
+# Note 1. While previous version of VisualStudio said they supported these
 # they silently produced bad code, and are now marked as having partial
 # support in previous versions. The footnote says the support will be complete
 # in MSVC 2015, so support the feature for that version, assuming that is true.
 set(_cmake_feature_test_cxx_generalized_initializers "${MSVC_2015}")
+set(_cmake_feature_test_cxx_nonstatic_member_init "${MSVC_2015}")
+# Microsoft calls this 'rvalue references v3'
+set(_cmake_feature_test_cxx_defaulted_move_initializers "${MSVC_2015}")
 set(_cmake_feature_test_cxx_generic_lambdas "${MSVC_2015}")
 set(_cmake_feature_test_cxx_inheriting_constructors "${MSVC_2015}")
 set(_cmake_feature_test_cxx_inline_namespaces "${MSVC_2015}")
@@ -35,6 +36,13 @@ set(_cmake_feature_test_cxx_thread_local "${MSVC_2015}")
 set(_cmake_feature_test_cxx_unicode_literals "${MSVC_2015}")
 set(_cmake_feature_test_cxx_unrestricted_unions "${MSVC_2015}")
 set(_cmake_feature_test_cxx_user_literals "${MSVC_2015}")
+set(_cmake_feature_test_cxx_reference_qualified_functions "${MSVC_2015}")
+# "The copies and moves don't interact precisely like the Standard says they
+# should. For example, deletion of moves is specified to also suppress
+# copies, but Visual C++ in Visual Studio 2013 does not."
+# http://blogs.msdn.com/b/vcblog/archive/2014/11/17/c-11-14-17-features-in-vs-2015-preview.aspx
+# lists this as 'partial' in 2013
+set(_cmake_feature_test_cxx_deleted_functions "${MSVC_2015}")
 
 set(MSVC_2013 "_MSC_VER >= 1800")
 set(_cmake_feature_test_cxx_alias_templates "${MSVC_2013}")
@@ -45,9 +53,7 @@ set(_cmake_feature_test_cxx_contextual_conversions "${MSVC_2013}")
 set(_cmake_feature_test_cxx_default_function_template_args "${MSVC_2013}")
 set(_cmake_feature_test_cxx_defaulted_functions "${MSVC_2013}")
 set(_cmake_feature_test_cxx_delegating_constructors "${MSVC_2013}")
-set(_cmake_feature_test_cxx_deleted_functions "${MSVC_2013}")
 set(_cmake_feature_test_cxx_explicit_conversions "${MSVC_2013}")
-set(_cmake_feature_test_cxx_nonstatic_member_init "${MSVC_2013}")
 set(_cmake_feature_test_cxx_raw_string_literals "${MSVC_2013}")
 set(_cmake_feature_test_cxx_uniform_initialization "${MSVC_2013}")
 # Support is documented, but possibly partly broken:
@@ -62,7 +68,6 @@ set(_cmake_feature_test_cxx_range_for "${MSVC_2012}")
 set(_cmake_feature_test_cxx_strong_enums "${MSVC_2012}")
 
 set(MSVC_2010 "_MSC_VER >= 1600")
-set(_cmake_feature_test_cxx_auto_function "${MSVC_2010}")
 set(_cmake_feature_test_cxx_auto_type "${MSVC_2010}")
 set(_cmake_feature_test_cxx_decltype "${MSVC_2010}")
 set(_cmake_feature_test_cxx_extended_friend_declarations "${MSVC_2010}")
@@ -80,19 +85,18 @@ set(_cmake_feature_test_cxx_trailing_return_types "${MSVC_2010}")
 set(_cmake_feature_test_cxx_variadic_macros "${MSVC_2010}")
 
 # Currently unsupported:
-# http://herbsutter.com/2013/11/18/visual-c-compiler-november-2013-ctp/
-# http://blogs.msdn.com/b/vcblog/archive/2014/11/17/c-11-14-17-features-in-vs-2015-preview.aspx
-
-# set(_cmake_feature_test_cxx_reference_qualified_functions )
 # set(_cmake_feature_test_cxx_constexpr )
+# set(_cmake_feature_test_cxx_relaxed_constexpr )
 # set(_cmake_feature_test_cxx_attributes )
-# set(_cmake_feature_test_cxx_aggregate_default_initializers )
 # set(_cmake_feature_test_cxx_attribute_deprecated )
-# set(_cmake_feature_test_cxx_defaulted_move_initializers )
-# set(_cmake_feature_test_cxx_nonstatic_member_init )
-# set(_cmake_feature_test_cxx_relaxed_constexpr )
+# 'NSDMIs for aggregates'
+# set(_cmake_feature_test_cxx_aggregate_default_initializers )
 # set(_cmake_feature_test_cxx_variable_templates )
 
+# In theory decltype incomplete return types was added in 2012
+# but without support for decltype_auto and return type deduction this
+# feature is unusable.  This remains so as of VS 2015 Preview.
+# set(_cmake_feature_test_cxx_decltype_incomplete_return_types )
 
 # Unset all the variables that we don't need exposed.
 # _cmake_oldestSupported is required by WriteCompilerDetectionHeader
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index bb0dc0d..38c44c8 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -99,14 +99,30 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
     cxx_return_type_deduction
   )
 endif()
-if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC"
-    AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
-  list(REMOVE_ITEM CXX_non_features
-    # The cxx_contextual_conversions feature happens to work
-    # (for *this* testcase) with VS 2010 and VS 2012, but
-    # they do not document support until VS 2013.
-    cxx_contextual_conversions
-  )
+
+if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+  if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
+    list(REMOVE_ITEM CXX_non_features
+      # The cxx_contextual_conversions feature happens to work
+      # (for *this* testcase) with VS 2010 and VS 2012, but
+      # they do not document support until VS 2013.
+      cxx_contextual_conversions
+      )
+  elseif (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0)
+    list(REMOVE_ITEM CXX_non_features
+      # The cxx_deleted_functions and cxx_nonstatic_member_init
+      # features happen to work (for *this* testcase) with VS 2013,
+      # but they do not document support until VS 2015.
+      cxx_deleted_functions
+      cxx_nonstatic_member_init
+      )
+  else()
+    list(REMOVE_ITEM CXX_non_features
+      # The cxx_constexpr feature happens to work (for *this* testcase)
+      # with VS 2015, but they document only partial support.
+      cxx_constexpr
+      )
+  endif()
 endif()
 
 set(C_ext c)

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

Summary of changes:
 Modules/Compiler/MSVC-CXX-FeatureTests.cmake |   36 ++++++++++++++------------
 Tests/CompileFeatures/CMakeLists.txt         |   32 +++++++++++++++++------
 2 files changed, 44 insertions(+), 24 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list