CMake: Fix compilation with Qt 5.15.x and MSVC

The code was replacing the existing COMPILE_OPTIONS property and
therefore fail to build when PCH was enabled.

Amends 9d6b8727ee

Change-Id: I5c530517d1acc899ac375119ce0741a05ee52cea
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Cristian Adam
2021-12-13 14:55:43 +01:00
parent 5abae40f31
commit 08cbf13199

View File

@@ -68,7 +68,7 @@ elseif(MSVC)
set(big_obj_compile_option "/bigobj")
endif()
extend_qtc_plugin(ClangCodeModel
CONDITION DEFINED big_obj_compile_option
PROPERTIES COMPILE_OPTIONS ${big_obj_compile_option}
)
if(big_obj_compile_option)
set_property(TARGET ClangCodeModel
APPEND PROPERTY COMPILE_OPTIONS ${big_obj_compile_option})
endif()