Skip to content

Commit

Permalink
msvc: disable compiler warnings when building all Externals (cl /W0),…
Browse files Browse the repository at this point in the history
… except for wxWidgets, where all warnings are fixed.

Note warnings may still be generated by code in Externals if it is included into warning-enabled code (this is the case for libusb).
Also, quiet an intellisense warning in wxWidgets caused by using __w64 for an inapplicable type.
  • Loading branch information
shuffle2 committed Aug 20, 2014
1 parent 9df2127 commit 317e63e
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 3 deletions.
1 change: 1 addition & 0 deletions Externals/Bochs_disasm/Bochs_disasm.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\Source\VSProps\Base.props" />
<Import Project="..\..\Source\VSProps\ClDisableAllWarnings.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Externals/LZO/LZO.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\Source\VSProps\Base.props" />
<Import Project="..\..\Source\VSProps\ClDisableAllWarnings.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Externals/SFML/build/vc2010/SFML_Network.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\..\Source\VSProps\Base.props" />
<Import Project="..\..\..\..\Source\VSProps\ClDisableAllWarnings.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Externals/SOIL/SOIL.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\Source\VSProps\Base.props" />
<Import Project="..\..\Source\VSProps\ClDisableAllWarnings.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Externals/libpng/png/png.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\Source\VSProps\Base.props" />
<Import Project="..\..\..\Source\VSProps\ClDisableAllWarnings.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Externals/libusbx/msvc/libusb_static_2013.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\Source\VSProps\Base.props" />
<Import Project="..\..\..\Source\VSProps\ClDisableAllWarnings.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup>
Expand Down
1 change: 1 addition & 0 deletions Externals/miniupnpc/miniupnpc.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\Source\VSProps\Base.props" />
<Import Project="..\..\Source\VSProps\ClDisableAllWarnings.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Externals/polarssl/visualc/PolarSSL.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\Source\VSProps\Base.props" />
<Import Project="..\..\..\Source\VSProps\ClDisableAllWarnings.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Externals/portaudio/build/portaudio.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\Source\VSProps\Base.props" />
<Import Project="..\..\..\Source\VSProps\ClDisableAllWarnings.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup>
Expand Down
1 change: 1 addition & 0 deletions Externals/soundtouch/SoundTouch.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\Source\VSProps\Base.props" />
<Import Project="..\..\Source\VSProps\ClDisableAllWarnings.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemGroup>
Expand Down
4 changes: 3 additions & 1 deletion Externals/wxWidgets3/include/wx/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,9 @@ typedef wxUint32 wxDword;
each time we cast it to a pointer or a handle (which results in hundreds
of warnings as Win32 API often passes pointers in them)
*/
#if wxCHECK_VISUALC_VERSION(7)
// (dolphin-emu) Just disable __w64 usage. It's not meant to be used anymore,
// even on 32bit builds.
#if 0
#define wxW64 __w64
#else
#define wxW64
Expand Down
2 changes: 1 addition & 1 deletion Externals/wxWidgets3/src/common/cmdproc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ bool wxCommandProcessor::IsDirty() const
{
// We have never been saved, so we are dirty if and only if we have any
// commands at all.
return m_currentCommand;
return !!m_currentCommand;
}

if ( !m_currentCommand )
Expand Down
2 changes: 1 addition & 1 deletion Externals/wxWidgets3/src/common/glcmn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
// ----------------------------------------------------------------------------

// for compilers that support precompilation, includes "wx.h".
#define GL_GLEXT_PROTOTYPES
#include "wx/wxprec.h"
#define GL_GLEXT_PROTOTYPES

#ifdef __BORLANDC__
#pragma hdrstop
Expand Down
1 change: 1 addition & 0 deletions Externals/zlib/zlib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\Source\VSProps\Base.props" />
<Import Project="..\..\Source\VSProps\ClDisableAllWarnings.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
Expand Down
11 changes: 11 additions & 0 deletions Source/VSProps/ClDisableAllWarnings.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>TurnOffAllWarnings</WarningLevel>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup />
</Project>

0 comments on commit 317e63e

Please sign in to comment.