Skip to content

Commit cc51a8e

Browse files
committed
Fix xrGame build when Unity build is enabled
1 parent c5fc6be commit cc51a8e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/xrGame/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2523,13 +2523,19 @@ target_compile_definitions(xrGame
25232523
XRGAME_EXPORTS
25242524
)
25252525

2526-
# E2K hack: MCST lcc compiler does not support object files greater than 4Gb due to a bug in EDG frontend
2527-
if (CMAKE_CXX_COMPILER_ID MATCHES "LCC")
2526+
if (CMAKE_CXX_COMPILER_ID STREQUAL "LCC")
2527+
# E2K hack: MCST lcc compiler does not support object files greater than 4Gb due to a bug in EDG frontend
25282528
target_compile_options(xrGame
25292529
PRIVATE
25302530
-g0
25312531
)
25322532
message("Debug information generation is disabled for xrGame, because MCST lcc compiler does not support object files greater than 4 GB (EDG frontend bug).")
2533+
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
2534+
# Especially when Unity build is enabled, xrGame exceeds .obj file format limits
2535+
target_compile_options(xrGame
2536+
PRIVATE
2537+
/bigobj
2538+
)
25332539
endif()
25342540

25352541
set_target_properties(xrGame PROPERTIES

0 commit comments

Comments
 (0)