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 <joerg.bornemann@qt.io>
This commit is contained in:
Amir Masoud Abdol 2023-05-04 15:14:26 +02:00
parent cdd0e8fa67
commit 305f61a807
3 changed files with 8 additions and 4 deletions

View File

@ -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=<filename>. "
"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 "\\[\\[;\\]\\]" "\\\\;")

View File

@ -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 <dir> | -DCMAKE_SYSROOT=<dir> | Should be provided by a toolchain file that's |
| | | passed via -DCMAKE_TOOLCHAIN_FILE=<filename> |
| -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. |

View File

@ -157,8 +157,6 @@ Build options:
Build environment:
-sysroot <dir> ....... Set <dir> as the target sysroot
-pkg-config .......... Use pkg-config [auto] (Unix only)
-D <string> .......... Pass additional preprocessor define