From a1285106b3a780e9318181d1f2e9747b55d0ffff Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 28 Jan 2022 09:00:43 +0800 Subject: [PATCH] VS lower than 9 can only use NMake generator on CMake --- tool/quick_start/configure_toolchains.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tool/quick_start/configure_toolchains.py b/tool/quick_start/configure_toolchains.py index b2843eebc..18d556ccb 100644 --- a/tool/quick_start/configure_toolchains.py +++ b/tool/quick_start/configure_toolchains.py @@ -23,7 +23,12 @@ for ts in SortedToolsets: for platform in VSPlatforms: toolchain = {} toolchain["Compiler"] = "MSVC" - toolchain["Generator"] = vs["Name"] + if vs["Version"] >= 9: + toolchain["Generator"] = vs["Name"] + else: + # https://cmake.org/cmake/help/latest/generator/Visual%20Studio%208%202005.html + # Must set VCVars ahead of compiling! + toolchain["Generator"] = "NMake Makefiles" toolchain["Platform"] = platform toolchain["Toolset"] = ts toolchain["Prefix"] = FindVSPrefixPaths(ts, platform)