diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeParseImplicitIncludeInfo.cmake | 8 | ||||
-rw-r--r-- | Modules/Compiler/ARMCC-DetermineCompiler.cmake | 2 | ||||
-rw-r--r-- | Modules/InstallRequiredSystemLibraries.cmake | 23 | ||||
-rw-r--r-- | Modules/Platform/Windows-MSVC.cmake | 5 |
4 files changed, 27 insertions, 11 deletions
diff --git a/Modules/CMakeParseImplicitIncludeInfo.cmake b/Modules/CMakeParseImplicitIncludeInfo.cmake index c8d4c5a..c42474b 100644 --- a/Modules/CMakeParseImplicitIncludeInfo.cmake +++ b/Modules/CMakeParseImplicitIncludeInfo.cmake @@ -216,6 +216,14 @@ function(cmake_parse_implicit_include_info text lang dir_var log_var state_var) get_filename_component(dir "${d}" ABSOLUTE) list(APPEND implicit_dirs "${dir}") string(APPEND log " collapse include dir [${d}] ==> [${dir}]\n") + elseif("${d}" MATCHES [[^\.\.[\/]\.\.[\/](.*)$]]) + # This relative path is deep enough to get out of the CMakeFiles/CMakeTmp + # directory where the ABI check is done. Assume that the compiler has + # computed this path adaptively based on the current working directory + # such that the effective result is absolute. + get_filename_component(dir "${CMAKE_BINARY_DIR}/${CMAKE_MATCH_1}" ABSOLUTE) + list(APPEND implicit_dirs "${dir}") + string(APPEND log " collapse relative include dir [${d}] ==> [${dir}]\n") else() string(APPEND log " skipping relative include dir [${d}]\n") endif() diff --git a/Modules/Compiler/ARMCC-DetermineCompiler.cmake b/Modules/Compiler/ARMCC-DetermineCompiler.cmake index a3667d7..5f2d0f8 100644 --- a/Modules/Compiler/ARMCC-DetermineCompiler.cmake +++ b/Modules/Compiler/ARMCC-DetermineCompiler.cmake @@ -1,5 +1,5 @@ # ARMCC Toolchain -set(_compiler_id_pp_test "defined(__ARMCC_VERSION)") +set(_compiler_id_pp_test "defined(__ARMCC_VERSION) && !defined(__clang__)") set(_compiler_id_version_compute " #if __ARMCC_VERSION >= 1000000 diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 5ba8687..2f34a7a 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -210,20 +210,25 @@ if(MSVC) set(_MSVC_IDE_VERSION "") if(MSVC_VERSION GREATER_EQUAL 2000) message(WARNING "MSVC ${MSVC_VERSION} not yet supported.") - elseif(MSVC_TOOLSET_VERSION) - set(MSVC_REDIST_NAME VC${MSVC_TOOLSET_VERSION}) + elseif(MSVC_VERSION_VERSION GREATER_EQUAL 143) + message(WARNING "MSVC toolset v${MSVC_VERSION_VERSION} not yet supported.") + elseif(MSVC_TOOLSET_VERSION EQUAL 142) + # FIXME: VS 2019 RC 4 uses VC141 but an update will fix it to be VC142. + set(MSVC_REDIST_NAME VC141) + set(_MSVC_DLL_VERSION 140) + set(_MSVC_IDE_VERSION 16) + elseif(MSVC_TOOLSET_VERSION EQUAL 141) + set(MSVC_REDIST_NAME VC141) + set(_MSVC_DLL_VERSION 140) + set(_MSVC_IDE_VERSION 15) if(MSVC_VERSION EQUAL 1910) # VS2017 named this differently prior to update 3. set(MSVC_REDIST_NAME VC150) endif() - + elseif(MSVC_TOOLSET_VERSION) + set(MSVC_REDIST_NAME VC${MSVC_TOOLSET_VERSION}) math(EXPR _MSVC_DLL_VERSION "${MSVC_TOOLSET_VERSION} / 10 * 10") - - if(MSVC_TOOLSET_VERSION EQUAL 141) - set(_MSVC_IDE_VERSION 15) - else() - math(EXPR _MSVC_IDE_VERSION "${MSVC_TOOLSET_VERSION} / 10") - endif() + math(EXPR _MSVC_IDE_VERSION "${MSVC_TOOLSET_VERSION} / 10") endif() set(_MSVCRT_DLL_VERSION "") diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 2daf313..a6448a0 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -71,7 +71,10 @@ if(NOT MSVC_VERSION) message(FATAL_ERROR "MSVC compiler version not detected properly: ${_compiler_version}") endif() - if(MSVC_VERSION GREATER_EQUAL 1910) + if(MSVC_VERSION GREATER_EQUAL 1920) + # VS 2019 or greater + set(MSVC_TOOLSET_VERSION 142) + elseif(MSVC_VERSION GREATER_EQUAL 1910) # VS 2017 or greater set(MSVC_TOOLSET_VERSION 141) elseif(MSVC_VERSION EQUAL 1900) |