diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-04-06 13:55:37 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-01-11 15:47:58 (GMT) |
commit | 225c0ef88bf21c39694b51798390b87328a163de (patch) | |
tree | b14893c8e99b177d01edd660fa4e935e3543c498 /Modules | |
parent | a15675efc3d96906d4e803def2e83fd3bd1cf812 (diff) | |
download | CMake-225c0ef88bf21c39694b51798390b87328a163de.zip CMake-225c0ef88bf21c39694b51798390b87328a163de.tar.gz CMake-225c0ef88bf21c39694b51798390b87328a163de.tar.bz2 |
Features: Record for MSVC 2010-2013.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Compiler/MSVC-CXX-FeatureTests.cmake | 65 | ||||
-rw-r--r-- | Modules/Platform/Windows-MSVC-CXX.cmake | 4 |
2 files changed, 69 insertions, 0 deletions
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() |