Build: Disable Visual Studio 2022 MSBuild resource manager to make compile take only as much time as it does in Visual Studio 2019

This commit is contained in:
Shauren
2022-01-28 12:52:05 +01:00
parent 4fbf6dacff
commit 2864efdc53
2 changed files with 14 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
<Project>
<PropertyGroup>
<UseMultiToolTask>false</UseMultiToolTask>
<UseMSBuildResourceManager>false</UseMSBuildResourceManager>
</PropertyGroup>
</Project>

View File

@@ -163,6 +163,14 @@ macro(DisableIncrementalLinking variable)
set(${variable} "${${variable}} /INCREMENTAL:NO")
endmacro()
# Disable Visual Studio 2022 build process management
# This will make compiler behave like in 2019 - compiling num_cpus * num_projects at the same time
# it is neccessary because of a bug in current implementation that makes scripts build only a single
# file at the same time after game project finishes building
if (NOT MSVC_TOOLSET_VERSION LESS 143)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/Directory.Build.props" DESTINATION "${CMAKE_BINARY_DIR}")
endif()
DisableIncrementalLinking(CMAKE_EXE_LINKER_FLAGS_DEBUG)
DisableIncrementalLinking(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO)
DisableIncrementalLinking(CMAKE_SHARED_LINKER_FLAGS_DEBUG)