Skip to content

Commit 8462a54

Browse files
msmolensjcfr
authored andcommitted
Fix compile error on MSVC with Qt 5.7.1
Fix the following compile error seen on MSVC with Qt 5.7.1 when building in Debug configuration: PythonQt\src\PythonQt.cpp : fatal error C1128: number of sections exceeded object file format limit : compile with /bigobj Extracted from 3dfe45d, authored by Stefan Dinkelacker <[email protected]>.
1 parent 93c2803 commit 8462a54

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,10 @@ set_target_properties(PythonQt PROPERTIES
317317
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
318318
)
319319

320+
target_compile_options(PythonQt PRIVATE
321+
$<$<CXX_COMPILER_ID:MSVC>:/bigobj>
322+
)
323+
320324
target_link_libraries(PythonQt
321325
${PYTHON_LIBRARY}
322326
${QT_LIBRARIES}

0 commit comments

Comments
 (0)