mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 06:25:30 +00:00
ICU-20076 MSVC Warning clean up. Define _HAS_EXCEPTIONS=0 in ICU library code (#128)
In an effort to reduce the number of warnings that building ICU emits, we should set the following define for ICU4C library code when building using MSVC/VisualStudio: _HAS_EXCEPTIONS=0 This tells the MSVC implementation of the STL that exceptions should not be used - which is fine for ICU4C library code, as the library code does not make use of exceptions at all.
This commit is contained in:
parent
65b75640e2
commit
c8e4c81d4e
7 changed files with 33 additions and 2 deletions
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2018 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html -->
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!-- This file is used to set configurations that are common to *all* ICU library code (common, i18n, and io). -->
|
||||
<!-- Note: These options are for *all* configurations for *all* library projects. -->
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<!-- ICU does not use exceptions in library code. -->
|
||||
<PreprocessorDefinitions>
|
||||
_HAS_EXCEPTIONS=0;
|
||||
%(PreprocessorDefinitions)
|
||||
</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Disable MSBuild warning about Linker OutputFile. -->
|
||||
<!-- Ex: MSBuild complains that the common project creates "icuuc62.dll" rather than "common.dll". However, this is intentional. -->
|
||||
<MSBuildWarningsAsMessages>MSB8012</MSBuildWarningsAsMessages>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -2,6 +2,8 @@
|
|||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!-- The following import will include the 'default' configuration options for VS projects. -->
|
||||
<Import Project="..\allinone\Build.Windows.ProjectConfiguration.props" />
|
||||
<!-- The following import will include the library configuration options for VS projects. -->
|
||||
<Import Project="..\allinone\Build.Windows.Library.ProjectConfiguration.props" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!-- The following import will include the UWP configuration options for VS projects. -->
|
||||
<Import Project="..\allinone\Build.Windows.UWP.ProjectConfiguration.props" />
|
||||
<!-- The following import will include the library configuration options for VS projects. -->
|
||||
<Import Project="..\allinone\Build.Windows.Library.ProjectConfiguration.props" />
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!-- The following import will include the 'default' configuration options for VS projects. -->
|
||||
<Import Project="..\allinone\Build.Windows.ProjectConfiguration.props" />
|
||||
<!-- The following import will include the library configuration options for VS projects. -->
|
||||
<Import Project="..\allinone\Build.Windows.Library.ProjectConfiguration.props" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{0178B127-6269-407D-B112-93877BB62776}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!-- The following import will include the 'default' configuration options for VS UWP projects. -->
|
||||
<Import Project="..\allinone\Build.Windows.UWP.ProjectConfiguration.props" />
|
||||
<!-- The following import will include the library configuration options for VS projects. -->
|
||||
<Import Project="..\allinone\Build.Windows.Library.ProjectConfiguration.props" />
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!-- The following import will include the 'default' configuration options for VS projects. -->
|
||||
<Import Project="..\allinone\Build.Windows.ProjectConfiguration.props" />
|
||||
|
||||
<!-- The following import will include the library configuration options for VS projects. -->
|
||||
<Import Project="..\allinone\Build.Windows.Library.ProjectConfiguration.props" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C2B04507-2521-4801-BF0D-5FD79D6D518C}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!-- The following import will include the 'default' configuration options for VS projects. -->
|
||||
<Import Project="..\allinone\Build.Windows.ProjectConfiguration.props" />
|
||||
|
||||
<!-- The following import will include the library configuration options for VS projects. -->
|
||||
<Import Project="..\allinone\Build.Windows.Library.ProjectConfiguration.props" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{203EC78A-0531-43F0-A636-285439BDE025}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
|
|
Loading…
Add table
Reference in a new issue