Skip to content

Commit

Permalink
Eliminate CMAKE dependency when not required (dotnet#21040)
Browse files Browse the repository at this point in the history
  • Loading branch information
danmoseley authored and stephentoub committed Nov 16, 2018
1 parent 2fe48b4 commit 15c6593
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
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
File renamed without changes.

0 comments on commit 15c6593

Please sign in to comment.