Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #797 from shuffle2/msvc-pch
Windows: Use a shared precompiled header for dolphin code under Source/
  • Loading branch information
shuffle2 committed Aug 16, 2014
2 parents bc1d905 + 8801289 commit 2270c3e
Show file tree
Hide file tree
Showing 56 changed files with 203 additions and 330 deletions.
1 change: 0 additions & 1 deletion Externals/wxWidgets3/build/msw/wx_base.vcxproj
Expand Up @@ -1286,7 +1286,6 @@
<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\PrecompiledHeader.props" />
<Import Project="..\..\..\..\Source\VSProps\WXWOverrides.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
Expand Down
6 changes: 3 additions & 3 deletions Source/CMakeLists.txt
Expand Up @@ -7,7 +7,7 @@ if(ENABLE_PCH)
else()
set(pch_lib_filename "${CMAKE_CURRENT_BINARY_DIR}/libpch.a")
endif()
set(pch_src_filename "${CMAKE_CURRENT_SOURCE_DIR}/pch.h")
set(pch_src_filename "${CMAKE_CURRENT_SOURCE_DIR}/PCH/pch.h")

if(APPLE)
set(type objective-c++-header)
Expand All @@ -16,12 +16,12 @@ if(ENABLE_PCH)
endif()

set_source_files_properties(
pch.h PROPERTIES
PCH/pch.h PROPERTIES
COMPILE_FLAGS "-x ${type}"
HEADER_FILE_ONLY 0
LANGUAGE CXX)

add_library(pch STATIC pch.h)
add_library(pch STATIC PCH/pch.h)

add_custom_command(
TARGET pch
Expand Down
6 changes: 1 addition & 5 deletions Source/Core/AudioCommon/AudioCommon.vcxproj
Expand Up @@ -31,7 +31,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\VSProps\Base.props" />
<Import Project="..\..\VSProps\PrecompiledHeader.props" />
<Import Project="..\..\VSProps\PCHUse.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemGroup>
Expand All @@ -42,9 +42,6 @@
<ClCompile Include="Mixer.cpp" />
<ClCompile Include="NullSoundStream.cpp" />
<ClCompile Include="OpenALStream.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="WaveFile.cpp" />
<ClCompile Include="XAudio2Stream.cpp" />
<ClCompile Include="XAudio2_7Stream.cpp">
Expand All @@ -65,7 +62,6 @@
<ClInclude Include="OpenSLESStream.h" />
<ClInclude Include="PulseAudioStream.h" />
<ClInclude Include="SoundStream.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="WaveFile.h" />
<ClInclude Include="XAudio2Stream.h" />
<ClInclude Include="XAudio2_7Stream.h" />
Expand Down
2 changes: 0 additions & 2 deletions Source/Core/AudioCommon/AudioCommon.vcxproj.filters
Expand Up @@ -23,7 +23,6 @@
<ClCompile Include="XAudio2Stream.cpp">
<Filter>SoundStreams</Filter>
</ClCompile>
<ClCompile Include="stdafx.cpp" />
<ClCompile Include="XAudio2_7Stream.cpp">
<Filter>SoundStreams</Filter>
</ClCompile>
Expand All @@ -50,7 +49,6 @@
<ClInclude Include="XAudio2Stream.h">
<Filter>SoundStreams</Filter>
</ClInclude>
<ClInclude Include="stdafx.h" />
<ClInclude Include="XAudio2_7Stream.h">
<Filter>SoundStreams</Filter>
</ClInclude>
Expand Down
5 changes: 0 additions & 5 deletions Source/Core/AudioCommon/stdafx.cpp

This file was deleted.

17 changes: 0 additions & 17 deletions Source/Core/AudioCommon/stdafx.h

This file was deleted.

2 changes: 0 additions & 2 deletions Source/Core/Common/CMakeLists.txt
Expand Up @@ -54,6 +54,4 @@ if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND (NOT ANDROID))
set(LIBS ${LIBS} rt)
endif()

enable_precompiled_headers(stdafx.h stdafx.cpp SRCS)

