소스 검색

fix compilation error due to 'too many sections' for MinGW debug builds on Windows

Joakim Thorén 11 달 전
부모
커밋
89d7776775
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      lib/CMakeLists.txt

+ 10 - 0
lib/CMakeLists.txt

@@ -790,6 +790,16 @@ if(WIN32)
 	)
 endif()
 
+# Use -Og 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 "-Og")
+endif()
+
 vcmi_set_output_dir(vcmi "")
 
 enable_pch(vcmi)