configure: Remove unused facility to define variable assignments

The function qt_commandline_assignment and everything related to it is
removed from configure.  It was only used in qtbase, and all usage has
been removed.

More general variable assignments will be added in a subsequent commit.

Task-number: QTBUG-88210
Change-Id: I7cfa782e89914f2b0dc0277c46e425c8a825557e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Joerg Bornemann 2021-11-01 10:59:53 +01:00
parent a9d8794cf0
commit 6ab16d52d2
2 changed files with 1 additions and 36 deletions

View File

@ -160,7 +160,6 @@ defstub(qt_set01)
unset(commandline_known_options)
unset(commandline_custom_handlers)
set(commandline_nr_of_prefixes 0)
set(commandline_nr_of_assignments 0)
macro(qt_commandline_subconfig subconfig)
list(APPEND commandline_subconfigs "${subconfig}")
@ -198,13 +197,6 @@ function(qt_commandline_prefix arg var)
set(commandline_nr_of_prefixes ${n} PARENT_SCOPE)
endfunction()
function(qt_commandline_assignment var internal_var)
set(idx ${commandline_nr_of_assignments})
set(commandline_assignment_${idx} "${var}" "${internal_var}" PARENT_SCOPE)
math(EXPR n "${commandline_nr_of_assignments} + 1")
set(commandline_nr_of_assignments ${n} PARENT_SCOPE)
endfunction()
# Check the following variable in configure.cmake files to guard code that is not covered by the
# stub functions above.
set(QT_CONFIGURE_RUNNING ON)
@ -569,27 +561,6 @@ while(1)
continue()
endif()
if(arg MATCHES "^([A-Z0-9_]+)=(.*)")
set(lhs "${CMAKE_MATCH_1}")
set(rhs "${CMAKE_MATCH_2}")
math(EXPR n "${commandline_nr_of_assignments} - 1")
foreach(i RANGE ${n})
list(GET commandline_assignment_${i} 0 var)
list(GET commandline_assignment_${i} 1 internal_var)
if(lhs STREQUAL var)
set(handled TRUE)
qtConfCommandlineSetInput("${internal_var}" "${rhs}")
break()
endif()
endforeach()
if(NOT handled)
message(FATAL_ERROR "Assigning unknown variable '${lhs}' on command line.")
endif()
endif()
if(handled)
continue()
endif()
# parse out opt and val
set(nextok FALSE)
if(arg MATCHES "^--?enable-(.*)")

View File

@ -1413,11 +1413,6 @@ def parseCommandLinePrefixes(ctx, data, cm_fh):
cm_fh.write(f"qt_commandline_prefix({key} {data[key]})\n")
def parseCommandLineAssignments(ctx, data, cm_fh):
for key in data:
cm_fh.write(f"qt_commandline_assignment({key} {data[key]})\n")
def processCommandLine(ctx, data, cm_fh):
print(" commandline:")
@ -1439,8 +1434,7 @@ def processCommandLine(ctx, data, cm_fh):
print(" prefix:")
parseCommandLinePrefixes(ctx, commandLine["prefix"], cm_fh)
if "assignments" in commandLine:
print(" assignments:")
parseCommandLineAssignments(ctx, commandLine["assignments"], cm_fh)
print(" assignments are ignored")
def processInputs(ctx, data, cm_fh):