Skip to content

Commit 9f86517

Browse files
committed
CMake: Remove superfluous precompile_header feature and config test
Whether precompiled headers are used during the Qt build is controlled by the CMake variable BUILD_WITH_PCH and the qt_auto_detect_pch function. The precompiled_header feature wasn't actually used. Remove it and the corresponding configure test. Fixes: QTBUG-134425 Change-Id: I9b2ff9cbcf4888899b6a39d22d260388a9375c5c Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Alexandru Croitor <[email protected]>
1 parent 9df2086 commit 9f86517

File tree

5 files changed

+1
-37
lines changed

5 files changed

+1
-37
lines changed

config.tests/precompile_header/CMakeLists.txt

-8
This file was deleted.

config.tests/precompile_header/header.h

-8
This file was deleted.

config.tests/precompile_header/main.cpp

-7
This file was deleted.

configure.cmake

-13
Original file line numberDiff line numberDiff line change
@@ -288,12 +288,6 @@ int main(void)
288288
CXX_STANDARD 23
289289
)
290290

291-
# precompile_header
292-
qt_config_compile_test(precompile_header
293-
LABEL "precompiled header support"
294-
PROJECT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/config.tests/precompile_header"
295-
)
296-
297291
qt_config_compiler_supports_flag_test(optimize_debug
298292
LABEL "-Og support"
299293
FLAG "-Og"
@@ -732,12 +726,6 @@ qt_feature("c++2b" PUBLIC
732726
CONDITION QT_FEATURE_cxx20 AND (CMAKE_VERSION VERSION_GREATER_EQUAL "3.20") AND TEST_cxx2b
733727
)
734728
qt_feature_config("c++2b" QMAKE_PUBLIC_QT_CONFIG)
735-
qt_feature("precompile_header"
736-
LABEL "Using precompiled headers"
737-
CONDITION BUILD_WITH_PCH AND TEST_precompile_header
738-
AUTODETECT NOT WASM
739-
)
740-
qt_feature_config("precompile_header" QMAKE_PRIVATE_CONFIG)
741729
set(__qt_ltcg_detected FALSE)
742730
if(CMAKE_INTERPROCEDURAL_OPTIMIZATION)
743731
set(__qt_ltcg_detected TRUE)
@@ -1310,7 +1298,6 @@ qt_configure_add_summary_entry(
13101298
CONDITION GCC AND NOT CLANG AND ( QT_FEATURE_debug OR QT_FEATURE_force_debug_info OR QT_FEATURE_debug_and_release )
13111299
)
13121300
qt_configure_add_summary_entry(ARGS "relocatable")
1313-
qt_configure_add_summary_entry(ARGS "precompile_header")
13141301
qt_configure_add_summary_entry(ARGS "ltcg")
13151302
qt_configure_add_summary_entry(ARGS "intelcet")
13161303
qt_configure_add_summary_entry(ARGS "glibc_fortify_source")

qt_cmdline.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ qt_commandline_option(optimize-debug TYPE boolean NAME optimize_debug)
107107
qt_commandline_option(optimize-size TYPE boolean NAME optimize_size)
108108
qt_commandline_option(optimized-qmake TYPE boolean NAME release_tools)
109109
qt_commandline_option(optimized-tools TYPE boolean NAME release_tools)
110-
qt_commandline_option(pch TYPE boolean NAME precompile_header CMAKE_VARIABLE BUILD_WITH_PCH)
110+
qt_commandline_option(pch TYPE boolean CMAKE_VARIABLE BUILD_WITH_PCH)
111111
qt_commandline_option(pkg-config TYPE boolean)
112112
qt_commandline_option(platform TYPE string CMAKE_VARIABLE QT_QMAKE_TARGET_MKSPEC)
113113
qt_commandline_option(plugin-manifests TYPE boolean)

0 commit comments

Comments
 (0)