diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:13:17 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:13:17 +0900 |
commit | 5dfa20f6e3908ae58658cd105297f8aa3b4eb1d6 (patch) | |
tree | 7edb8aa96d464a81152f81bf0a6b85415f99999f /Modules | |
parent | a9a515dd6b7b96484920a3f0f1202393b91dfd2e (diff) | |
download | cmake-5dfa20f6e3908ae58658cd105297f8aa3b4eb1d6.tar.gz cmake-5dfa20f6e3908ae58658cd105297f8aa3b4eb1d6.tar.bz2 cmake-5dfa20f6e3908ae58658cd105297f8aa3b4eb1d6.zip |
Imported Upstream version 3.11.1upstream/3.11.1
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeParseImplicitLinkInfo.cmake | 2 | ||||
-rw-r--r-- | Modules/CheckIncludeFile.cmake | 3 | ||||
-rw-r--r-- | Modules/CheckIncludeFileCXX.cmake | 3 | ||||
-rw-r--r-- | Modules/CheckIncludeFiles.cmake | 3 | ||||
-rw-r--r-- | Modules/Compiler/MSVC-CXX-FeatureTests.cmake | 36 | ||||
-rw-r--r-- | Modules/FindOpenMP.cmake | 17 |
6 files changed, 20 insertions, 44 deletions
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index 63d18abec..935f92d96 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -142,7 +142,7 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj # We remove items that are not language-specific. set(implicit_libs "") foreach(lib IN LISTS implicit_libs_tmp) - if("x${lib}" MATCHES "^x(crt.*\\.o|gcc_eh.*|System.*|.*libclang_rt.*|msvcrt.*|libvcruntime.*|libucrt.*|libcmt.*)$") + if("x${lib}" MATCHES "^x(crt.*\\.o|gcc_eh.*|.*libgcc_eh.*|System.*|.*libclang_rt.*|msvcrt.*|libvcruntime.*|libucrt.*|libcmt.*)$") string(APPEND log " remove lib [${lib}]\n") elseif(IS_ABSOLUTE "${lib}") get_filename_component(abs "${lib}" ABSOLUTE) diff --git a/Modules/CheckIncludeFile.cmake b/Modules/CheckIncludeFile.cmake index 501fc9a1e..e5554c448 100644 --- a/Modules/CheckIncludeFile.cmake +++ b/Modules/CheckIncludeFile.cmake @@ -27,8 +27,6 @@ # list of macros to define (-DFOO=bar) # ``CMAKE_REQUIRED_INCLUDES`` # list of include directories -# ``CMAKE_REQUIRED_LIBRARIES`` -# list of libraries to link # ``CMAKE_REQUIRED_QUIET`` # execute quietly without messages # @@ -61,7 +59,6 @@ macro(CHECK_INCLUDE_FILE INCLUDE VARIABLE) ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.c COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} - LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS} "${CHECK_INCLUDE_FILE_C_INCLUDE_DIRS}" diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake index cdb25fb16..7948babfa 100644 --- a/Modules/CheckIncludeFileCXX.cmake +++ b/Modules/CheckIncludeFileCXX.cmake @@ -27,8 +27,6 @@ # list of macros to define (-DFOO=bar) # ``CMAKE_REQUIRED_INCLUDES`` # list of include directories -# ``CMAKE_REQUIRED_LIBRARIES`` -# list of libraries to link # ``CMAKE_REQUIRED_QUIET`` # execute quietly without messages # @@ -60,7 +58,6 @@ macro(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} - LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS} "${CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS}" diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake index 14db68cd0..59afdaba3 100644 --- a/Modules/CheckIncludeFiles.cmake +++ b/Modules/CheckIncludeFiles.cmake @@ -33,8 +33,6 @@ # list of macros to define (-DFOO=bar) # ``CMAKE_REQUIRED_INCLUDES`` # list of include directories -# ``CMAKE_REQUIRED_LIBRARIES`` -# list of libraries to link # ``CMAKE_REQUIRED_QUIET`` # execute quietly without messages # @@ -104,7 +102,6 @@ macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE) ${CMAKE_BINARY_DIR} ${src} COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} - LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILES_FLAGS} "${CHECK_INCLUDE_FILES_INCLUDE_DIRS}" diff --git a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake index 596958668..9c604f202 100644 --- a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake +++ b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake @@ -1,15 +1,20 @@ +# Reference: https://docs.microsoft.com/en-us/cpp/visual-cpp-language-conformance +# https://blogs.msdn.microsoft.com/vcblog/2015/06/19/c111417-features-in-vs-2015-rtm/ +# https://blogs.msdn.microsoft.com/vcblog/2013/12/02/c1114-core-language-features-in-vs-2013-and-the-nov-2013-ctp/ +# https://blogs.msdn.microsoft.com/vcblog/2011/09/12/c11-features-in-visual-c-11/ -# 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 -# http://blogs.msdn.com/b/vcblog/archive/2015/04/29/c-11-14-17-features-in-vs-2015-rc.aspx -# http://blogs.msdn.com/b/vcblog/archive/2015/06/19/c-11-14-17-features-in-vs-2015-rtm.aspx +set(_cmake_oldestSupported "_MSC_VER >= 1600") +# VS 2017 v15.3 fixes support for incomplete decltypes +# https://docs.microsoft.com/en-us/cpp/cpp-conformance-improvements-2017#update_153 +set(_cmake_feature_test_cxx_decltype_incomplete_return_types "_MSC_VER >= 1911") -set(_cmake_oldestSupported "_MSC_VER >= 1600") +set(MSVC_2017 "_MSC_VER >= 1910") +# VS 2017 introduces support for "N3652 Extended constexpr" +# but as of v15.6 there are still bugs in the implementation +#set(_cmake_feature_test_cxx_relaxed_constexpr "${MSVC_2017}") -# VS version 15 (not 2015) introduces support for aggregate initializers. +# VS 2017 Preview introduces support for aggregate initializers. set(_cmake_feature_test_cxx_aggregate_default_initializers "_MSC_FULL_VER >= 190024406") # VS 2015 Update 2 introduces support for variable templates. @@ -48,7 +53,6 @@ set(_cmake_feature_test_cxx_reference_qualified_functions "${MSVC_2015}") # lists this as 'partial' in 2013 set(_cmake_feature_test_cxx_deleted_functions "${MSVC_2015}") -set(MSVC_2013_v30723 "_MSC_FULL_VER >= 180030723") # 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 these # they silently produced bad code, and are now marked as having partial @@ -56,7 +60,7 @@ set(MSVC_2013_v30723 "_MSC_FULL_VER >= 180030723") # in MSVC 2015, so support the feature for that version, assuming that is true. # The blog post also says that VS 2013 Update 3 generates an error in cases # that previously produced bad code. -set(_cmake_feature_test_cxx_generalized_initializers "${MSVC_2013_v30723}") +set(_cmake_feature_test_cxx_generalized_initializers "_MSC_FULL_VER >= 180030723") set(MSVC_2013 "_MSC_VER >= 1800") set(_cmake_feature_test_cxx_alias_templates "${MSVC_2013}") @@ -98,20 +102,10 @@ 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: -# set(_cmake_feature_test_cxx_relaxed_constexpr ) -# 'NSDMIs for aggregates' -# set(_cmake_feature_test_cxx_aggregate_default_initializers ) - -# 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 +set(MSVC_2017) set(MSVC_2015) -set(MSVC_2013_v30723) set(MSVC_2013) set(MSVC_2012) set(MSVC_2010) diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake index ced092e5f..1bf589d26 100644 --- a/Modules/FindOpenMP.cmake +++ b/Modules/FindOpenMP.cmake @@ -240,19 +240,10 @@ function(_OPENMP_GET_FLAGS LANG FLAG_MODE OPENMP_FLAG_VAR OPENMP_LIB_NAMES_VAR) endforeach() set("${OPENMP_LIB_NAMES_VAR}" "${_OPENMP_LIB_NAMES}" PARENT_SCOPE) else() - # The Intel compiler on windows has no verbose mode, so we need to treat it explicitly - if("${CMAKE_${LANG}_COMPILER_ID}" STREQUAL "Intel" AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") - set("${OPENMP_LIB_NAMES_VAR}" "libiomp5md" PARENT_SCOPE) - find_library(OpenMP_libiomp5md_LIBRARY - NAMES "libiomp5md" - HINTS ${CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES} - CMAKE_FIND_ROOT_PATH_BOTH - NO_DEFAULT_PATH - ) - mark_as_advanced(OpenMP_libiomp5md_LIBRARY) - else() - set("${OPENMP_LIB_NAMES_VAR}" "" PARENT_SCOPE) - endif() + # We do not know how to extract implicit OpenMP libraries for this compiler. + # Assume that it handles them automatically, e.g. the Intel Compiler on + # Windows should put the dependency in its object files. + set("${OPENMP_LIB_NAMES_VAR}" "" PARENT_SCOPE) endif() break() endif() |