configure: Don't escape backslashes in passed configure arguments

It broke drive-less (no C:\ prefix) paths passed to configure.

Invoking configure on Windows with the following args
  qtbase/configure --
 -DCMAKE_INSTALL_PREFIX=\Users\qt\work\install

called CMake with
 -DCMAKE_INSTALL_PREFIX=\\Users\\qt\\work\\install

saying
 Qt will be installed into '//Users/qt/work/install'

and while the build succeeded, installation would fail with

  CMake Error at cmake_install.cmake:41 (file):
    file cannot create directory:
    //Users/qt/work/install/lib/cmake/Qt6BuildInternals.  Maybe need
    administrative privileges.

Note the double slash in the beginning is likely interpreted as a
Windows share URI / UNC path.

The same would happen when passing -prefix '\Users\qt\work\install'

As a reminder, we want to support drive-less prefix paths because
that's what Qt's Coin CI uses passes to ensure DESTDIR installation
works correctly.

Amends cb7f4030bc89471aa6489be60ac1c728a3dfd06b

Fixes: QTBUG-94366
Change-Id: I9267b6f784babfbdaeafc65267ba96c75fa24112
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 7cc5fbe424732fd67f8b1aaf79dc01faa9becaec)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Alexandru Croitor 2022-02-16 13:59:29 +01:00 committed by Qt Cherry-pick Bot
parent 37102b0260
commit dc358c9279

View File

@ -69,7 +69,6 @@ list(TRANSFORM configure_args REPLACE ";" "[[;]]")
list(FILTER configure_args EXCLUDE REGEX "^[ \t]*$")
list(TRANSFORM configure_args STRIP)
list(TRANSFORM configure_args REPLACE "\\\\" "\\\\\\\\")
unset(generator)
set(auto_detect_compiler TRUE)
set(auto_detect_generator ${qtbase_or_top_level_build})