forked from qt-creator/qt-creator
CMake build: Enable BUILD_WITH_PCH for builds with Qt 6
The issues have been fixed in the meantime Fixes: QTCREATORBUG-25950 Change-Id: I22cf765acd3008a5b216a9e6afe5854589c7b515 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -52,20 +52,17 @@ find_package(Qt5
|
||||
)
|
||||
if (Qt5_VERSION VERSION_LESS 6.0.0)
|
||||
install(TARGETS Qt6Core5Compat EXPORT QtCreator)
|
||||
set(BUILD_WITH_PCH_DEFAULT ON)
|
||||
|
||||
# Specify standards conformance mode to MSVC 2017 and later
|
||||
# Qt6 has the values as part of the Qt6::Platform target interface
|
||||
if (MSVC AND MSVC_VERSION GREATER_EQUAL 1910)
|
||||
add_compile_options(/permissive- /Zc:__cplusplus)
|
||||
endif()
|
||||
else()
|
||||
set(BUILD_WITH_PCH_DEFAULT OFF)
|
||||
endif()
|
||||
find_package(Qt5 COMPONENTS LinguistTools QUIET)
|
||||
find_package(Qt5 COMPONENTS Designer DesignerComponents Help SerialPort Svg Tools QUIET)
|
||||
|
||||
option(BUILD_WITH_PCH "Build with precompiled headers" ${BUILD_WITH_PCH_DEFAULT})
|
||||
option(BUILD_WITH_PCH "Build with precompiled headers" ON)
|
||||
|
||||
find_package(Threads)
|
||||
find_package(Clang QUIET)
|
||||
|
Reference in New Issue
Block a user