mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-21 19:05:00 +01:00
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.
This commit is contained in:
14
.github/workflows/build_bin.yml
vendored
14
.github/workflows/build_bin.yml
vendored
@@ -88,14 +88,18 @@ jobs:
|
|||||||
run: |
|
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
|
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"
|
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 ^
|
cmake -S . -B build ^
|
||||||
-G Ninja ^
|
-G Ninja ^
|
||||||
-DCMAKE_BUILD_TYPE=%CONFIG_WIN% ^
|
-DCMAKE_BUILD_TYPE=%CONFIG_WIN% ^
|
||||||
-DCMAKE_C_COMPILER="%ProgramFiles%/LLVM/bin/clang.exe" ^
|
-DCMAKE_C_COMPILER="%LLVMBIN%/clang.exe" ^
|
||||||
-DCMAKE_CXX_COMPILER="%ProgramFiles%/LLVM/bin/clang++.exe" ^
|
-DCMAKE_CXX_COMPILER="%LLVMBIN%/clang++.exe" ^
|
||||||
-DCMAKE_RC_COMPILER="%ProgramFiles%/LLVM/bin/llvm-rc.exe" ^
|
-DCMAKE_RC_COMPILER="%LLVMBIN%/llvm-rc.exe" ^
|
||||||
-DPython3_ROOT_DIR=%PYROOT%
|
-DPython3_ROOT_DIR="%PYROOT%"
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: cmd
|
shell: cmd
|
||||||
|
|||||||
Reference in New Issue
Block a user