File tree Expand file tree Collapse file tree 2 files changed +12
-22
lines changed
Expand file tree Collapse file tree 2 files changed +12
-22
lines changed Original file line number Diff line number Diff line change 7171 # Build Arm Zephyr Preset
7272 cmake --preset ${{ matrix.preset }}
7373 cmake --build cmake-out -j$(( $(nproc) - 1 ))
74+
7475 linux :
7576 uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
7677 strategy :
@@ -117,26 +118,9 @@ jobs:
117118 timeout : 90
118119 script : |
119120 set -eux
120- conda init powershell
121- powershell -Command "& {
122- Set-PSDebug -Trace 1
123- \$ErrorActionPreference = 'Stop'
124- \$PSNativeCommandUseErrorActionPreference = \$true
125-
126- conda create --yes --quiet -n et python=3.12
127- conda activate et
128- python install_requirements.py
121+ conda create --yes --quiet -n et python=3.12
122+ conda activate et
129123
130- cmake --preset ${{ matrix.preset }} -T ClangCL
131- if (\$LASTEXITCODE -ne 0) {
132- Write-Host "CMake configuration was unsuccessful. Exit code: \$LASTEXITCODE."
133- exit \$LASTEXITCODE
134- }
135-
136- \$numCores = [System.Environment]::GetEnvironmentVariable('NUMBER_OF_PROCESSORS') - 1
137- cmake --build cmake-out -j \$numCores
138- if (\$LASTEXITCODE -ne 0) {
139- Write-Host "CMake build was unsuccessful. Exit code: \$LASTEXITCODE."
140- exit \$LASTEXITCODE
141- }
142- }"
124+ ./install_requirements.sh
125+ cmake -G "Visual Studio 17 2022" -T ClangCL --preset ${{ matrix.preset }}
126+ cmake --build cmake-out -j$(( $(nproc) - 1 ))
Original file line number Diff line number Diff line change @@ -74,6 +74,12 @@ if(NOT CMAKE_BUILD_TYPE)
7474endif ()
7575announce_configured_options(CMAKE_BUILD_TYPE )
7676
77+ if (WIN32 )
78+ if (NOT "${CMAKE_GENERATOR_TOOLSET} " STREQUAL "" AND NOT CMAKE_GENERATOR_TOOLSET MATCHES "Clang" )
79+ message (FATAL_ERROR "Windows requires clang. Pass '-T ClangCL' in the cmake build command. Current CMAKE_GENERATOR_TOOLSET: ${CMAKE_GENERATOR_TOOLSET} " )
80+ endif ()
81+ endif ()
82+
7783if (NOT PYTHON_EXECUTABLE)
7884 resolve_python_executable()
7985endif ()
You can’t perform that action at this time.
0 commit comments