[Cmake-commits] CMake branch, next, updated. v3.1.0-2189-gecfb1d6
Robert Maynard
robert.maynard at kitware.com
Mon Jan 19 12:59:12 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 ecfb1d6137b547f9b3b9fe5517a8aba3c177fb97 (commit)
via 7c335f150524a219f44023eeeb353c6ae5bd67b8 (commit)
via adfba79088fa3370fc9d77082e0aaedf045851e6 (commit)
via fc44c07b9c0ff06e0810e3547c6fe661e786d4ba (commit)
via 54da94ad01f457cfab41c3e479bba083a67ab552 (commit)
via 797dc0cf0d3f1fba43a9689499c466f09ba2900d (commit)
via b69437a25d0132cd153d9a037207a440c9fa4815 (commit)
from 6351880c2aa815f389e0154ab41b7138a5cbf6b4 (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=ecfb1d6137b547f9b3b9fe5517a8aba3c177fb97
commit ecfb1d6137b547f9b3b9fe5517a8aba3c177fb97
Merge: 6351880 7c335f1
Author: Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Mon Jan 19 12:59:11 2015 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jan 19 12:59:11 2015 -0500
Merge topic 'feature-record-msvc' into next
7c335f15 Merge topic 'SolarisStudio-compile-features' into feature-record-msvc
adfba790 Features: Temporarily exclude MSVC from Link Feature tests.
fc44c07b Features: Enable writing of MSVC compiler feature header.
54da94ad Features: Record for MSVC C++ 2015 and MSVC C 2010-2015.
797dc0cf Features: Record for MSVC 2010-2013.
b69437a2 Extend test for MSVC.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7c335f150524a219f44023eeeb353c6ae5bd67b8
commit 7c335f150524a219f44023eeeb353c6ae5bd67b8
Merge: adfba79 bcb0478
Author: Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Mon Jan 19 12:58:57 2015 -0500
Commit: Robert Maynard <robert.maynard at kitware.com>
CommitDate: Mon Jan 19 12:58:57 2015 -0500
Merge topic 'SolarisStudio-compile-features' into feature-record-msvc
Conflicts:
Modules/WriteCompilerDetectionHeader.cmake
Tests/CompileFeatures/CMakeLists.txt
Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
diff --cc Modules/WriteCompilerDetectionHeader.cmake
index 2ecf481,e81bc08..5642c99
--- a/Modules/WriteCompilerDetectionHeader.cmake
+++ b/Modules/WriteCompilerDetectionHeader.cmake
@@@ -321,7 -321,7 +321,8 @@@ function(write_compiler_detection_heade
GNU
Clang
AppleClang
+ MSVC
+ SunPro
)
set(_hex_compilers ADSP Borland Embarcadero SunPro)
diff --cc Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
index cfaa78c,b725919..3d8bf31
--- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
+++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
@@@ -11,7 -11,7 +11,7 @@@ get_property(c_known_features GLOBAL PR
write_compiler_detection_header(
FILE "${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h"
PREFIX TEST
- COMPILERS GNU Clang AppleClang MSVC
- COMPILERS GNU Clang AppleClang SunPro
++ COMPILERS GNU Clang AppleClang MSVC SunPro
VERSION 3.1
PROLOG "// something"
EPILOG "// more"
@@@ -93,7 -82,7 +94,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 MSVC
- COMPILERS GNU Clang AppleClang SunPro
++ COMPILERS GNU Clang AppleClang MSVC SunPro
VERSION 3.1
FEATURES
${cxx_known_features} ${c_known_features}
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=adfba79088fa3370fc9d77082e0aaedf045851e6
commit adfba79088fa3370fc9d77082e0aaedf045851e6
Author: Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Mon Jan 19 12:50:24 2015 -0500
Commit: Robert Maynard <robert.maynard at kitware.com>
CommitDate: Mon Jan 19 12:50:24 2015 -0500
Features: Temporarily exclude MSVC from Link Feature tests.
While we are working on figuring out the best way to detect a C++ feature
cycle with MSVC disable these tests. This will allow us to verify the rest
of the MSVC Feature tests are working properly.
diff --git a/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake
index 1892a5c..f890f24 100644
--- a/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake
@@ -27,8 +27,10 @@ if (NOT CXX_FEATURES)
run_cmake(NoSupportedCxxFeatures)
run_cmake(NoSupportedCxxFeaturesGenex)
else()
- run_cmake(LinkImplementationFeatureCycle)
- run_cmake(LinkImplementationFeatureCycleSolved)
+ if(NOT MSVC)
+ run_cmake(LinkImplementationFeatureCycle)
+ run_cmake(LinkImplementationFeatureCycleSolved)
+ endif()
if (";${CXX_FEATURES};" MATCHES ";cxx_final;")
set(RunCMake_TEST_OPTIONS "-DHAVE_FINAL=1")
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fc44c07b9c0ff06e0810e3547c6fe661e786d4ba
commit fc44c07b9c0ff06e0810e3547c6fe661e786d4ba
Author: Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Thu Jan 15 13:14:53 2015 -0500
Commit: Robert Maynard <robert.maynard at kitware.com>
CommitDate: Mon Jan 19 11:10:30 2015 -0500
Features: Enable writing of MSVC compiler feature header.
diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake
index a6ff475..2ecf481 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
# )
#
@@ -321,6 +321,7 @@ function(write_compiler_detection_header
GNU
Clang
AppleClang
+ MSVC
)
set(_hex_compilers ADSP Borland Embarcadero SunPro)
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index 11a9584..d67adfe 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -207,6 +207,7 @@ if (CMAKE_CXX_COMPILE_FEATURES)
-DEXPECT_FINAL=0
-DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=0
)
+ endif()
endif()
add_executable(CompileFeaturesGenex genex_test.cpp)
diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
index 401de95..cfaa78c 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
+++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
@@ -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 compiler version determines which c++11 features are available.
+# Both variadic templates and delegating constructors support exist in
+# all versions that we write compile headers for.
+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=54da94ad01f457cfab41c3e479bba083a67ab552
commit 54da94ad01f457cfab41c3e479bba083a67ab552
Author: Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Thu Jan 15 13:05:19 2015 -0500
Commit: Robert Maynard <robert.maynard at kitware.com>
CommitDate: Mon Jan 19 11:10:30 2015 -0500
Features: Record for MSVC C++ 2015 and MSVC C 2010-2015.
Notes:
Initializer lists are only properly supported in 2015 and above.
Previous Visual Studio releases said they supported initializer lists
VS2012 and above to conform to cxx_decltype_incomplete_return_types
proposal, but without support for auto return types, the feature is unusable
so only state support in VS2015 and above.
VS2010 and above to conform to the updated cxx_contextual_conversions proposal.
diff --git a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake
index 18dea24..476f244 100644
--- a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake
@@ -1,8 +1,39 @@
# 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}")
+# 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}")
+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
+# they silently produced bad code, and are now marked as having partial
+# support
+set(_cmake_feature_test_cxx_generalized_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}")
+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_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}")
@@ -11,8 +42,6 @@ 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}")
@@ -21,7 +50,6 @@ set(_cmake_feature_test_cxx_uniform_initialization "${MSVC_2013}")
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}")
@@ -30,6 +58,10 @@ 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}")
+# 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_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}")
@@ -42,24 +74,27 @@ 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_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/
-# 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)
diff --git a/Modules/Platform/Windows-MSVC-C.cmake b/Modules/Platform/Windows-MSVC-C.cmake
index cbe1586..c7792eb 100644
--- a/Modules/Platform/Windows-MSVC-C.cmake
+++ b/Modules/Platform/Windows-MSVC-C.cmake
@@ -3,3 +3,5 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 18.0)
set(_FS_C " /FS")
endif()
__windows_compiler_msvc(C)
+
+set(CMAKE_C_STANDARD_DEFAULT 90)
diff --git a/Modules/Platform/Windows-MSVC-CXX.cmake b/Modules/Platform/Windows-MSVC-CXX.cmake
index 89885b8..ad56f68 100644
--- a/Modules/Platform/Windows-MSVC-CXX.cmake
+++ b/Modules/Platform/Windows-MSVC-CXX.cmake
@@ -5,6 +5,11 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
endif()
__windows_compiler_msvc(CXX)
+# No version of MSVC has full conformance to C++11. Therefore the
+# __cplusplus macro always evaluates to 98 even if the compilers come with
+# C++11/14/+ features enabled.
+set(CMAKE_CXX_STANDARD_DEFAULT 98)
+
macro(cmake_record_cxx_compile_features)
record_compiler_features(CXX "" CMAKE_CXX_COMPILE_FEATURES)
endmacro()
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=797dc0cf0d3f1fba43a9689499c466f09ba2900d
commit 797dc0cf0d3f1fba43a9689499c466f09ba2900d
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 Jan 19 11:10:30 2015 -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()
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b69437a25d0132cd153d9a037207a440c9fa4815
commit b69437a25d0132cd153d9a037207a440c9fa4815
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Jan 15 21:55:18 2015 +0100
Commit: Robert Maynard <robert.maynard at kitware.com>
CommitDate: Mon Jan 19 11:10:29 2015 -0500
Extend test for MSVC.
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index 106f29c..11a9584 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -188,6 +188,25 @@ if (CMAKE_CXX_COMPILE_FEATURES)
-DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=0
)
endif()
+ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0)
+ add_definitions(
+ -DEXPECT_INHERITING_CONSTRUCTORS=1
+ -DEXPECT_FINAL=1
+ -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=1
+ )
+ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0)
+ add_definitions(
+ -DEXPECT_INHERITING_CONSTRUCTORS=0
+ -DEXPECT_FINAL=1
+ -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=0
+ )
+ else()
+ add_definitions(
+ -DEXPECT_INHERITING_CONSTRUCTORS=0
+ -DEXPECT_FINAL=0
+ -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=0
+ )
endif()
add_executable(CompileFeaturesGenex genex_test.cpp)
-----------------------------------------------------------------------
Summary of changes:
Modules/Compiler/MSVC-CXX-FeatureTests.cmake | 100 ++++++++++++++++++++
Modules/Platform/Windows-MSVC-C.cmake | 2 +
Modules/Platform/Windows-MSVC-CXX.cmake | 9 ++
Modules/WriteCompilerDetectionHeader.cmake | 5 +-
Tests/CompileFeatures/CMakeLists.txt | 20 ++++
.../WriteCompilerDetectionHeader/CMakeLists.txt | 16 +++-
Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake | 6 +-
7 files changed, 152 insertions(+), 6 deletions(-)
create mode 100644 Modules/Compiler/MSVC-CXX-FeatureTests.cmake
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list