From 14e12582b6e447957bf9273d57d8133727b0a083 Mon Sep 17 00:00:00 2001 From: maj00r Date: Thu, 10 Sep 2026 13:57:08 +0200 Subject: [PATCH] give CMake forward slashes on Windows CMake writes the compiler paths verbatim into CMakeRCCompiler.cmake and friends, where a backslash starts an escape sequence, so %ProgramFiles% arrived as "C:\Program Files/LLVM/..." and tripped on \P. Same trap waits for the Python root at C:\hostedtoolcache. --- .github/workflows/build_bin.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_bin.yml b/.github/workflows/build_bin.yml index 97c53a8b..2ffd4257 100644 --- a/.github/workflows/build_bin.yml +++ b/.github/workflows/build_bin.yml @@ -88,14 +88,18 @@ jobs: run: | for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do set VSPATH=%%i call "%VSPATH%\VC\Auxiliary\Build\vcvars64.bat" - for %%p in ("${{ steps.python.outputs.python-path }}") do set PYROOT=%%~dpp + for %%p in ("${{ steps.python.outputs.python-path }}") do set "PYROOT=%%~dpp" + rem CMake writes these paths verbatim into its own .cmake files, where a + rem backslash starts an escape: "C:\Program Files" would be read as \P. + set "LLVMBIN=%ProgramFiles:\=/%/LLVM/bin" + set "PYROOT=%PYROOT:\=/%" cmake -S . -B build ^ -G Ninja ^ -DCMAKE_BUILD_TYPE=%CONFIG_WIN% ^ - -DCMAKE_C_COMPILER="%ProgramFiles%/LLVM/bin/clang.exe" ^ - -DCMAKE_CXX_COMPILER="%ProgramFiles%/LLVM/bin/clang++.exe" ^ - -DCMAKE_RC_COMPILER="%ProgramFiles%/LLVM/bin/llvm-rc.exe" ^ - -DPython3_ROOT_DIR=%PYROOT% + -DCMAKE_C_COMPILER="%LLVMBIN%/clang.exe" ^ + -DCMAKE_CXX_COMPILER="%LLVMBIN%/clang++.exe" ^ + -DCMAKE_RC_COMPILER="%LLVMBIN%/llvm-rc.exe" ^ + -DPython3_ROOT_DIR="%PYROOT%" - name: Build shell: cmd