summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-11-10 15:56:35 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2022-02-15 15:47:29 +0100
commit4afd7f5d08a77e3db2abba5e6aeda91d10919747 (patch)
treeea3c3b5a1a1b3ae5e49f47b5c199f8b8e3d02c91 /cmake
parent360f181857778a46e1b4bc48bc5176337f92c059 (diff)
configure: Fix --foo=bar arguments
This amends commit c5409964b0c627b25131c73f95794314feb51b5d. When detecting a variable assignment, we must ignore arguments that start with a dash. Otherwise, arguments like --prefix=~/Qt are ignored. Change-Id: I3b143113b94ca0d8af92679c1f567fbcec298349 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit a3d8a359f17e35b7485770ac9a3a731900749276) Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtProcessConfigureArgs.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake
index d7df9e142f..1940b250fd 100644
--- a/cmake/QtProcessConfigureArgs.cmake
+++ b/cmake/QtProcessConfigureArgs.cmake
@@ -590,7 +590,7 @@ while(1)
endif()
# Handle variable assignments
- if(arg MATCHES "^([a-zA-Z0-9_-]+)=(.*)")
+ if(arg MATCHES "^([a-zA-Z0-9_][a-zA-Z0-9_-]*)=(.*)")
list(APPEND cmake_var_assignments "${arg}")
continue()
endif()