Skip to content

Commit 365ccf2

Browse files
author
Eric Erhardt
authored
Enabling building ML.NET for .NET Core 3.0 in the official builds. (dotnet#4096)
* Enabling building ML.NET for .NET Core 3.0 in the official builds. * Update .sln for the new configuration * Fix native build on windows. * Fix netfx configuration by working around an sdk bug. * Fix CpuMath tests on netfx. Combine the two separate CpuMath UnitTest projects into a single project. * Install the .NET Core 2.1 runtime so we can execute tests against it. * Remove crossgen call since the crossgen executable is no longer shipped in the NuGet package. We don't need many things from the Tools directory, so removing crossgen won't affect build performance very much.
1 parent e34f2e1 commit 365ccf2

25 files changed

+518
-590
lines changed

.vsts-dotnet-ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
container: CentosContainer
1919
customMatrixes:
2020
Debug_Build:
21-
_configuration: Debug-Intrinsics
21+
_configuration: Debug-netcoreapp3_0
2222
_config_short: DI
2323
_includeBenchmarkData: false
2424
Release_Build:
25-
_configuration: Release-Intrinsics
25+
_configuration: Release-netcoreapp3_0
2626
_config_short: RI
2727
_includeBenchmarkData: true
2828
pool:
@@ -49,11 +49,11 @@ jobs:
4949
buildScript: build.cmd
5050
customMatrixes:
5151
Debug_Build:
52-
_configuration: Debug-Intrinsics
52+
_configuration: Debug-netcoreapp3_0
5353
_config_short: DI
5454
_includeBenchmarkData: false
5555
Release_Build:
56-
_configuration: Release-Intrinsics
56+
_configuration: Release-netcoreapp3_0
5757
_config_short: RI
5858
_includeBenchmarkData: true
5959
pool:

Directory.Build.props

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<PropertyGroup>
88
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
9-
<Configurations>Debug;Release;Debug-Intrinsics;Release-Intrinsics;Debug-netfx;Release-netfx</Configurations>
9+
<Configurations>Debug;Release;Debug-netcoreapp3_0;Release-netcoreapp3_0;Debug-netfx;Release-netfx</Configurations>
1010
<Platform Condition="'$(Platform)'==''">AnyCPU</Platform>
1111
<TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture>
1212
<NativeTargetArchitecture Condition="'$(NativeTargetArchitecture)' == ''">$(TargetArchitecture)</NativeTargetArchitecture>
@@ -106,11 +106,7 @@
106106
<PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign>
107107
</PropertyGroup>
108108

109-
<PropertyGroup>
110-
<UseIntrinsics Condition="'$(UseIntrinsics)' == ''">$(Configuration.EndsWith('-Intrinsics'))</UseIntrinsics>
111-
</PropertyGroup>
112-
113-
<!-- Need to explicitly set these properties for the -Intrinsics or -Netfx configurations becuase they are typically based off 'Debug' or 'Release' configs -->
109+
<!-- Need to explicitly set these properties for the -netcoreapp3_0 or -netfx configurations becuase they are typically based off 'Debug' or 'Release' configs -->
114110
<!-- Taken from https://github.com/dotnet/sdk/blob/073c98b92c81066c6c2e17c3674adbb6e833409a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.props#L41-L47 -->
115111
<PropertyGroup Condition="$(Configuration.StartsWith('Debug'))">
116112
<DebugSymbols>true</DebugSymbols>
@@ -121,7 +117,4 @@
121117
<Optimize>true</Optimize>
122118
</PropertyGroup>
123119

124-
<PropertyGroup>
125-
<CustomAfterMicrosoftCommonTargets>$(RepoRoot)build\AfterCommonTargets.targets</CustomAfterMicrosoftCommonTargets>
126-
</PropertyGroup>
127120
</Project>

DotnetCLIVersion.netcoreapp.latest.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

DotnetCLIVersion.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.503
1+
3.0.100-preview7-012821

DotnetExtraRuntimeVersion.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.1.12

Microsoft.ML.sln

Lines changed: 438 additions & 465 deletions
Large diffs are not rendered by default.

build/AfterCommonTargets.targets

Lines changed: 0 additions & 13 deletions
This file was deleted.

build/Empty.targets

Lines changed: 0 additions & 29 deletions
This file was deleted.

config.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"Configuration": {
44
"description": "Sets the optimization level for the Build Configuration you want to build.",
55
"valueType": "property",
6-
"values": [ "Debug", "Release", "Debug-Intrinsics", "Release-Intrinsics", "Debug-netfx", "Release-netfx" ],
6+
"values": [ "Debug", "Release", "Debug-netcoreapp3_0", "Release-netcoreapp3_0", "Debug-netfx", "Release-netfx" ],
77
"defaultValue": "Debug"
88
},
99
"TargetArchitecture": {
@@ -106,16 +106,16 @@
106106
"Configuration": "Release"
107107
}
108108
},
109-
"debug-intrinsics": {
110-
"description": "Sets optimization level to debug for managed build configuration and builds against netcoreapp3.0. (/p:Configuration=Debug-Intrinsics)",
109+
"debug-netcoreapp3_0": {
110+
"description": "Sets optimization level to debug for managed build configuration and builds against netcoreapp3.0. (/p:Configuration=Debug-netcoreapp3_0)",
111111
"settings": {
112-
"Configuration": "Debug-Intrinsics"
112+
"Configuration": "Debug-netcoreapp3_0"
113113
}
114114
},
115-
"release-intrinsics": {
116-
"description": "Sets optimization level to release for managed build configuration and builds against netcoreapp3.0. (/p:Configuration=Release-Intrinsics)",
115+
"release-netcoreapp3_0": {
116+
"description": "Sets optimization level to release for managed build configuration and builds against netcoreapp3.0. (/p:Configuration=Release-netcoreapp3_0)",
117117
"settings": {
118-
"Configuration": "Release-Intrinsics"
118+
"Configuration": "Release-netcoreapp3_0"
119119
}
120120
},
121121
"debug-netfx": {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
In order to build ML.NET for .NET Core 3.0, you need to do a few manual steps.
22

33
1. Delete the local `.\Tools\` folder from the root of the repo, to ensure you download the new version of the .NET Core SDK.
4-
2. Run `.\build.cmd -- /p:Configuration=Release-Intrinsics` or `.\build.cmd -Release-Intrinsics` from the root of the repo.
4+
2. Run `.\build.cmd -- /p:Configuration=Release-netcoreapp3_0` or `.\build.cmd -Release-netcoreapp3_0` from the root of the repo.
55
3. If you want to build the NuGet packages, `.\build.cmd -buildPackages` after step 2.
66

77
If you are using Visual Studio, you will need to do the following:
88

99
1. Install the above .NET Core 3.0 SDK into %Program Files%. Or extract it to a directory and put that directory at the front of your %PATH%, so it is the first `dotnet.exe` on the PATH.
10-
2. In the Configuration Manager, switch the current configuration to `Debug-Intrinsics` or `Release-Intrinsics`.
10+
2. In the Configuration Manager, switch the current configuration to `Debug-netcoreapp3_0` or `Release-netcoreapp3_0`.
1111
3. Build and test as usual.

init-tools.cmd

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,34 @@ if exist "%DotNetBuildToolsDir%" (
4646
echo Running %0 > "%INIT_TOOLS_LOG%"
4747

4848
set /p DOTNET_VERSION=< "%~dp0DotnetCLIVersion.txt"
49+
set /p DOTNET_EXTRA_RUNTIME_VERSION=< "%~dp0DotnetExtraRuntimeVersion.txt"
4950

5051
:Arg_Loop
5152
if [%1] == [] goto :ArchSet
5253
if /i [%1] == [x86] ( set ARCH=x86)
53-
if /i [%1] == [-Debug-Intrinsics] ( set /p DOTNET_VERSION=< "%~dp0DotnetCLIVersion.netcoreapp.latest.txt")
54-
if /i [%1] == [-Release-Intrinsics] ( set /p DOTNET_VERSION=< "%~dp0DotnetCLIVersion.netcoreapp.latest.txt")
5554
shift
5655
goto :Arg_Loop
5756

5857
:ArchSet
5958
if exist "%DOTNET_CMD%" goto :afterdotnetrestore
6059

61-
echo Installing dotnet cli...
6260
if NOT exist "%DOTNET_PATH%" mkdir "%DOTNET_PATH%"
61+
62+
:: install the extra runtime first, so the SDK install will overwrite the root dotnet executable
63+
echo Installing dotnet runtime %DOTNET_EXTRA_RUNTIME_VERSION%...
64+
set DOTNET_EXTRA_RUNTIME_ZIP_NAME=dotnet-runtime-%DOTNET_EXTRA_RUNTIME_VERSION%-win-%ARCH%.zip
65+
set DOTNET_EXTRA_RUNTIME_REMOTE_PATH=https://dotnetcli.azureedge.net/dotnet/Runtime/%DOTNET_EXTRA_RUNTIME_VERSION%/%DOTNET_EXTRA_RUNTIME_ZIP_NAME%
66+
set DOTNET_EXTRA_RUNTIME_LOCAL_PATH=%DOTNET_PATH%%DOTNET_EXTRA_RUNTIME_ZIP_NAME%
67+
echo Installing '%DOTNET_EXTRA_RUNTIME_REMOTE_PATH%' to '%DOTNET_EXTRA_RUNTIME_LOCAL_PATH%' >> "%INIT_TOOLS_LOG%"
68+
powershell -NoProfile -ExecutionPolicy unrestricted -Command "$retryCount = 0; $success = $false; $proxyCredentialsRequired = $false; do { try { $wc = New-Object Net.WebClient; if ($proxyCredentialsRequired) { [Net.WebRequest]::DefaultWebProxy.Credentials = [Net.CredentialCache]::DefaultNetworkCredentials; } $wc.DownloadFile('%DOTNET_EXTRA_RUNTIME_REMOTE_PATH%', '%DOTNET_EXTRA_RUNTIME_LOCAL_PATH%'); $success = $true; } catch { if ($retryCount -ge 6) { throw; } else { $we = $_.Exception.InnerException -as [Net.WebException]; $proxyCredentialsRequired = ($we -ne $null -and ([Net.HttpWebResponse]$we.Response).StatusCode -eq [Net.HttpStatusCode]::ProxyAuthenticationRequired); Start-Sleep -Seconds (5 * $retryCount); $retryCount++; } } } while ($success -eq $false); Expand-Archive '%DOTNET_EXTRA_RUNTIME_LOCAL_PATH%' '%DOTNET_PATH%';" >> "%INIT_TOOLS_LOG%"
69+
70+
echo Installing dotnet cli %DOTNET_VERSION%...
6371
set DOTNET_ZIP_NAME=dotnet-sdk-%DOTNET_VERSION%-win-%ARCH%.zip
6472
set DOTNET_REMOTE_PATH=https://dotnetcli.azureedge.net/dotnet/Sdk/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
6573
set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME%
6674
echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> "%INIT_TOOLS_LOG%"
67-
powershell -NoProfile -ExecutionPolicy unrestricted -Command "$retryCount = 0; $success = $false; $proxyCredentialsRequired = $false; do { try { $wc = New-Object Net.WebClient; if ($proxyCredentialsRequired) { [Net.WebRequest]::DefaultWebProxy.Credentials = [Net.CredentialCache]::DefaultNetworkCredentials; } $wc.DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); $success = $true; } catch { if ($retryCount -ge 6) { throw; } else { $we = $_.Exception.InnerException -as [Net.WebException]; $proxyCredentialsRequired = ($we -ne $null -and ([Net.HttpWebResponse]$we.Response).StatusCode -eq [Net.HttpStatusCode]::ProxyAuthenticationRequired); Start-Sleep -Seconds (5 * $retryCount); $retryCount++; } } } while ($success -eq $false); Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFile]::ExtractToDirectory('%DOTNET_LOCAL_PATH%', '%DOTNET_PATH%') } else { (New-Object -com shell.application).namespace('%DOTNET_PATH%').CopyHere((new-object -com shell.application).namespace('%DOTNET_LOCAL_PATH%').Items(),16) }" >> "%INIT_TOOLS_LOG%"
75+
powershell -NoProfile -ExecutionPolicy unrestricted -Command "$retryCount = 0; $success = $false; $proxyCredentialsRequired = $false; do { try { $wc = New-Object Net.WebClient; if ($proxyCredentialsRequired) { [Net.WebRequest]::DefaultWebProxy.Credentials = [Net.CredentialCache]::DefaultNetworkCredentials; } $wc.DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); $success = $true; } catch { if ($retryCount -ge 6) { throw; } else { $we = $_.Exception.InnerException -as [Net.WebException]; $proxyCredentialsRequired = ($we -ne $null -and ([Net.HttpWebResponse]$we.Response).StatusCode -eq [Net.HttpStatusCode]::ProxyAuthenticationRequired); Start-Sleep -Seconds (5 * $retryCount); $retryCount++; } } } while ($success -eq $false); Expand-Archive '%DOTNET_LOCAL_PATH%' '%DOTNET_PATH%' -Force; " >> "%INIT_TOOLS_LOG%"
76+
6877
if NOT exist "%DOTNET_LOCAL_PATH%" (
6978
echo ERROR: Could not install dotnet cli correctly. 1>&2
7079
goto :error

init-tools.sh

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,15 @@ __PACKAGES_DIR="$__scriptpath/packages"
66
__TOOLRUNTIME_DIR="$__scriptpath/Tools"
77
__DOTNET_PATH="$__TOOLRUNTIME_DIR/dotnetcli"
88
__DOTNET_CMD="$__DOTNET_PATH/dotnet"
9-
__TARGET_FRAMEWORK="netcoreapp2.1"
109
if [ -z "${__BUILDTOOLS_SOURCE:-}" ]; then __BUILDTOOLS_SOURCE=https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json; fi
1110
export __BUILDTOOLS_USE_CSPROJ=true
1211
__BUILD_TOOLS_PACKAGE_VERSION=$(cat "$__scriptpath/BuildToolsVersion.txt" | sed 's/\r$//') # remove CR if mounted repo on Windows drive
1312

1413
DotNetCliFileName="DotnetCLIVersion.txt"
15-
16-
for i do
17-
if [[ "$i" == *"Intrinsics"* ]]; then
18-
DotNetCliFileName="DotnetCLIVersion.netcoreapp.latest.txt"
19-
__TARGET_FRAMEWORK="netcoreapp3.0"
20-
fi
21-
done
14+
DotNetExtraRuntimeFileName="DotnetExtraRuntimeVersion.txt"
2215

2316
__DOTNET_TOOLS_VERSION=$(cat "$__scriptpath/$DotNetCliFileName" | sed 's/\r$//') # remove CR if mounted repo on Windows drive
17+
__DOTNET_EXTRA_RUNTIME_VERSION=$(cat "$__scriptpath/$DotNetExtraRuntimeFileName" | sed 's/\r$//') # remove CR if mounted repo on Windows drive
2418
__BUILD_TOOLS_PATH="$__PACKAGES_DIR/microsoft.dotnet.buildtools/$__BUILD_TOOLS_PACKAGE_VERSION/lib"
2519
__INIT_TOOLS_RESTORE_PROJECT="$__scriptpath/init-tools.msbuild"
2620
__BUILD_TOOLS_SEMAPHORE="$__TOOLRUNTIME_DIR/$__BUILD_TOOLS_PACKAGE_VERSION/init-tools.complete"
@@ -129,10 +123,34 @@ if [ ! -e "$__DOTNET_PATH" ]; then
129123
esac
130124
__PKG_RID=$__PKG_RID-$__PKG_ARCH
131125
__DOTNET_PKG=dotnet-sdk-${__DOTNET_TOOLS_VERSION}-$__PKG_RID
126+
__DOTNET_EXTRA_RUNTIME_PKG=dotnet-runtime-${__DOTNET_EXTRA_RUNTIME_VERSION}-$__PKG_RID
132127
fi
133128
mkdir -p "$__DOTNET_PATH"
134129

135-
echo "Installing dotnet cli..."
130+
# install the extra runtime first, so the SDK install will overwrite the root dotnet executable
131+
echo "Installing dotnet runtime ${__DOTNET_EXTRA_RUNTIME_VERSION}..."
132+
__DOTNET_EXTRA_RUNTIME_LOCATION="https://dotnetcli.azureedge.net/dotnet/Runtime/${__DOTNET_EXTRA_RUNTIME_VERSION}/${__DOTNET_EXTRA_RUNTIME_PKG}.tar.gz"
133+
134+
install_dotnet_extra_runtime() {
135+
if [[ -z "${DotNetExtraRuntimeTarPath-}" ]]; then
136+
echo "Installing '${__DOTNET_EXTRA_RUNTIME_LOCATION}' to '$__DOTNET_PATH/dotnet.extra.runtime.tar'"
137+
rm -rf -- "$__DOTNET_PATH/*"
138+
# curl has HTTPS CA trust-issues less often than wget, so lets try that first.
139+
if command -v curl > /dev/null; then
140+
curl --retry 10 -sSL --create-dirs -o $__DOTNET_PATH/dotnet.extra.runtime.tar ${__DOTNET_EXTRA_RUNTIME_LOCATION}
141+
else
142+
wget -q -O $__DOTNET_PATH/dotnet.extra.runtime.tar ${__DOTNET_EXTRA_RUNTIME_LOCATION}
143+
fi
144+
else
145+
echo "Copying '$DotNetExtraRuntimeTarPath' to '$__DOTNET_PATH/dotnet.extra.runtime.tar'"
146+
cp $DotNetExtraRuntimeTarPath $__DOTNET_PATH/dotnet.extra.runtime.tar
147+
fi
148+
cd "$__DOTNET_PATH"
149+
tar -xf "$__DOTNET_PATH/dotnet.extra.runtime.tar"
150+
}
151+
execute_with_retry install_dotnet_extra_runtime >> "$__init_tools_log" 2>&1
152+
153+
echo "Installing dotnet cli ${__DOTNET_TOOLS_VERSION}..."
136154
__DOTNET_LOCATION="https://dotnetcli.azureedge.net/dotnet/Sdk/${__DOTNET_TOOLS_VERSION}/${__DOTNET_PKG}.tar.gz"
137155

138156
install_dotnet_cli() {
@@ -184,8 +202,6 @@ echo "Making all .sh files executable under Tools."
184202
ls "$__scriptpath/Tools/"*.sh | xargs chmod +x
185203
ls "$__scriptpath/Tools/scripts/docker/"*.sh | xargs chmod +x
186204

187-
"$__scriptpath/Tools/crossgen.sh" "$__scriptpath/Tools" $__PKG_RID $__TARGET_FRAMEWORK
188-
189205
mkdir -p "$(dirname "$__BUILD_TOOLS_SEMAPHORE")" && touch "$__BUILD_TOOLS_SEMAPHORE"
190206

191207
echo "Done initializing tools."

pkg/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.nupkgproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk" DefaultTargets="Pack">
22

33
<PropertyGroup>
4-
<TargetFramework Condition="'$(UseIntrinsics)' != 'true'">netstandard2.0</TargetFramework>
5-
<TargetFrameworks Condition="'$(UseIntrinsics)' == 'true'">netstandard2.0;netcoreapp3.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
65
<PackageDescription>Microsoft.ML.CpuMath contains optimized math routines for ML.NET.</PackageDescription>
76
</PropertyGroup>
87

src/Microsoft.ML.CpuMath/AssemblyInfo.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
using System.Runtime.CompilerServices;
66
using Microsoft.ML.Internal.CpuMath.Core;
77

8-
[assembly: InternalsVisibleTo("Microsoft.ML.CpuMath.UnitTests.netstandard" + PublicKey.TestValue)]
9-
[assembly: InternalsVisibleTo("Microsoft.ML.CpuMath.UnitTests.netcoreapp" + PublicKey.TestValue)]
8+
[assembly: InternalsVisibleTo("Microsoft.ML.CpuMath.UnitTests" + PublicKey.TestValue)]
109
[assembly: InternalsVisibleTo("Microsoft.ML.Data" + PublicKey.Value)]
1110
[assembly: InternalsVisibleTo("Microsoft.ML.FastTree" + PublicKey.Value)]
1211
[assembly: InternalsVisibleTo("Microsoft.ML.Mkl.Components" + PublicKey.Value)]

src/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework Condition="'$(UseIntrinsics)' != 'true'">netstandard2.0</TargetFramework>
5-
<TargetFrameworks Condition="'$(UseIntrinsics)' == 'true'">netstandard2.0;netcoreapp3.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
65
<IncludeInPackage>Microsoft.ML.CpuMath</IncludeInPackage>
76
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
87
<DefineConstants>$(DefineConstants);CPUMATH_INFRASTRUCTURE</DefineConstants>

src/Native/build.cmd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ set MKL_LIB_PATH=""
1818
:Arg_Loop
1919
if [%1] == [] goto :ToolsVersion
2020
if /i [%1] == [Release] ( set CMAKE_BUILD_TYPE=Release&&shift&goto Arg_Loop)
21-
if /i [%1] == [Release-Intrinsics] ( set CMAKE_BUILD_TYPE=Release-Intrinsics&&shift&goto Arg_Loop)
21+
if /i [%1] == [Release-netcoreapp3_0] ( set CMAKE_BUILD_TYPE=Release-netcoreapp3_0&&shift&goto Arg_Loop)
2222
if /i [%1] == [Release-netfx] ( set CMAKE_BUILD_TYPE=Release-netfx&&shift&goto Arg_Loop)
2323
if /i [%1] == [Debug] ( set CMAKE_BUILD_TYPE=Debug&&shift&goto Arg_Loop)
24-
if /i [%1] == [Debug-Intrinsics] ( set CMAKE_BUILD_TYPE=Debug-Intrinsics&&shift&goto Arg_Loop)
24+
if /i [%1] == [Debug-netcoreapp3_0] ( set CMAKE_BUILD_TYPE=Debug-netcoreapp3_0&&shift&goto Arg_Loop)
2525
if /i [%1] == [Debug-netfx] ( set CMAKE_BUILD_TYPE=Debug-netfx&&shift&goto Arg_Loop)
2626

2727
if /i [%1] == [x86] ( set __BuildArch=x86&&set __VCBuildArch=x86&&shift&goto Arg_Loop)
@@ -104,9 +104,9 @@ if %__IntermediatesDir% == "" (
104104
set "__CMakeBinDir=%__CMakeBinDir:\=/%"
105105
set "__IntermediatesDir=%__IntermediatesDir:\=/%"
106106

107-
:: Strip the "-Intrinsics" suffix from the build type
108-
if [%CMAKE_BUILD_TYPE:~-11%] == [-Intrinsics] (
109-
set CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE:~0,-11%
107+
:: Strip the "-netcoreapp3_0" suffix from the build type
108+
if [%CMAKE_BUILD_TYPE:~-14%] == [-netcoreapp3_0] (
109+
set CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE:~0,-14%
110110
)
111111

112112
:: Strip the "-netfx" suffix from the build type

0 commit comments

Comments
 (0)