From 31eb340cb68172874f5ad6d1fd7b3cb286a8615c Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Thu, 19 Sep 2013 17:18:35 +0000 Subject: [PATCH] msbuild: Set _MSC_VER to match the CRT we're using Various Windows SDK headers use _MSC_VER values to figure out what version of the VC++ headers they're using, in particular for SAL macros. Patch by Paul Hampson! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191015 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/msbuild/CMakeLists.txt | 3 +++ tools/msbuild/Microsoft.Cpp.Win32.llvm.props.in | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/tools/msbuild/CMakeLists.txt b/tools/msbuild/CMakeLists.txt index 8de3b881544..894645a4562 100644 --- a/tools/msbuild/CMakeLists.txt +++ b/tools/msbuild/CMakeLists.txt @@ -8,14 +8,17 @@ if (WIN32) set(REG_KEY "${CMAKE_PROJECT_NAME} ${CPACK_PACKAGE_VERSION}") set(VS_VERSION "v100") + set(MSC_VERSION "1600") configure_file(${prop_file_in} ${prop_file_v100}) set(VS_VERSION "v110") + set(MSC_VERSION "1700") configure_file(${prop_file_in} ${prop_file_v110}) set(VS_VERSION "v110_xp") configure_file(${prop_file_in} ${prop_file_v110_xp}) set(REG_KEY) set(VS_VERSION) + set(MSC_VERSION) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v100}" DESTINATION tools/msbuild) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v110}" DESTINATION tools/msbuild) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v110_xp}" DESTINATION tools/msbuild) diff --git a/tools/msbuild/Microsoft.Cpp.Win32.llvm.props.in b/tools/msbuild/Microsoft.Cpp.Win32.llvm.props.in index 07e931f95fa..fce601132b6 100644 --- a/tools/msbuild/Microsoft.Cpp.Win32.llvm.props.in +++ b/tools/msbuild/Microsoft.Cpp.Win32.llvm.props.in @@ -7,4 +7,11 @@ $(LLVMInstallDir)\msbuild-bin;$(ExecutablePath) $(LLVMInstallDir)\lib\clang\3.4\lib\windows;$(LibraryPath) + + + + + -fmsc-version=@MSC_VERSION@ %(AdditionalOptions) + + -- 2.34.1