From c7ac72a9d21077d49ee696148e0409be07fc3664 Mon Sep 17 00:00:00 2001 From: Max Smolens Date: Tue, 11 Jul 2017 14:21:29 -0400 Subject: [PATCH] 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 https://github.com/commontk/PythonQt/pull/56/commits/3dfe45d, authored by Stefan Dinkelacker . --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7126b1e6..6bea6937 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -360,6 +360,10 @@ set_target_properties(PythonQt PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" ) +target_compile_options(PythonQt PRIVATE + $<$:/bigobj> + ) + target_link_libraries(PythonQt ${PYTHON_LIBRARY} ${QT_LIBRARIES}