[Cmake-commits] CMake branch, next, updated. v3.1.0-1408-g55efb6d

Robert Maynard robert.maynard at kitware.com
Mon Dec 29 16:03:50 EST 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  55efb6d191007eef921df832bae9ff014f85cd57 (commit)
       via  ca4c03f7fef0d4035013e20e34ceb0b0f0839548 (commit)
       via  c956cd9acf6f30047b4f5e82f19b6d3984e31ba9 (commit)
       via  7dcaab52d45fb58610803377c98b60b6fbbb7bc7 (commit)
       via  d2fca349aee767267411fa3d8316675b93e150ea (commit)
      from  d4e069935251bb182498ed2b6ca7a8037897a989 (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=55efb6d191007eef921df832bae9ff014f85cd57
commit 55efb6d191007eef921df832bae9ff014f85cd57
Merge: d4e0699 ca4c03f
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Mon Dec 29 16:03:49 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Dec 29 16:03:49 2014 -0500

    Merge topic 'feature_record_msvc' into next
    
    ca4c03f7 Features: Quote all the compile names.
    c956cd9a Features: Enable MSVC compiler detection header writing.
    7dcaab52 Features: Record for MSVC 2015.
    d2fca349 Features: Record for MSVC 2010-2013.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ca4c03f7fef0d4035013e20e34ceb0b0f0839548
commit ca4c03f7fef0d4035013e20e34ceb0b0f0839548
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Mon Dec 29 15:37:11 2014 -0500
Commit:     Robert Maynard <robert.maynard at kitware.com>
CommitDate: Mon Dec 29 15:37:11 2014 -0500

    Features: Quote all the compile names.
    
    We need to quote the MSVC compiler name, as it is also a global variable in
    CMake. So to keep a consistent style we should quote all the compiler names.

diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
index c1cbd8e..cbfe3f3 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
+++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
@@ -56,9 +56,9 @@ macro(set_defines target true_defs false_defs)
   )
 endmacro()
 
-if (CMAKE_CXX_COMPILER_ID STREQUAL GNU
-    OR CMAKE_CXX_COMPILER_ID STREQUAL Clang
-    OR CMAKE_CXX_COMPILER_ID STREQUAL AppleClang)
+if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
+    OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
+    OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
   # False for C++98 mode.
   list(APPEND false_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS)
   list(APPEND false_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES)
@@ -76,9 +76,9 @@ else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
   list(APPEND false_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES)
 endif()
 
