Skip to content

Commit

Permalink
Configure precompiled headers when compiling the test projects. It's …
Browse files Browse the repository at this point in the history
…grown large enough to save a couple of minutes.
  • Loading branch information
codereader committed Jan 27, 2024
1 parent d6fc7f8 commit 4efeba8
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 12 deletions.
1 change: 1 addition & 0 deletions test/precompiled.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "precompiled.h"
13 changes: 13 additions & 0 deletions test/precompiled.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* greebo: Precompiled header file used by the unit test project
*/
#pragma once

#include "RadiantTest.h"

#include "algorithm/Entity.h"
#include "algorithm/FileUtils.h"
#include "algorithm/Scene.h"
#include "algorithm/Primitives.h"
#include "algorithm/View.h"
#include "algorithm/XmlUtils.h"
27 changes: 15 additions & 12 deletions tools/msvc/Tests/Tests.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
<ClInclude Include="..\..\..\test\FakeClipboardModule.h" />
<ClInclude Include="..\..\..\test\HeadlessOpenGLContext.h" />
<ClInclude Include="..\..\..\test\math\MatrixUtils.h" />
<ClInclude Include="..\..\..\test\precompiled.h" />
<ClInclude Include="..\..\..\test\RadiantTest.h" />
<ClInclude Include="..\..\..\test\TdmMissionSetup.h" />
<ClInclude Include="..\..\..\test\TestContext.h" />
Expand Down Expand Up @@ -132,6 +133,12 @@
<ClCompile Include="..\..\..\test\PatchIterators.cpp" />
<ClCompile Include="..\..\..\test\PatchWelding.cpp" />
<ClCompile Include="..\..\..\test\PointTrace.cpp" />
<ClCompile Include="..\..\..\test\precompiled.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\..\..\test\Prefabs.cpp" />
<ClCompile Include="..\..\..\test\Registry.cpp" />
<ClCompile Include="..\..\..\test\Renderer.cpp" />
Expand Down Expand Up @@ -162,14 +169,13 @@
</ImportGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<ForcedIncludeFiles>%(PrecompiledHeaderFile)</ForcedIncludeFiles>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand All @@ -178,14 +184,13 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>X64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<ForcedIncludeFiles>%(PrecompiledHeaderFile)</ForcedIncludeFiles>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand All @@ -194,13 +199,12 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ForcedIncludeFiles>%(PrecompiledHeaderFile)</ForcedIncludeFiles>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand All @@ -211,13 +215,12 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
<PreprocessorDefinitions>X64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ForcedIncludeFiles>%(PrecompiledHeaderFile)</ForcedIncludeFiles>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand Down
2 changes: 2 additions & 0 deletions tools/msvc/Tests/Tests.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
<ClCompile Include="..\..\..\test\Curves.cpp" />
<ClCompile Include="..\..\..\test\Registry.cpp" />
<ClCompile Include="..\..\..\test\TestOrthoViewManager.cpp" />
<ClCompile Include="..\..\..\test\precompiled.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\test\HeadlessOpenGLContext.h" />
Expand Down Expand Up @@ -138,6 +139,7 @@
<Filter>algorithm</Filter>
</ClInclude>
<ClInclude Include="..\..\..\test\TestOrthoViewManager.h" />
<ClInclude Include="..\..\..\test\precompiled.h" />
</ItemGroup>
<ItemGroup>
<Filter Include="algorithm">
Expand Down
1 change: 1 addition & 0 deletions tools/msvc/properties/Tests.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
</Link>
<ClCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup />
Expand Down

0 comments on commit 4efeba8

Please sign in to comment.