[Cmake-commits] CMake branch, next, updated. v3.1.0-1423-gce73c53
Robert Maynard
robert.maynard at kitware.com
Tue Dec 30 17:11:45 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 ce73c53c7a64d31432739f434f222cfa904c1aec (commit)
via edcf86ec3a75e89ce3805c6db371b98b1adeb16e (commit)
via a114dfa05df5936c312645171b741ac8279ad1d9 (commit)
via 1a6b7625ffdb65ed0433bfab9676df6552e8e0cb (commit)
via f79180f555b3e92b456fde6a5d033128a47c6d4f (commit)
via 6c8e8e6db6e38c7e89f1932874ebb73293ca4f56 (commit)
via 85c494047afcdc5fa05965ca0dddf6fd5f44d4d0 (commit)
via 9dfde24f8fb3ae25da5814168fff4083231f6b85 (commit)
from 8cdd0d4208bb8782049cdc750bd516f96d5b5cba (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=ce73c53c7a64d31432739f434f222cfa904c1aec
commit ce73c53c7a64d31432739f434f222cfa904c1aec
Merge: 8cdd0d4 edcf86e
Author: Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Tue Dec 30 17:11:44 2014 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Dec 30 17:11:44 2014 -0500
Merge topic 'feature_record_msvc' into next
edcf86ec Features: Don't test cxx_decltype_incomplete_return_types with MSVC.
a114dfa0 Feature: Correct initializer lists to be supported in 2015 and above.
1a6b7625 Compile Features: Can't use final as only MSVC 2015 and above support it.
f79180f5 Features: Teach windows msvc which are the default compiler versions.
6c8e8e6d Features: test features actually supported by MSVC min supported.
85c49404 Features: Teach windows msvc which are the default compiler versions.
9dfde24f Features: Don't test cxx_contextual_conversions with MSVC.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=edcf86ec3a75e89ce3805c6db371b98b1adeb16e
commit edcf86ec3a75e89ce3805c6db371b98b1adeb16e
Author: Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Tue Dec 30 15:43:52 2014 -0500
Commit: Robert Maynard <robert.maynard at kitware.com>
CommitDate: Tue Dec 30 16:25:06 2014 -0500
Features: Don't test cxx_decltype_incomplete_return_types with MSVC.
VS2012 and above to conform to cxx_decltype_incomplete_return_types
proposal, but without support for auto return types the dcl.type.simple
example in the proposal doesn't compile.
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index cc3dd9c..d6f39bf 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -26,7 +26,19 @@ get_property(c_features GLOBAL PROPERTY CMAKE_C_KNOWN_FEATURES)
foreach(feature ${c_features})
run_test(${feature} C)
endforeach()
+
get_property(cxx_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES)
+
+#blacklist for msvc
+if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ list(REMOVE_ITEM cxx_features
+ #This test requires auto return type deduction to work properly, but
+ #that is not supported by all versions of MSVC that support decltype
+ #incomplete return types.
+ cxx_decltype_incomplete_return_types
+ )
+endif()
+
foreach(feature ${cxx_features})
run_test(${feature} CXX)
endforeach()
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a114dfa05df5936c312645171b741ac8279ad1d9
commit a114dfa05df5936c312645171b741ac8279ad1d9
Author: Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Tue Dec 30 16:00:29 2014 -0500
Commit: Robert Maynard <robert.maynard at kitware.com>
CommitDate: Tue Dec 30 16:25:05 2014 -0500
Feature: Correct initializer lists to be supported in 2015 and above.
Previous Visual Studio releases said they supported initializer lists but
silently produced bad code.
diff --git a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake
index 50e0cbe..2dba314 100644
--- a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake
@@ -14,6 +14,11 @@ 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}")
+# 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}")
@@ -33,8 +38,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}")
@@ -85,6 +88,7 @@ set(_cmake_feature_test_cxx_variadic_macros "${MSVC_2010}")
# set(_cmake_feature_test_cxx_relaxed_constexpr )
# set(_cmake_feature_test_cxx_variable_templates )
+
#Unset all the variables that we don't need exposed.
#_cmake_oldestSupported is required by WriteCompilerDetectionHeader
set(MSVC_2015)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1a6b7625ffdb65ed0433bfab9676df6552e8e0cb
commit 1a6b7625ffdb65ed0433bfab9676df6552e8e0cb
Author: Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Tue Dec 30 15:03:54 2014 -0500
Commit: Robert Maynard <robert.maynard at kitware.com>
CommitDate: Tue Dec 30 15:03:54 2014 -0500
Compile Features: Can't use final as only MSVC 2015 and above support it.
diff --git a/Tests/CompileFeatures/genex_test.cpp b/Tests/CompileFeatures/genex_test.cpp
index ca38883..1d30884 100644
--- a/Tests/CompileFeatures/genex_test.cpp
+++ b/Tests/CompileFeatures/genex_test.cpp
@@ -8,7 +8,7 @@ struct A
virtual int getA() { return 7; }
};
-struct B final : A
+struct B : A
{
int getA() override { return 42; }
};
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f79180f555b3e92b456fde6a5d033128a47c6d4f
commit f79180f555b3e92b456fde6a5d033128a47c6d4f
Author: Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Tue Dec 30 14:59:15 2014 -0500
Commit: Robert Maynard <robert.maynard at kitware.com>
CommitDate: Tue Dec 30 14:59:15 2014 -0500
Features: Teach windows msvc which are the default compiler versions.
diff --git a/Modules/Platform/Windows-MSVC-CXX.cmake b/Modules/Platform/Windows-MSVC-CXX.cmake
index 2a3f79a..d0599f9 100644
--- a/Modules/Platform/Windows-MSVC-CXX.cmake
+++ b/Modules/Platform/Windows-MSVC-CXX.cmake
@@ -5,12 +5,10 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
endif()
__windows_compiler_msvc(CXX)
-if(MSVC_VERSION LESS 1600)
- set(CMAKE_CXX_STANDARD_DEFAULT 98)
-elseif(MSVC_VERSION EQUAL 1600 OR MSVC_VERSION GREATER 1600)
- #all versions starting with 2010 and above default to c++11
- set(CMAKE_CXX_STANDARD_DEFAULT 11)
-endif()
+#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)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c8e8e6db6e38c7e89f1932874ebb73293ca4f56
commit 6c8e8e6db6e38c7e89f1932874ebb73293ca4f56
Author: Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Tue Dec 30 14:49:39 2014 -0500
Commit: Robert Maynard <robert.maynard at kitware.com>
CommitDate: Tue Dec 30 14:49:39 2014 -0500
Features: test features actually supported by MSVC min supported.
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index 072dfce..cc3dd9c 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -136,9 +136,9 @@ if (CMAKE_CXX_COMPILE_FEATURES)
target_compile_features(CompileFeaturesGenex2 PRIVATE cxx_static_assert)
target_compile_definitions(CompileFeaturesGenex2 PRIVATE HAVE_OVERRIDE_CONTROL=$<COMPILE_FEATURES:cxx_override>)
- add_library(noexcept_iface INTERFACE)
- target_compile_features(noexcept_iface INTERFACE cxx_noexcept)
+ add_library(nullptr_iface INTERFACE)
+ target_compile_features(nullptr_iface INTERFACE cxx_nullptr)
add_executable(CompileFeaturesGenex3 genex_test.cpp)
- target_link_libraries(CompileFeaturesGenex3 PRIVATE noexcept_iface)
+ target_link_libraries(CompileFeaturesGenex3 PRIVATE nullptr_iface)
target_compile_definitions(CompileFeaturesGenex3 PRIVATE HAVE_OVERRIDE_CONTROL=$<COMPILE_FEATURES:cxx_override>)
endif()
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=85c494047afcdc5fa05965ca0dddf6fd5f44d4d0
commit 85c494047afcdc5fa05965ca0dddf6fd5f44d4d0
Author: Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Tue Dec 30 14:41:07 2014 -0500
Commit: Robert Maynard <robert.maynard at kitware.com>
CommitDate: Tue Dec 30 14:41:07 2014 -0500
Features: Teach windows msvc which are the default compiler versions.
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..2a3f79a 100644
--- a/Modules/Platform/Windows-MSVC-CXX.cmake
+++ b/Modules/Platform/Windows-MSVC-CXX.cmake
@@ -5,6 +5,13 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
endif()
__windows_compiler_msvc(CXX)
+if(MSVC_VERSION LESS 1600)
+ set(CMAKE_CXX_STANDARD_DEFAULT 98)
+elseif(MSVC_VERSION EQUAL 1600 OR MSVC_VERSION GREATER 1600)
+ #all versions starting with 2010 and above default to c++11
+ set(CMAKE_CXX_STANDARD_DEFAULT 11)
+endif()
+
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=9dfde24f8fb3ae25da5814168fff4083231f6b85
commit 9dfde24f8fb3ae25da5814168fff4083231f6b85
Author: Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Tue Dec 30 12:21:33 2014 -0500
Commit: Robert Maynard <robert.maynard at kitware.com>
CommitDate: Tue Dec 30 14:02:30 2014 -0500
Features: Don't test cxx_contextual_conversions with MSVC.
VS2013 and above to conform to the updated cxx_contextual_conversions proposal,
but VS2010 and above pass the test. I am hesitant to say that VS2010 and above
meet all the requirements of the proposal currently.
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index 0ff8ea4..072dfce 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.1)
project(CompileFeatures)
@@ -31,13 +31,13 @@ foreach(feature ${cxx_features})
run_test(${feature} CXX)
endforeach()
-if (CMAKE_CXX_COMPILER_ID STREQUAL GNU
+if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
list(REMOVE_ITEM CXX_non_features
cxx_alignof
)
endif()
-if (CMAKE_CXX_COMPILER_ID STREQUAL GNU
+if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
# GNU prior to 4.9 does not set any preprocessor define to distinguish
# c++1y from c++11, so CMake does not support c++1y features before GNU 4.9.
@@ -50,6 +50,14 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL GNU
cxx_return_type_deduction
)
endif()
+if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ list(REMOVE_ITEM CXX_non_features
+ #Micrsoft only officially supports this feature in VS2013 and above, due
+ #to new wording of the proposal. We don't test for this with MSVC because
+ #older compiler pass the test but might not actually conform
+ cxx_contextual_conversions
+ )
+endif()
set(C_ext c)
set(C_standard_flag 11)
-----------------------------------------------------------------------
Summary of changes:
Modules/Compiler/MSVC-CXX-FeatureTests.cmake | 8 ++++++--
Modules/Platform/Windows-MSVC-C.cmake | 2 ++
Modules/Platform/Windows-MSVC-CXX.cmake | 5 +++++
Tests/CompileFeatures/CMakeLists.txt | 18 +++++++++++++++---
Tests/CompileFeatures/genex_test.cpp | 2 +-
5 files changed, 29 insertions(+), 6 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list