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.
--- /dev/null
+<?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>
<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>
<?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>
<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>
<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>
<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>
<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>