Skip to content

Commit b6ae425

Browse files
committed
cmake unity build
* Improve compile times, tested no ccache full compile: * Linux debug 9800x3d: 1m25s to 25s (3.4x speedup) * Linux release 9800x3d: ??? to 1m31s (???x speedup) * Windows debug 9800x3d: 1m21s to 13s (6.2x speedup) * Windows release 9800x3d: 1m24s to 18s (4.6x speedup) * Linux debug github runner: 11m50s to ???s (???x speedup) * Linux release github runner: 13m43s to ??? (???x speedup) * From ~1.4k obj to ~190 * Lots of files not unity build due to IInput vs vgui::IInput ambiguity * Not doing materialsystem as it .inc relies on 1-file-per-obj * Windows cmd to measure: * powershell -Command "Measure-Command {cmake --build --preset windows-[debug/release] | Out-Default}" * fixes #1981
1 parent b880939 commit b6ae425

67 files changed

Lines changed: 1764 additions & 891 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ set(CMAKE_VERBOSE_MAKEFILE TRUE)
77
message(STATUS "CMAKE_VERSION: ${CMAKE_VERSION}")
88

99
string(TIMESTAMP BUILD_DATETIME UTC)
10-
message(STATUS "TIMESTAMP: ${BUILD_DATETIME}")
10+
# NEO TODO (nullsystem): This screwed up nvim's :make
11+
# message(STATUS "TIMESTAMP: ${BUILD_DATETIME}")
1112

1213
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
1314

@@ -179,6 +180,7 @@ if(OS_WINDOWS)
179180
/errorReport:prompt # ErrorReporting - Prompt Immediately
180181
/W4
181182
/Gw # Optimize Global Data
183+
/bigobj # Required for unity build
182184

183185
/wd4456
184186
/wd4457

0 commit comments

Comments
 (0)