forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user