Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable unity build to speed up compilation #4545

Merged
merged 4 commits into from
Dec 13, 2023

Conversation

ranisalt
Copy link
Member

@ranisalt ranisalt commented Oct 1, 2023

Pull Request Prelude

Changes Proposed

Unity build will batch several files to be compiled at once (as if they were #included into one), which leads to faster builds by reducing the number of times header files are processed.

MillhioreBT
MillhioreBT previously approved these changes Oct 7, 2023
Copy link
Contributor

@MillhioreBT MillhioreBT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why the unit test failed, but this really makes it compile faster.

EPuncker
EPuncker previously approved these changes Oct 7, 2023
nekiro
nekiro previously approved these changes Nov 9, 2023
Copy link
Contributor

@Zbizu Zbizu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be enabled in Windows also by adding this to .vcxproj
tested on most recent master branch (a904904) and it compiles

diff --git a/vc17/theforgottenserver.vcxproj b/vc17/theforgottenserver.vcxproj
index 0d040e59..4798b457 100644
--- a/vc17/theforgottenserver.vcxproj
+++ b/vc17/theforgottenserver.vcxproj
@@ -39,11 +39,13 @@
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
     <PlatformToolset>v143</PlatformToolset>
+       <EnableUnitySupport>true</EnableUnitySupport>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
     <PlatformToolset>v143</PlatformToolset>
+       <EnableUnitySupport>true</EnableUnitySupport>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">

EPuncker
EPuncker previously approved these changes Dec 10, 2023
@EPuncker EPuncker merged commit fee42e4 into otland:master Dec 13, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants