From 126c5c501a305ee43c5e51261421266f09ed3bb4 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 4 Dec 2020 14:17:46 +0100 Subject: [PATCH] CMake: Disable building Qt with qmake Print an error message when configure is passed the -qmake option. The only supported way to build Qt now is with CMake. This means the CMakeLists.txt files are the source of truth now, and pro2cmake will not have to be used anymore. The .pro files can be removed at a later time. The same is true for configure.cmake files. They are the authoritative source, and the configure.json files will be removed at a later time. Task-number: QTBUG-88741 Change-Id: Ia9de4c1411978b40b13e9b982977e7818164c984 Reviewed-by: Joerg Bornemann --- configure | 7 +++++++ configure.bat | 3 +++ 2 files changed, 10 insertions(+) diff --git a/configure b/configure index b76f22a43f3..1d23b8eb406 100755 --- a/configure +++ b/configure @@ -920,6 +920,12 @@ else fi } +printQmakeBuildErrorAndExit() +{ + echo >&2 "ERROR: You cannot configure Qt 6 with qmake anymore. Please configure with -cmake instead." + exit 1 +} + checkTopLevelBuild "$@" parseCommandline "$@" handleHelp @@ -945,6 +951,7 @@ if [ "$BUILD_WITH_CMAKE" = "yes" ]; then cmake "-DOPTFILE=$optfilename" $top_level_arg -P "$relpath/cmake/QtProcessConfigureArgs.cmake" else + printQmakeBuildErrorAndExit findPerl findAwk findMake diff --git a/configure.bat b/configure.bat index 171074bc689..ca106486a6d 100644 --- a/configure.bat +++ b/configure.bat @@ -163,6 +163,9 @@ goto doneargs if "%CMAKE%" == "true" goto cmake +echo ERROR: You cannot configure Qt 6 with qmake anymore. Please configure with -cmake instead. >&2 +exit /b 1 + rem Find various executables for %%C in (clang-cl.exe clang.exe cl.exe icl.exe g++.exe perl.exe jom.exe) do set %%C=%%~$PATH:C