add_dolphin_library(common "${SRCS}" "${LIBS}")
6 changes: 1 addition & 5 deletions Source/Core/Common/Common.vcxproj
Expand Up @@ -31,7 +31,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\VSProps\Base.props" />
<Import Project="..\..\VSProps\PrecompiledHeader.props" />
<Import Project="..\..\VSProps\PCHUse.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemGroup>
Expand Down Expand Up @@ -69,7 +69,6 @@
<ClInclude Include="PcapFile.h" />
<ClInclude Include="SDCardUtil.h" />
<ClInclude Include="SettingsHandler.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="StdConditionVariable.h" />
<ClInclude Include="StdMakeUnique.h" />
<ClInclude Include="StdMutex.h" />
Expand Down Expand Up @@ -108,9 +107,6 @@
<ClCompile Include="PcapFile.cpp" />
<ClCompile Include="SDCardUtil.cpp" />
<ClCompile Include="SettingsHandler.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="StringUtil.cpp" />
<ClCompile Include="SymbolDB.cpp" />
<ClCompile Include="SysConf.cpp" />
Expand Down
2 changes: 0 additions & 2 deletions Source/Core/Common/Common.vcxproj.filters
Expand Up @@ -63,7 +63,6 @@
<ClInclude Include="Logging\LogManager.h">
<Filter>Logging</Filter>
</ClInclude>
<ClInclude Include="stdafx.h" />
<ClInclude Include="Crypto\ec.h">
<Filter>Crypto</Filter>
</ClInclude>
Expand Down Expand Up @@ -114,7 +113,6 @@
<ClCompile Include="Logging\LogManager.cpp">
<Filter>Logging</Filter>
</ClCompile>
<ClCompile Include="stdafx.cpp" />
<ClCompile Include="XSaveWorkaround.cpp" />
<ClCompile Include="GekkoDisassembler.cpp" />
</ItemGroup>
Expand Down
17 changes: 11 additions & 6 deletions Source/Core/Common/SCMRevGen.vcxproj
@@ -1,24 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{41279555-F94F-4EBC-99DE-AF863C10C5C4}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<PropertyGroup Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\VSProps\Base.props" />
</ImportGroup>
Expand All @@ -30,7 +34,7 @@
<PropertyGroup>
<OutDir>$(BuildRootDir)</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ItemDefinitionGroup>
<PreBuildEvent>
<Command>cscript /nologo /E:JScript "make_scmrev.h.js"</Command>
</PreBuildEvent>
Expand All @@ -39,6 +43,7 @@
<None Include="make_scmrev.h.js" />
</ItemGroup>
<ItemGroup>
<!-- force_rebuild.h is a non-existent file used to "trick" msbuild into always re-running this project. -->
<ClInclude Include="force_rebuild.h" />
<ClInclude Include="scmrev.h" />
</ItemGroup>
Expand Down
5 changes: 0 additions & 5 deletions Source/Core/Common/stdafx.cpp

This file was deleted.

19 changes: 0 additions & 19 deletions Source/Core/Common/stdafx.h

This file was deleted.

