From 305f61a8077653fbb64242641521e0cd5e4679d0 Mon Sep 17 00:00:00 2001 From: Amir Masoud Abdol Date: Thu, 4 May 2023 15:14:26 +0200 Subject: [PATCH] Remove the -sysroot option from configure The `-sysroot` does not have any effect, and it can be removed. I added a warning in case someone is still using it. [ChangeLog][configure] The -sysroot option was removed. Use CMAKE_SYSROOT or CMAKE_TOOLCHAIN_FILE instead. Task-number: QTBUG-112951 Change-Id: Ib180b891ca8228ef1ebf9be43f2f6b8b5b5b0ee7 Reviewed-by: Joerg Bornemann --- cmake/QtProcessConfigureArgs.cmake | 8 ++++++++ cmake/configure-cmake-mapping.md | 2 -- config_help.txt | 2 -- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake index 8fa4be2af1a..2bc0f71bd03 100644 --- a/cmake/QtProcessConfigureArgs.cmake +++ b/cmake/QtProcessConfigureArgs.cmake @@ -985,6 +985,14 @@ endforeach() push("${MODULE_ROOT}") +if(INPUT_sysroot) + qtConfAddWarning("The -sysroot option is deprecated and no longer has any effect. " + "It is recommended to use a toolchain file instead, i.e., " + "-DCMAKE_TOOLCHAIN_FILE=. " + "Alternatively, you may use -DCMAKE_SYSROOT option " + "to pass the sysroot to CMake.\n") +endif() + # Restore the escaped semicolons in arguments that are lists list(TRANSFORM cmake_args REPLACE "\\[\\[;\\]\\]" "\\\\;") diff --git a/cmake/configure-cmake-mapping.md b/cmake/configure-cmake-mapping.md index af7e741dd0d..f3b3ffb3f43 100644 --- a/cmake/configure-cmake-mapping.md +++ b/cmake/configure-cmake-mapping.md @@ -80,8 +80,6 @@ The following table describes the mapping of configure options to CMake argument | -mp | n/a | | | -warnings-are-errors | -DWARNINGS_ARE_ERRORS=ON | | | -silent | n/a | | -| -sysroot | -DCMAKE_SYSROOT= | Should be provided by a toolchain file that's | -| | | passed via -DCMAKE_TOOLCHAIN_FILE= | | -no-gcc-sysroot | n/a | The corresponding CMake variables are CMAKE_SYSROOT_LINK | | | | and CMAKE_SYSROOT_COMPILE. | | | | They are usually set in a toolchain file. | diff --git a/config_help.txt b/config_help.txt index f63e52b8a88..f35ec4cc24c 100644 --- a/config_help.txt +++ b/config_help.txt @@ -157,8 +157,6 @@ Build options: Build environment: - -sysroot ....... Set as the target sysroot - -pkg-config .......... Use pkg-config [auto] (Unix only) -D .......... Pass additional preprocessor define