diff options
author | Michal Strehovský <MichalStrehovsky@users.noreply.github.com> | 2017-04-26 06:36:49 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2017-04-26 06:36:49 +0300 |
commit | 165a55360055286c2cd0177b24ccbd9f7797c183 (patch) | |
tree | 3b7b08ae0149b5d0228de5a740a5581614488cc3 /dir.props | |
parent | e69c7e5a46de665f2251fe095c8724d9e3460c6b (diff) |
Centralize build defines (#3431)
The way we were setting common defines (such as `AMD64`, `BIT64`, `ARM`)
was extremely fragile and invited partial fixes such as #3414 and #3424.
This really needs to be centralized.
Diffstat (limited to 'dir.props')
-rw-r--r-- | dir.props | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -252,6 +252,35 @@ </Otherwise> </Choose> + <!-- Set up various other constants --> + <PropertyGroup Condition="'$(IsProjectNLibrary)' != 'true'"> + <DefineConstants>CORERT;$(DefineConstants)</DefineConstants> + </PropertyGroup> + <PropertyGroup Condition="'$(TargetsWindows)'=='true'"> + <DefineConstants>PLATFORM_WINDOWS;$(DefineConstants)</DefineConstants> + </PropertyGroup> + <PropertyGroup Condition="'$(TargetsUnix)'=='true'"> + <DefineConstants>PLATFORM_UNIX;$(DefineConstants)</DefineConstants> + </PropertyGroup> + <PropertyGroup Condition="'$(TargetsOSX)'=='true'"> + <DefineConstants>PLATFORM_OSX;$(DefineConstants)</DefineConstants> + </PropertyGroup> + <PropertyGroup Condition="'$(Platform)' == 'x64'"> + <DefineConstants>AMD64;BIT64;$(DefineConstants)</DefineConstants> + </PropertyGroup> + <PropertyGroup Condition="'$(Platform)' == 'x86'"> + <DefineConstants>X86;$(DefineConstants)</DefineConstants> + </PropertyGroup> + <PropertyGroup Condition="'$(Platform)' == 'arm'"> + <DefineConstants>ARM;$(DefineConstants)</DefineConstants> + </PropertyGroup> + <PropertyGroup Condition="'$(Platform)' == 'armel'"> + <DefineConstants>ARM;$(DefineConstants)</DefineConstants> + </PropertyGroup> + <PropertyGroup Condition="'$(Platform)' == 'arm64'"> + <DefineConstants>ARM64;BIT64;$(DefineConstants)</DefineConstants> + </PropertyGroup> + <PropertyGroup> <PackageTargetFramework Condition="'$(PackageTargetFramework)' == ''">netcoreapp2.0</PackageTargetFramework> <NuGetTargetMoniker Condition="'$(NuGetTargetFramework)' == ''">.NETCoreApp,Version=v2.0</NuGetTargetMoniker> |