4 changes: 1 addition & 3 deletions Source/Core/Core/CMakeLists.txt
Expand Up @@ -14,7 +14,6 @@ set(SRCS ActionReplay.cpp
NetPlayServer.cpp
PatchEngine.cpp
State.cpp
stdafx.cpp
VolumeHandler.cpp
Boot/Boot_BS2Emu.cpp
Boot/Boot.cpp
Expand Down Expand Up @@ -242,8 +241,7 @@ endif(LIBUSB_FOUND)
set(LIBS ${LIBS} ${POLARSSL_LIBRARY})

if(WIN32)
set(SRCS ${SRCS} HW/BBA-TAP/TAP_Win32.cpp stdafx.cpp
HW/WiimoteReal/IOWin.cpp)
set(SRCS ${SRCS} HW/BBA-TAP/TAP_Win32.cpp HW/WiimoteReal/IOWin.cpp)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(SRCS ${SRCS} HW/BBA-TAP/TAP_Apple.cpp HW/WiimoteReal/IOdarwin.mm)
set(LIBS ${LIBS}
Expand Down
6 changes: 1 addition & 5 deletions Source/Core/Core/Core.vcxproj
Expand Up @@ -31,7 +31,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\VSProps\Base.props" />
<Import Project="..\..\VSProps\PrecompiledHeader.props" />
<Import Project="..\..\VSProps\PCHUse.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemGroup>
Expand Down Expand Up @@ -231,9 +231,6 @@
<ClCompile Include="PowerPC\Profiler.cpp" />
<ClCompile Include="PowerPC\SignatureDB.cpp" />
<ClCompile Include="State.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="VolumeHandler.cpp" />
<ClCompile Include="x64MemTools.cpp" />
</ItemGroup>
Expand Down Expand Up @@ -412,7 +409,6 @@
<ClInclude Include="PowerPC\Profiler.h" />
<ClInclude Include="PowerPC\SignatureDB.h" />
<ClInclude Include="State.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="VolumeHandler.h" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions Source/Core/Core/Core.vcxproj.filters
Expand Up @@ -676,7 +676,6 @@
<ClCompile Include="PowerPC\Jit64\JitRegCache.cpp">
<Filter>PowerPC\Jit64</Filter>
</ClCompile>
<ClCompile Include="stdafx.cpp" />
<ClCompile Include="PowerPC\JitILCommon\JitILBase_Branch.cpp">
<Filter>PowerPC\JitILCommon</Filter>
</ClCompile>
Expand Down Expand Up @@ -1195,7 +1194,6 @@
<ClInclude Include="PowerPC\Jit64\JitAsm.h">
<Filter>PowerPC\Jit64</Filter>
</ClInclude>
<ClInclude Include="stdafx.h" />
<ClInclude Include="PowerPC\JitILCommon\JitILBase.h">
<Filter>PowerPC\JitILCommon</Filter>
</ClInclude>
Expand Down
5 changes: 0 additions & 5 deletions Source/Core/Core/stdafx.cpp

This file was deleted.

13 changes: 0 additions & 13 deletions Source/Core/Core/stdafx.h

This file was deleted.

6 changes: 1 addition & 5 deletions Source/Core/DiscIO/DiscIO.vcxproj
Expand Up @@ -31,7 +31,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\VSProps\Base.props" />
<Import Project="..\..\VSProps\PrecompiledHeader.props" />
<Import Project="..\..\VSProps\PCHUse.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemGroup>
Expand All @@ -49,9 +49,6 @@
<ClCompile Include="Filesystem.cpp" />
<ClCompile Include="FileSystemGCWii.cpp" />
<ClCompile Include="NANDContentLoader.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="VolumeCommon.cpp" />
<ClCompile Include="VolumeCreator.cpp" />
<ClCompile Include="VolumeDirectory.cpp" />
Expand All @@ -76,7 +73,6 @@
<ClInclude Include="Filesystem.h" />
<ClInclude Include="FileSystemGCWii.h" />
<ClInclude Include="NANDContentLoader.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="Volume.h" />
<ClInclude Include="VolumeCreator.h" />
<ClInclude Include="VolumeDirectory.h" />
Expand Down
2 changes: 0 additions & 2 deletions Source/Core/DiscIO/DiscIO.vcxproj.filters
Expand Up @@ -87,7 +87,6 @@
<ClCompile Include="VolumeWiiCrypted.cpp">
<Filter>Volume</Filter>
</ClCompile>
<ClCompile Include="stdafx.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="DiscScrubber.h">
Expand Down Expand Up @@ -156,7 +155,6 @@
<ClInclude Include="VolumeWiiCrypted.h">
<Filter>Volume</Filter>
</ClInclude>
<ClInclude Include="stdafx.h" />
</ItemGroup>
<ItemGroup>
<Text Include="CMakeLists.txt" />
Expand Down
8 changes: 0 additions & 8 deletions Source/Core/DiscIO/stdafx.cpp

This file was deleted.

15 changes: 0 additions & 15 deletions Source/Core/DiscIO/stdafx.h

This file was deleted.

4 changes: 1 addition & 3 deletions Source/Core/DolphinWX/CMakeLists.txt
Expand Up @@ -99,9 +99,7 @@ set(SRCS ${SRCS} GLInterface/GLInterface.cpp)

set(NOGUI_SRCS MainNoGUI.cpp)

if(WIN32)
set(SRCS ${SRCS} stdafx.cpp)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# Link against OS X system frameworks.
list(APPEND LIBS
${APPKIT_LIBRARY}
Expand Down

0 comments on commit 2270c3e

Please sign in to comment.