From ce8d327e8e8e1f528c6dad95f982a5b61f9edf1f Mon Sep 17 00:00:00 2001 From: cc9cii Date: Wed, 5 Mar 2014 22:11:10 +1100 Subject: [PATCH] Debug MSVC build of openmw needs number of sections beyond 2^16 --- apps/openmw/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index be583ea74..eb502de38 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -159,3 +159,10 @@ if (BUILD_WITH_CODE_COVERAGE) add_definitions (--coverage) target_link_libraries(openmw gcov) endif() + +if (MSVC) + # Debug version needs increased number of sections beyond 2^16 + if (CMAKE_CL_64) + set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /bigobj") + endif (CMAKE_CL_64) +endif (MSVC)