Skip to content

Commit

Permalink
Fixing the allconfig build. (dotnet#40812)
Browse files Browse the repository at this point in the history
* fixing all config build

* address feedback
  • Loading branch information
Anipik authored Aug 15, 2020
1 parent c67684b commit 3bb5113
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Build.proj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.Build.Traversal">

<PropertyGroup>
<TraversalGlobalProperties>BuildTargetFramework=$([MSBuild]::ValueOrDefault('$(BuildTargetFramework)', '$(NetCoreAppCurrent)'))</TraversalGlobalProperties>
<TraversalGlobalProperties Condition="'$(BuildAllConfigurations)' != 'true'">BuildTargetFramework=$([MSBuild]::ValueOrDefault('$(BuildTargetFramework)', '$(NetCoreAppCurrent)'))</TraversalGlobalProperties>
</PropertyGroup>

<!--
Expand Down
1 change: 1 addition & 0 deletions src/libraries/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<AdditionalBuildTargetFrameworks Condition="'$(BuildTargetFramework)' == 'net48'">net45;net451;net452;net46;net461;net462;net47;net471;net472</AdditionalBuildTargetFrameworks>
<AdditionalBuildTargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true' and '$(BuildAllProjects)' == 'true'">$(AdditionalBuildTargetFrameworks);netstandard2.0</AdditionalBuildTargetFrameworks>
<BuildSettings>$(BuildTargetFramework)-$(TargetOS)-$(Configuration)-$(TargetArchitecture)</BuildSettings>
<BuildSettings Condition="'$(BuildTargetFramework)' == ''">$(NetCoreAppCurrent)-$(TargetOS)-$(Configuration)-$(TargetArchitecture)</BuildSettings>
</PropertyGroup>

<!-- Define test projects and companions -->
Expand Down
6 changes: 4 additions & 2 deletions src/libraries/Native/build-native.proj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
<!-- Hardcode version paths in a global location. -->
<NativeVersionFile Condition="'$(TargetOS)' == 'Windows_NT'">$(ArtifactsObjDir)_version.h</NativeVersionFile>
<NativeVersionFile Condition="'$(TargetOS)' != 'Windows_NT'">$(ArtifactsObjDir)_version.c</NativeVersionFile>
<_BuildNativeArgs>$(TargetArchitecture) $(Configuration) outconfig $(BuildTargetFramework)-$(TargetOS)-$(Configuration)-$(TargetArchitecture) -os $(TargetOS)</_BuildNativeArgs>
<TargetFramework>$(BuildTargetFramework)</TargetFramework>
<TargetFramework Condition="'$(TargetFramework)' == ''">$(NetCoreAppCurrent)</TargetFramework>
<_BuildNativeArgs>$(TargetArchitecture) $(Configuration) outconfig $(TargetFramework)-$(TargetOS)-$(Configuration)-$(TargetArchitecture) -os $(TargetOS)</_BuildNativeArgs>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -39,7 +41,7 @@
<Target Name="BuildNativeWindows"
BeforeTargets="Build"
Condition="'$(TargetOS)' == 'Windows_NT' and
'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)'">
'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
<!-- Run script that invokes Cmake to create VS files, and then calls msbuild to compile them -->
<Message Text="&quot;$(MSBuildThisFileDirectory)build-native.cmd&quot; $(_BuildNativeArgs)" Importance="High"/>
<Exec Command="&quot;$(MSBuildThisFileDirectory)build-native.cmd&quot; $(_BuildNativeArgs)" />
Expand Down

0 comments on commit 3bb5113

Please sign in to comment.