Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Eliminate CMake check when CMake isn't going to be used #21040

Merged
merged 1 commit into from
Nov 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build-test.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ if not exist "%__LogsDir%" md "%__LogsDir%"

echo %__MsgPrefix%Checking prerequisites

REM Eval the output from probe-win1.ps1
for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy ByPass "& ""%__SourceDir%\pal\tools\probe-win.ps1"""') do %%a
REM Eval the output from set-cmake-path.ps1
for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy ByPass "& ""%__SourceDir%\pal\tools\set-cmake-path.ps1"""') do %%a

REM =========================================================================================
REM ===
Expand Down
9 changes: 7 additions & 2 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,13 @@ REM Set the remaining variables based upon the determined build configuration

echo %__MsgPrefix%Checking prerequisites

REM Eval the output from probe-win1.ps1
for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy ByPass "& ""%__SourceDir%\pal\tools\probe-win.ps1"""') do %%a
set __CMakeNeeded=1
if %__BuildNative%==0 if %__BuildNativeCoreLib%==0 if %__BuildTests%==0 set __CMakeNeeded=0
if %__CMakeNeeded%==1 (
REM Eval the output from set-cmake-path.ps1
for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy ByPass "& ""%__SourceDir%\pal\tools\set-cmake-path.ps1"""') do %%a
REM echo Using CMake from %CMakePath%
)

REM NumberOfCores is an WMI property providing number of physical cores on machine
REM processor(s). It is used to set optimal level of CL parallelism during native build step
Expand Down
4 changes: 2 additions & 2 deletions src/pal/tools/gen-buildsys-win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ goto loop

if defined CMakePath goto DoGen

:: Eval the output from probe-win1.ps1
for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy ByPass "& "%basePath%\probe-win.ps1""') do %%a
:: Eval the output from set-cmake-path.ps1
for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy ByPass "& "%basePath%\set-cmake-path.ps1""') do %%a

:DoGen
"%CMakePath%" "-DCMAKE_USER_MAKE_RULES_OVERRIDE=%basePath%\windows-compiler-override.txt" "-DCMAKE_INSTALL_PREFIX:PATH=$ENV{__CMakeBinDir}" "-DCLR_CMAKE_HOST_ARCH=%__Arch%" %__ExtraCmakeParams% -G "%__CmakeGenerator%" %__SourceDir%
Expand Down