-if (CMAKE_C_COMPILER_ID STREQUAL GNU
-    OR CMAKE_C_COMPILER_ID STREQUAL Clang
-    OR CMAKE_C_COMPILER_ID STREQUAL AppleClang)
+if (CMAKE_C_COMPILER_ID STREQUAL "GNU"
+    OR CMAKE_C_COMPILER_ID STREQUAL "Clang"
+    OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
   add_executable(C_undefined c_undefined.c)
   set_property(TARGET C_undefined PROPERTY CXX_STANDARD 90)
   target_compile_options(C_undefined PRIVATE -Werror=undef)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c956cd9acf6f30047b4f5e82f19b6d3984e31ba9
commit c956cd9acf6f30047b4f5e82f19b6d3984e31ba9
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Mon Dec 22 13:45:18 2014 -0500
Commit:     Robert Maynard <robert.maynard at kitware.com>
CommitDate: Mon Dec 29 15:35:54 2014 -0500

    Features: Enable MSVC compiler detection header writing.

diff --git a/Modules/Compiler/MSVC-C-FeatureTests.cmake b/Modules/Compiler/MSVC-C-FeatureTests.cmake
new file mode 100644
index 0000000..64016bc
--- /dev/null
+++ b/Modules/Compiler/MSVC-C-FeatureTests.cmake
@@ -0,0 +1,24 @@
+
+# Reference: http://msdn.microsoft.com/en-us/library/vstudio/hh567368.aspx
+# http://blogs.msdn.com/b/vcblog/archive/2013/06/28/c-11-14-stl-features-fixes-and-breaking-changes-in-vs-2013.aspx
+# http://blogs.msdn.com/b/vcblog/archive/2014/11/17/c-11-14-17-features-in-vs-2015-preview.aspx
+# http://www.visualstudio.com/en-us/news/vs2015-preview-vs.aspx
+
+set(_cmake_oldestSupported "_MSC_VER >= 1300")
+
+#currently disabling everything while we test
+set(MSVC_2010 "_MSC_VER >= 1600")
+set(_cmake_feature_test_c_static_assert "${MSVC_2010}")
+set(_cmake_feature_test_c_variadic_macros "${MSVC_2010}")
+
+set(MSVC_2003 "_MSC_VER >= 1300")
+set(_cmake_feature_test_c_function_prototypes "${MSVC_2003}")
+
+# Currently unsupported:
+#restrict requires the __restrict syntax in msvc
+#set(_cmake_feature_test_c_restrict)
+
+#Unset all the variables that we don't need exposed.
+#_cmake_oldestSupported is required by WriteCompilerDetectionHeader
+set(MSVC_2010)
+set(MSVC_2003)
\ No newline at end of file
diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake
index 36b9706..bcaaafa 100644
--- a/Modules/WriteCompilerDetectionHeader.cmake
+++ b/Modules/WriteCompilerDetectionHeader.cmake
@@ -36,7 +36,7 @@
 #      PREFIX ClimbingStats
 #      OUTPUT_FILES_VAR support_files
 #      OUTPUT_DIR compilers
-#      COMPILERS GNU Clang
+#      COMPILERS GNU Clang MSVC
 #      FEATURES cxx_variadic_templates
 #    )
 #    install(FILES
@@ -100,7 +100,7 @@
 #    write_compiler_detection_header(
 #      FILE climbingstats_compiler_detection.h
 #      PREFIX ClimbingStats
-#      COMPILERS GNU Clang AppleClang
+#      COMPILERS GNU Clang AppleClang MSVC
 #      FEATURES cxx_variadic_templates
 #    )
 #
@@ -316,6 +316,7 @@ function(write_compiler_detection_header
     GNU
     Clang
     AppleClang
+    MSVC
   )
 
   set(_hex_compilers ADSP Borland Embarcadero SunPro)
diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
index 5b2f1de..c1cbd8e 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
+++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0.0)
+cmake_minimum_required(VERSION 3.1.0)
 project(WriteCompilerDetectionHeader)
 
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
@@ -11,7 +11,7 @@ get_property(c_known_features GLOBAL PROPERTY CMAKE_C_KNOWN_FEATURES)
 write_compiler_detection_header(
   FILE "${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h"
   PREFIX TEST
-  COMPILERS GNU Clang AppleClang
+  COMPILERS GNU Clang AppleClang MSVC
   VERSION 3.1
   PROLOG "// something"
   EPILOG "// more"
@@ -64,6 +64,18 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL GNU
   list(APPEND false_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES)
 endif()
 
+#for msvc the version determines if we support delegating constructors
+#and variadic templates. Luckily support for both of these features was
+#added in the same msvc version (1800)
+if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND
+    ";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_delegating_constructors;")
+  list(APPEND true_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS)
+  list(APPEND true_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES)
+else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+  list(APPEND false_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS)
+  list(APPEND false_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES)
+endif()
+
 if (CMAKE_C_COMPILER_ID STREQUAL GNU
     OR CMAKE_C_COMPILER_ID STREQUAL Clang
     OR CMAKE_C_COMPILER_ID STREQUAL AppleClang)
