aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@qt.io>2021-12-13 14:55:43 +0100
committerCristian Adam <cristian.adam@qt.io>2021-12-13 14:45:19 +0000
commit08cbf13199d41690d3df3ba6535dc08e56dcb321 (patch)
tree6f841059b976bbf3fc1e3ef4598ce87cb1948f69
parent5abae40f31a85a7b89a055b75cc9773ab8c0eb4e (diff)
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 9d6b8727ee56d6044c6506fd0b9c46ea05d3c161 Change-Id: I5c530517d1acc899ac375119ce0741a05ee52cea Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
-rw-r--r--src/plugins/clangcodemodel/CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/clangcodemodel/CMakeLists.txt b/src/plugins/clangcodemodel/CMakeLists.txt
index e8f15a2303..8d255dc8fc 100644
--- a/src/plugins/clangcodemodel/CMakeLists.txt
+++ b/src/plugins/clangcodemodel/CMakeLists.txt
@@ -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()