From 3d3713ae7fdbc03e15a97fe67dd99c950bb929ce Mon Sep 17 00:00:00 2001 From: NikolayIT Date: Wed, 16 Jul 2014 11:37:57 +0300 Subject: [PATCH] Added optimization flag (-O1) for the GCC compiler on Windows platform to prevent "CGameState.cpp.obj: too many sections" compile error --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ef744909..c266b0756 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,7 +75,9 @@ if (WIN32) #copy libwinpthread-*.dll, libgcc_s_*.dll and libstdc++-*.dll to VCMI location set(dep_files ${dep_files} "${MINGW_BIN_PATH}/libwinpthread-*.dll") set(dep_files ${dep_files} "${MINGW_BIN_PATH}/libgcc_s_*.dll") - set(dep_files ${dep_files} "${MINGW_BIN_PATH}/libstdc++-*.dll") + set(dep_files ${dep_files} "${MINGW_BIN_PATH}/libstdc++-*.dll") + + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O1") endif() endif()