From ba526242b9fc7624e1b64c193e2c8f5c66eb3ff6 Mon Sep 17 00:00:00 2001 From: John Parent Date: Wed, 11 Nov 2026 16:25:25 -0500 Subject: [PATCH] Win: set SKBUILD_DIR to allow for shallower build Signed-off-by: John Parent --- pyproject.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e0c79d8..89381eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -106,4 +106,9 @@ test-command = "pytest --import-mode=importlib {project}/tests/test_castxml.py" # Build with Ninja instead of Visual Studio/MSBuild: much faster for LLVM, and # the superbuild switches its LLVM/Clang/CastXML builds to Ninja whenever it # finds ninja anyway. The workflow sets up the MSVC environment Ninja needs. -environment = { CMAKE_GENERATOR = "Ninja" } +# +# Build in a short directory at the drive root. The LLVM build nests deeply +# (FetchContent, then the superbuild's ExternalProjects), and under the default +# %TEMP%\cibw-sdist-*\castxml-\build\ its paths exceed what +# the MSVC tools can open (MAX_PATH), even with Windows long paths enabled. +environment = { CMAKE_GENERATOR = "Ninja", SKBUILD_BUILD_DIR = "C:/cxb" }