From 7c027b7c7254ddd06e9178680090b7321d020c44 Mon Sep 17 00:00:00 2001 From: Russell Gallop Date: Tue, 30 Apr 2019 12:37:10 +0000 Subject: [PATCH] [cmake] Fix error message on simulated VS version check For clang-cl self hosts in VS2015 environment this was reporting: "Host Clang must have at least -fms-compatibility-version=19.00.24213.1, your version is 9.0.0". This check fires as CMake detects the simulated environment as _MSC_VER 1900, which is truncated. This makes it less than the required 19.00.24213.1. Differential revision: https://reviews.llvm.org/D61188 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359556 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/modules/CheckCompilerVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/CheckCompilerVersion.cmake b/cmake/modules/CheckCompilerVersion.cmake index 125a9537e61..1ee7832c482 100644 --- a/cmake/modules/CheckCompilerVersion.cmake +++ b/cmake/modules/CheckCompilerVersion.cmake @@ -50,7 +50,7 @@ check_compiler_version("MSVC" "Visual Studio" ${MSVC_MIN} ${MSVC_SOFT_ERROR}) if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") if (CMAKE_CXX_SIMULATE_ID MATCHES "MSVC") if (CMAKE_CXX_SIMULATE_VERSION VERSION_LESS MSVC_MIN) - message(FATAL_ERROR "Host Clang must have at least -fms-compatibility-version=${MSVC_MIN}, your version is ${CMAKE_CXX_COMPILER_VERSION}.") + message(FATAL_ERROR "Host Clang must have at least -fms-compatibility-version=${MSVC_MIN}, your version is ${CMAKE_CXX_SIMULATE_VERSION}.") endif() set(CLANG_CL 1) elseif(NOT LLVM_ENABLE_LIBCXX) -- 2.40.0