From 6d9182795c3288a550b5121cdd2a9aa9e1a7b959 Mon Sep 17 00:00:00 2001 From: hoshinohikari Date: Mon, 17 Feb 2025 15:56:56 +0800 Subject: [PATCH] Fix cmake error caused by lack of environment variables in Windows environment --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d24db14..ddd4835 100644 --- a/setup.py +++ b/setup.py @@ -258,7 +258,7 @@ class CMakeBuild(BuildExtension): # CMake allows an arch-in-generator style for backward compatibility contains_arch = any(x in cmake_generator for x in {"ARM", "Win64"}) - if not single_config and not contains_arch: + if not single_config and not contains_arch and cmake_generator: cmake_args += ["-A", PLAT_TO_CMAKE[self.plat_name]] # Multi-config generators have a different way to specify configs