فهرست منبع

Merge pull request #4923 from Kuxe/mingw_compilation_fix

MinGW debug compilation error fix 'too many sections'
Ivan Savenko 1 سال پیش
والد
کامیت
43117396bd
1فایلهای تغییر یافته به همراه10 افزوده شده و 0 حذف شده
  1. 10 0
      lib/CMakeLists.txt

+ 10 - 0
lib/CMakeLists.txt

@@ -790,6 +790,16 @@ if(WIN32)
 	)
 endif()
 
+# Use '-Wa,-mbig-obj' for files that generate very large object files
+# when compiling with MinGW lest you get "too many sections" assembler errors
+if(MINGW AND CMAKE_BUILD_TYPE STREQUAL "Debug")
+	set_source_files_properties(
+		serializer/SerializerReflection.cpp
+		IGameCallback.cpp
+		PROPERTIES
+		COMPILE_OPTIONS "-Wa,-mbig-obj")
+endif()
+
 vcmi_set_output_dir(vcmi "")
 
 enable_pch(vcmi)