From ea1f76a7c946452a04c9cc4c085b5913836da2e7 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 10 Jul 2015 02:31:04 +0200 Subject: [PATCH] Fix VS2013 64bit compiler error C1128: number of sections exceeded object file format limit : compile with /bigobj --- code/ryzom/server/src/entities_game_service/CMakeLists.txt | 4 ++++ code/ryzom/server/src/shard_unifier_service/CMakeLists.txt | 4 ++++ code/ryzom/tools/sheets_packer_shard/CMakeLists.txt | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/code/ryzom/server/src/entities_game_service/CMakeLists.txt b/code/ryzom/server/src/entities_game_service/CMakeLists.txt index 15e7794a4..886f5eee9 100644 --- a/code/ryzom/server/src/entities_game_service/CMakeLists.txt +++ b/code/ryzom/server/src/entities_game_service/CMakeLists.txt @@ -111,6 +111,10 @@ NL_ADD_RUNTIME_FLAGS(ryzom_entities_game_service) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) +IF(MSVC) + SET_TARGET_PROPERTIES(ryzom_entities_game_service PROPERTIES COMPILE_FLAGS "/bigobj") +ENDIF(MSVC) + IF(WITH_PCH AND NOT MINGW) # FIXME: PCH too large (> 130MB), crashes cc1plus under MinGW ADD_NATIVE_PRECOMPILED_HEADER(ryzom_entities_game_service ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) ENDIF(WITH_PCH AND NOT MINGW) diff --git a/code/ryzom/server/src/shard_unifier_service/CMakeLists.txt b/code/ryzom/server/src/shard_unifier_service/CMakeLists.txt index 4ba320e09..08ca313c4 100644 --- a/code/ryzom/server/src/shard_unifier_service/CMakeLists.txt +++ b/code/ryzom/server/src/shard_unifier_service/CMakeLists.txt @@ -20,6 +20,10 @@ NL_ADD_RUNTIME_FLAGS(ryzom_shard_unifier_service) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) +IF(MSVC) + SET_TARGET_PROPERTIES(ryzom_shard_unifier_service PROPERTIES COMPILE_FLAGS "/bigobj") +ENDIF(MSVC) + IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(ryzom_shard_unifier_service ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) ENDIF(WITH_PCH) diff --git a/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt b/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt index 3e9f2a17f..a16353cdd 100644 --- a/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt +++ b/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt @@ -12,6 +12,7 @@ ADD_EXECUTABLE(sheets_packer_shard ${SRC} ${EGSSHEETS} ${CMAKE_SOURCE_DIR}/ryzom/server/src/ai_service/sheets.h ${CMAKE_SOURCE_DIR}/ryzom/server/src/ai_service/commands_mlf.cpp) + INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/ryzom/common/src ${CMAKE_SOURCE_DIR}/ryzom/server/src ${CMAKE_SOURCE_DIR}/ryzom/tools/sheets_packer_shard ${CMAKE_SOURCE_DIR}/ryzom/server/src/entities_game_service) TARGET_LINK_LIBRARIES(sheets_packer_shard ryzom_gameshare @@ -31,4 +32,8 @@ NL_ADD_RUNTIME_FLAGS(sheets_packer_shard) ADD_DEFINITIONS(-DNO_EGS_VARS) ADD_DEFINITIONS(-DNO_AI_COMP) +IF(MSVC) + SET_TARGET_PROPERTIES(sheets_packer_shard PROPERTIES COMPILE_FLAGS "/bigobj") +ENDIF(MSVC) + INSTALL(TARGETS sheets_packer_shard RUNTIME DESTINATION ${RYZOM_BIN_PREFIX} COMPONENT tools)