From 7cc5fbe424732fd67f8b1aaf79dc01faa9becaec Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 16 Feb 2022 13:59:29 +0100 Subject: [PATCH] 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 Pick-to: 6.2 6.3 Fixes: QTBUG-94366 Change-Id: I9267b6f784babfbdaeafc65267ba96c75fa24112 Reviewed-by: Qt CI Bot Reviewed-by: Alexey Edelev --- cmake/QtProcessConfigureArgs.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake index 7799daa1d24..c74fbbf733d 100644 --- a/cmake/QtProcessConfigureArgs.cmake +++ b/cmake/QtProcessConfigureArgs.cmake @@ -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})