@@ -81,7 +93,7 @@ write_compiler_detection_header(
   PREFIX MULTI
   OUTPUT_FILES_VAR multi_files
   OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/compiler_multi_files/compiler_support"
-  COMPILERS GNU Clang AppleClang
+  COMPILERS GNU Clang AppleClang MSVC
   VERSION 3.1
   FEATURES
     ${cxx_known_features} ${c_known_features}

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7dcaab52d45fb58610803377c98b60b6fbbb7bc7
commit 7dcaab52d45fb58610803377c98b60b6fbbb7bc7
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Mon Dec 22 10:25:18 2014 -0500
Commit:     Robert Maynard <robert.maynard at kitware.com>
CommitDate: Mon Dec 22 14:37:49 2014 -0500

    Features: Record for MSVC 2015.

diff --git a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake
index 18dea24..980f53c 100644
--- a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake
@@ -1,8 +1,31 @@
 
 # Reference: http://msdn.microsoft.com/en-us/library/vstudio/hh567368.aspx
 # http://blogs.msdn.com/b/vcblog/archive/2013/06/28/c-11-14-stl-features-fixes-and-breaking-changes-in-vs-2013.aspx
+# http://blogs.msdn.com/b/vcblog/archive/2014/11/17/c-11-14-17-features-in-vs-2015-preview.aspx
+# http://www.visualstudio.com/en-us/news/vs2015-preview-vs.aspx
 
-set(_oldestSupported "_MSC_VER >= 1600")
+
+set(_cmake_oldestSupported "_MSC_VER >= 1600")
+
+set(MSVC_2015 "_MSC_VER >= 1900")
+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}")
+set(_cmake_feature_test_cxx_digit_separators "${MSVC_2015}")
+set(_cmake_feature_test_cxx_func_identifier "${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}")
+set(_cmake_feature_test_cxx_lambda_init_captures "${MSVC_2015}")
+set(_cmake_feature_test_cxx_noexcept "${MSVC_2015}")
+set(_cmake_feature_test_cxx_return_type_deduction "${MSVC_2015}")
+set(_cmake_feature_test_cxx_sizeof_member "${MSVC_2015}")
+set(_cmake_feature_test_cxx_thread_local "${MSVC_2015}")
+set(_cmake_feature_test_cxx_trailing_return_types "${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(MSVC_2013 "_MSC_VER >= 1800")
 set(_cmake_feature_test_cxx_alias_templates "${MSVC_2013}")
@@ -19,6 +42,10 @@ set(_cmake_feature_test_cxx_uniform_initialization "${MSVC_2013}")
 # Possibly broken:
 # http://thread.gmane.org/gmane.comp.lib.boost.devel/244986/focus=245333
 set(_cmake_feature_test_cxx_variadic_templates "${MSVC_2013}")
+# Microsoft now states they support contextual conversions
+# see footnote 6 at:
+#  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_contextual_conversions "${MSVC_2013}")
 
 set(MSVC_2012 "_MSC_VER >= 1700")
 set(_cmake_feature_test_cxx_decltype_incomplete_return_types "${MSVC_2012}")
@@ -46,20 +73,21 @@ set(_cmake_feature_test_cxx_variadic_macros "${MSVC_2010}")
 
 # Currently unsupported:
 # http://herbsutter.com/2013/11/18/visual-c-compiler-november-2013-ctp/
-# set(_cmake_feature_test_cxx_reference_qualified_functions )
-# set(_cmake_feature_test_cxx_inheriting_constructors )
-# set(_cmake_feature_test_cxx_alignas )
-# set(_cmake_feature_test_cxx_alignof )
-# set(_cmake_feature_test_cxx_thread_local )
-# set(_cmake_feature_test_cxx_func_identifier )
-# set(_cmake_feature_test_cxx_sizeof_member )
+# 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_user_literals )
-# set(_cmake_feature_test_cxx_unrestricted_unions )
-# set(_cmake_feature_test_cxx_unicode_literals )
-# set(_cmake_feature_test_cxx_inline_namespaces )
+# set(_cmake_feature_test_cxx_reference_qualified_functions )
 # set(_cmake_feature_test_cxx_constexpr )
-# set(_cmake_feature_test_cxx_noexcept )
 # 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 )
+# set(_cmake_feature_test_cxx_variable_templates )
 
-set(_oldestSupported)
+#Unset all the variables that we don't need exposed.
+#_cmake_oldestSupported is required by WriteCompilerDetectionHeader
+set(MSVC_2015)
+set(MSVC_2013)
+set(MSVC_2012)
+set(MSVC_2010)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d2fca349aee767267411fa3d8316675b93e150ea
commit d2fca349aee767267411fa3d8316675b93e150ea
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Apr 6 15:55:37 2014 +0200
Commit:     Robert Maynard <robert.maynard at kitware.com>
CommitDate: Mon Dec 22 14:37:49 2014 -0500

    Features: Record for MSVC 2010-2013.

diff --git a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake
new file mode 100644
index 0000000..18dea24
--- /dev/null
+++ b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake
@@ -0,0 +1,65 @@
+
+# Reference: http://msdn.microsoft.com/en-us/library/vstudio/hh567368.aspx
+# http://blogs.msdn.com/b/vcblog/archive/2013/06/28/c-11-14-stl-features-fixes-and-breaking-changes-in-vs-2013.aspx
+
+set(_oldestSupported "_MSC_VER >= 1600")
+
+set(MSVC_2013 "_MSC_VER >= 1800")
+set(_cmake_feature_test_cxx_alias_templates "${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}")
+# http://thread.gmane.org/gmane.comp.lib.boost.devel/245202/focus=245221
+set(_cmake_feature_test_cxx_generalized_initializers "${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}")
+# Possibly broken:
+# http://thread.gmane.org/gmane.comp.lib.boost.devel/244986/focus=245333
+set(_cmake_feature_test_cxx_variadic_templates "${MSVC_2013}")
+
+set(MSVC_2012 "_MSC_VER >= 1700")
+set(_cmake_feature_test_cxx_decltype_incomplete_return_types "${MSVC_2012}")
+set(_cmake_feature_test_cxx_enum_forward_declarations "${MSVC_2012}")
+set(_cmake_feature_test_cxx_final "${MSVC_2012}")
+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}")
+set(_cmake_feature_test_cxx_extern_templates "${MSVC_2010}")
+set(_cmake_feature_test_cxx_lambdas "${MSVC_2010}")
+set(_cmake_feature_test_cxx_local_type_template_args "${MSVC_2010}")
+set(_cmake_feature_test_cxx_long_long_type "${MSVC_2010}")
+set(_cmake_feature_test_cxx_nullptr "${MSVC_2010}")
+set(_cmake_feature_test_cxx_override "${MSVC_2010}")
+set(_cmake_feature_test_cxx_right_angle_brackets "${MSVC_2010}")
+set(_cmake_feature_test_cxx_rvalue_references "${MSVC_2010}")
+set(_cmake_feature_test_cxx_static_assert "${MSVC_2010}")
+set(_cmake_feature_test_cxx_template_template_parameters "${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/
+# set(_cmake_feature_test_cxx_reference_qualified_functions )
+# set(_cmake_feature_test_cxx_inheriting_constructors )
+# set(_cmake_feature_test_cxx_alignas )
+# set(_cmake_feature_test_cxx_alignof )
+# set(_cmake_feature_test_cxx_thread_local )
+# set(_cmake_feature_test_cxx_func_identifier )
+# set(_cmake_feature_test_cxx_sizeof_member )
+
+# set(_cmake_feature_test_cxx_user_literals )
+# set(_cmake_feature_test_cxx_unrestricted_unions )
+# set(_cmake_feature_test_cxx_unicode_literals )
+# set(_cmake_feature_test_cxx_inline_namespaces )
+# set(_cmake_feature_test_cxx_constexpr )
+# set(_cmake_feature_test_cxx_noexcept )
+# set(_cmake_feature_test_cxx_attributes )
+
+set(_oldestSupported)
diff --git a/Modules/Platform/Windows-MSVC-CXX.cmake b/Modules/Platform/Windows-MSVC-CXX.cmake
index 0e85005..89885b8 100644
--- a/Modules/Platform/Windows-MSVC-CXX.cmake
+++ b/Modules/Platform/Windows-MSVC-CXX.cmake
@@ -4,3 +4,7 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
   set(_FS_CXX " /FS")
 endif()
 __windows_compiler_msvc(CXX)
+
+macro(cmake_record_cxx_compile_features)
+  record_compiler_features(CXX "" CMAKE_CXX_COMPILE_FEATURES)
+endmacro()

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

Summary of changes:
 Modules/Compiler/MSVC-C-FeatureTests.cmake         |   24 +++++
 Modules/Compiler/MSVC-CXX-FeatureTests.cmake       |   93 ++++++++++++++++++++
 Modules/Platform/Windows-MSVC-CXX.cmake            |    4 +
 Modules/WriteCompilerDetectionHeader.cmake         |    5 +-
 .../WriteCompilerDetectionHeader/CMakeLists.txt    |   30 +++++--
 5 files changed, 145 insertions(+), 11 deletions(-)
 create mode 100644 Modules/Compiler/MSVC-C-FeatureTests.cmake
 create mode 100644 Modules/Compiler/MSVC-CXX-FeatureTests.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list