summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2022-01-06 15:21:40 +0100
committerAlexey Edelev <alexey.edelev@qt.io>2022-01-07 15:21:18 +0100
commit28da24a1a64fc901b858b586d4ce90bdca20d153 (patch)
tree9f83e8f9f85069dfa5165ff572066ee9684f6342 /cmake
parent0739170d4b3b25ce900549693a787bba0d8855b6 (diff)
Enable -bigobj by default for Qt
Add '-bigobj' for MSVC and '-Wa,-mbig-obj' for MINGW to the PlatformCommonInternal compiler options. Pick-to: 6.3 Change-Id: I706b83d189a116a3ab6f93d59593e237e66b0e2e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtInternalTargets.cmake9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake
index fc98e6215d..c1d97da641 100644
--- a/cmake/QtInternalTargets.cmake
+++ b/cmake/QtInternalTargets.cmake
@@ -196,7 +196,10 @@ if (MSVC)
)
endif()
- target_compile_options(PlatformCommonInternal INTERFACE -Zc:wchar_t)
+ target_compile_options(PlatformCommonInternal INTERFACE
+ -Zc:wchar_t
+ -bigobj
+ )
target_compile_options(PlatformCommonInternal INTERFACE
$<$<NOT:$<CONFIG:Debug>>:-guard:cf -Gw>
@@ -208,6 +211,10 @@ if (MSVC)
)
endif()
+if(MINGW)
+ target_compile_options(PlatformCommonInternal INTERFACE -Wa,-mbig-obj)
+endif()
+
if (GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "9.2")
target_compile_options(PlatformCommonInternal INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-Wsuggest-override>)
endif()