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 authored and Ovahlord committed 2022-01-28 21:14:47 +01:00
1 parent 2f99af8d70
commit f4c39d1aa9
2 files changed
+14

No files matched your search

@@ -0,0 +1,6 @@
<Project>
<PropertyGroup>
<UseMultiToolTask>false</UseMultiToolTask>
<UseMSBuildResourceManager>false</UseMSBuildResourceManager>
</PropertyGroup>
</Project>
+8
View File
@@ -151,6 +151,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)