diff options
Diffstat (limited to 'build.cmd')
-rw-r--r-- | build.cmd | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -3,6 +3,7 @@ setlocal EnableDelayedExpansion EnableExtensions echo Starting Build at %TIME% set __ThisScriptFull="%~f0" +set __ThisScriptDir="%~dp0" :: Default to highest Visual Studio version available :: @@ -24,7 +25,7 @@ if defined VisualStudioVersion goto :Run set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" if exist %_VSWHERE% ( - for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools + for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -prerelease -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools ) if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS% if not exist "%_VSCOMNTOOLS%" ( @@ -34,6 +35,7 @@ if not exist "%_VSCOMNTOOLS%" ( ) call "%_VSCOMNTOOLS%\VsDevCmd.bat" +pushd %__ThisScriptDir% :Run @@ -314,6 +316,7 @@ REM ============================================================================ echo %__MsgPrefix%Using environment: "%__VSToolsRoot%\VsDevCmd.bat" call "%__VSToolsRoot%\VsDevCmd.bat" @if defined _echo @echo on +pushd %__ThisScriptDir% @call %__ProjectDir%\run.cmd build -Project=%__ProjectDir%\build.proj -generateHeaderWindows -NativeVersionHeaderFile="%__RootBinDir%\obj\_version.h" %__RunArgs% %__UnprocessedBuildArgs% @@ -464,7 +467,7 @@ if /i "%__DoCrossArchBuild%"=="1" ( pushd "%__CrossCompIntermediatesDir%" set __CMakeBinDir=%__CrossComponentBinDir% set "__CMakeBinDir=!__CMakeBinDir:\=/!" - set __ExtraCmakeArgs="-DCLR_CROSS_COMPONENTS_BUILD=1" "-DCLR_CMAKE_TARGET_ARCH=%__BuildArch%" "-DCLR_CMAKE_TARGET_OS=%__BuildOs%" "-DCLR_CMAKE_PACKAGES_DIR=%__PackagesDir%" "-DCLR_CMAKE_PGO_INSTRUMENT=%__PgoInstrument%" "-DCLR_CMAKE_OPTDATA_VERSION=%__PgoOptDataVersion%" "-DCLR_CMAKE_PGO_OPTIMIZE=%__PgoOptimize%" + set __ExtraCmakeArgs="-DCLR_CROSS_COMPONENTS_BUILD=1" "-DCLR_CMAKE_TARGET_ARCH=%__BuildArch%" "-DCLR_CMAKE_TARGET_OS=%__BuildOs%" "-DCLR_CMAKE_PACKAGES_DIR=%__PackagesDir%" "-DCLR_CMAKE_PGO_INSTRUMENT=%__PgoInstrument%" "-DCLR_CMAKE_OPTDATA_VERSION=%__PgoOptDataVersion%" "-DCLR_CMAKE_PGO_OPTIMIZE=%__PgoOptimize%" "-DCMAKE_SYSTEM_VERSION=10.0" call "%__SourceDir%\pal\tools\gen-buildsys-win.bat" "%__ProjectDir%" %__VSVersion% %__CrossArch% !__ExtraCmakeArgs! @if defined _echo @echo on popd @@ -484,7 +487,7 @@ if /i "%__DoCrossArchBuild%"=="1" ( set __MsbuildLog=/flp:Verbosity=normal;LogFile=!__BuildLog! set __MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn! set __MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr! - + @call %__ProjectDir%\run.cmd build -Project=%__CrossCompIntermediatesDir%\install.vcxproj -configuration=%__BuildType% -platform=%__CrossArch% -MsBuildLog=!__MsbuildLog! -MsBuildWrn=!__MsbuildWrn! -MsBuildErr=!__MsbuildErr! %__RunArgs% %__UnprocessedBuildArgs% if not !errorlevel! == 0 ( |