summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@qt.io>2021-10-20 19:06:02 +0200
committerCristian Adam <cristian.adam@qt.io>2021-10-20 19:18:03 +0000
commit7e62840ec1021d3118e36ab7fb8a5b484bb9f2a8 (patch)
tree432918e87df1a2dc0142d0eb6323a501028d31d4 /CMakeLists.txt
parent428a9ee509afd4ac5fdee1395495c6ec3f1ab579 (diff)
downloadqt-creator-7e62840ec1021d3118e36ab7fb8a5b484bb9f2a8.tar.gz
CMake: Define BUILD_WITH_PCH before usage
On Windows QtCreatorAPIInternal.cmake would contain a check for BUILD_WITH_PCH and if not set add a few defines to the DEFAULT_DEFINES. First time the BUILD_WITH_PCH would not be set, because the option will be set later, the DEFAULT_DEFINES will contain the specific non-pch defines. The second time BUILD_WITH_PCH would be ON and those non-pch specific DEFAULT_DEFINES will be removed, and the build system has to do a full rebuild because the defines changed. Change-Id: I3f039a91667affc35f18103cfed062481f9dc93e Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 87be55233d..8911572ca0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 3.10)
## Add paths to check for cmake modules:
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+option(BUILD_WITH_PCH "Build with precompiled headers" ON)
+
include(FeatureSummary)
include(QtCreatorIDEBranding RESULT_VARIABLE IDE_BRANDING_FILE)
include(QtCreatorTranslations)
@@ -67,8 +69,6 @@ endif()
find_package(Qt5 COMPONENTS LinguistTools QUIET)
find_package(Qt5 COMPONENTS Quick QuickWidgets Designer DesignerComponents Help SerialPort Svg Tools QUIET)
-option(BUILD_WITH_PCH "Build with precompiled headers" ON)
-
find_package(Threads)
find_package(Clang QUIET)
find_package(KF5SyntaxHighlighting QUIET)