aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@qt.io>2021-12-14 11:57:11 +0100
committerCristian Adam <cristian.adam@qt.io>2021-12-14 11:41:18 +0000
commit42d02803609527cf6d71de7c70862d5cda4aae22 (patch)
tree6312372af7db26dad24ae93656dc5f8462e04d49
parent1b1527b64f9c432de12c033adbd227d91410fa49 (diff)
CMake: Only set COMPILE_OPTIONS if target ClangCodeModel exists
If Qt Creator is configured without Clang the target ClangCodeModel might not exist and CMake configuration would fail. Amends 08cbf13199d41690d3df3ba6535dc08e56dcb321 Change-Id: I1644d183bdcb4d9a6ae65e1257d9be7b7a0e5ff5 Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
-rw-r--r--src/plugins/clangcodemodel/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/clangcodemodel/CMakeLists.txt b/src/plugins/clangcodemodel/CMakeLists.txt
index 8d255dc8fc..9b89cd3cb5 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()
-if(big_obj_compile_option)
+if(big_obj_compile_option AND TARGET ClangCodeModel)
set_property(TARGET ClangCodeModel
APPEND PROPERTY COMPILE_OPTIONS ${big_obj_compile_option})
endif()