diff options
author | Dan Moseley <danmose@microsoft.com> | 2018-11-16 07:14:11 -0800 |
---|---|---|
committer | Stephen Toub <stoub@microsoft.com> | 2018-11-16 10:14:11 -0500 |
commit | 15c6593db2e28b4c2d2d72aaa58c65dcb12cfa9b (patch) | |
tree | 62082731cd1a14bcd63d8fb828b6fd2ef67497cd | |
parent | 2fe48b4e38ec2b2174561cee3928b44197208eb1 (diff) | |
download | coreclr-15c6593db2e28b4c2d2d72aaa58c65dcb12cfa9b.tar.gz coreclr-15c6593db2e28b4c2d2d72aaa58c65dcb12cfa9b.tar.bz2 coreclr-15c6593db2e28b4c2d2d72aaa58c65dcb12cfa9b.zip |
Eliminate CMAKE dependency when not required (#21040)
-rw-r--r-- | build-test.cmd | 4 | ||||
-rw-r--r-- | build.cmd | 9 | ||||
-rw-r--r-- | src/pal/tools/gen-buildsys-win.bat | 4 | ||||
-rw-r--r-- | src/pal/tools/set-cmake-path.ps1 (renamed from src/pal/tools/probe-win.ps1) | 0 |
4 files changed, 11 insertions, 6 deletions
diff --git a/build-test.cmd b/build-test.cmd index 790b75fd3b..17ce589b86 100644 --- a/build-test.cmd +++ b/build-test.cmd @@ -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 === @@ -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 diff --git a/src/pal/tools/gen-buildsys-win.bat b/src/pal/tools/gen-buildsys-win.bat index 221d32269b..f542e994e7 100644 --- a/src/pal/tools/gen-buildsys-win.bat +++ b/src/pal/tools/gen-buildsys-win.bat @@ -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% diff --git a/src/pal/tools/probe-win.ps1 b/src/pal/tools/set-cmake-path.ps1 index 5fc499a8c6..5fc499a8c6 100644 --- a/src/pal/tools/probe-win.ps1 +++ b/src/pal/tools/set-cmake-path.ps1 |