Allow passing configure opts with two dashes again

The regexp were capturing too greedy:
$$replace(c, "^--?(.*)", "\\1") changes --developer-build to
-developer-build. Do not accidentally capture the second dash.

Change-Id: I19586a1678fc3bf3f450ec31f5bd7e71e9514b34
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
bb10
Frederik Gladhorn 2016-07-01 00:44:29 +02:00 committed by Frederik Gladhorn
parent 200fdd96f0
commit 5b66f4ba40
1 changed files with 5 additions and 5 deletions

View File

@ -186,11 +186,11 @@ defineTest(qtConfParseCommandLine) {
} else: contains(c, "^--?system-(.*)") {
opt = $$replace(c, "^--?system-(.*)", "\\1")
val = system
} else: contains(c, "^--?(.*)=(.*)") {
opt = $$replace(c, "^--?(.*)=(.*)", "\\1")
val = $$replace(c, "^--?(.*)=(.*)", "\\2")
} else: contains(c, "^--?(.*)") {
opt = $$replace(c, "^--?(.*)", "\\1")
} else: contains(c, "^--?([^-].*)=(.*)") {
opt = $$replace(c, "^--?([^-].*)=(.*)", "\\1")
val = $$replace(c, "^--?([^-].*)=(.*)", "\\2")
} else: contains(c, "^--?([^-].*)") {
opt = $$replace(c, "^--?([^-].*)", "\\1")
val =
} else {
error("Invalid command line parameter $$c")