File tree Expand file tree Collapse file tree 2 files changed +25
-6
lines changed Expand file tree Collapse file tree 2 files changed +25
-6
lines changed Original file line number Diff line number Diff line change 1+ # https://discourse.cmake.org/t/how-to-configure-cmake-on-windows-to-use-clang-cl-with-ninja-multi-config-for-intel-32-bits-intel-64-bits-and-arm64-coming-from-visual-studio/3430/10
2+ # https://gitlab.kitware.com/cmake/cmake/-/blob/master/.gitlab/ci/vcvarsall.ps1
3+
4+ $erroractionpreference = " stop"
5+
6+ cmd / c " `" $env: VCVARSALL `" $env: VCVARSPLATFORM -vcvars_ver=$env: VCVARSVERSION & set" |
7+ foreach {
8+ if ($_ -match " =" ) {
9+ $v = $_.split (" =" )
10+ [Environment ]::SetEnvironmentVariable($v [0 ], $v [1 ])
11+ }
12+ }
Original file line number Diff line number Diff line change 3131
3232 clang :
3333 name : Clang w/o MPI shared debug
34- runs-on : windows-latest
34+ runs-on : windows-2022
3535 if : github.event.pull_request.draft == false
3636 steps :
3737 - uses : actions/checkout@v3
@@ -41,15 +41,22 @@ jobs:
4141 - uses : seanmiddleditch/gha-setup-ninja@master
4242 - name : Build
4343 run : |
44+ $Env:VCVARSALL = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\vc\Auxiliary\build\vcvarsall.bat"
45+ $Env:VCVARSPLATFORM = "x64"
46+ $Env:VCVARSVERSION = "14.36"
47+ Invoke-Expression -Command .github/ci/vcvarsall.ps1
48+
4449 python3 -m pip install -U pip setuptools wheel pytest
4550 python3 -m pip install -U cmake
4651 python3 -m pip install -r requirements.txt
4752
48- cmake -S . -B build `
49- -T "ClangCl" `
50- -DCMAKE_VERBOSE_MAKEFILE=ON `
51- -DBUILD_SHARED_LIBS=ON `
52- -DAMReX_MPI=OFF `
53+ cmake -S . -B build `
54+ -G "Ninja" `
55+ -DCMAKE_C_COMPILER=clang-cl `
56+ -DCMAKE_CXX_COMPILER=clang-cl `
57+ -DCMAKE_VERBOSE_MAKEFILE=ON `
58+ -DBUILD_SHARED_LIBS=ON `
59+ -DAMReX_MPI=OFF `
5360 -DAMReX_SPACEDIM="1;2;3"
5461 if(!$?) { Exit $LASTEXITCODE }
5562
You can’t perform that action at this time.
0 commit comments