From d860d23e1a9c41ded126e54cae3c05ed9b869805 Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Tue, 5 Jun 2018 07:25:37 -0600 Subject: make.bat: cache the vcredist directory. When run from make.bat the environment is setup correctly and the VCToolsRedistDir environment variable exists, on later invocations of cmake this may no longer be the case and a warning was emitted about the missing runtime. we can't rely on InstallRequiredSystemLibraries.cmake here since it uses the compiler version to figure out the correct location and it doesn't know how to deal with clang. --- build_files/cmake/platform/platform_win32.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'build_files') diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index 6e049c0048f..ec70f11ea22 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -31,7 +31,8 @@ endif() if(CMAKE_C_COMPILER_ID MATCHES "Clang") set(MSVC_CLANG On) - set(MSVC_REDIST_DIR $ENV{VCToolsRedistDir}) + set(VC_TOOLS_DIR $ENV{VCToolsRedistDir} CACHE STRING "Location of the msvc redistributables") + set(MSVC_REDIST_DIR ${VC_TOOLS_DIR}) if (DEFINED MSVC_REDIST_DIR) file(TO_CMAKE_PATH ${MSVC_REDIST_DIR} MSVC_REDIST_DIR) else() -- cgit v1.2.3