build: fix compatibility with meson 0.41 onwards
Versions of meson prior to 0.47 flattened the parameters to the "set_variable" function, which meant that the function could not take array variables as a parameter. Therefore, we need to disable driver tracking for those older versions, in order to maintain compatibility with the minimum supported 0.41 version, and also v0.45 shipped in Ubuntu 18.04 release. Fixes: 806c45dd483d ("build: add configuration summary at end of config") Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Tested-by: Timothy Redaelli <tredaelli@redhat.com>
This commit is contained in:
parent
e4f2047190
commit
77a5e7cdb2
@ -145,5 +145,8 @@ foreach class:driver_classes
|
|||||||
endif # build
|
endif # build
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
set_variable(class + '_drivers', class_drivers)
|
if meson.version().version_compare('>=0.47')
|
||||||
|
# prior to 0.47, set_variable can't take array params
|
||||||
|
set_variable(class + '_drivers', class_drivers)
|
||||||
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
33
meson.build
33
meson.build
@ -89,18 +89,23 @@ foreach lib:enabled_libs
|
|||||||
endforeach
|
endforeach
|
||||||
message(output_message + '\n')
|
message(output_message + '\n')
|
||||||
|
|
||||||
output_message = '\n===============\nDrivers Enabled\n===============\n'
|
|
||||||
foreach class:driver_classes
|
# prior to 0.47 set_variable didn't work with arrays, so we can't
|
||||||
class_drivers = get_variable(class + '_drivers')
|
# track driver lists easily
|
||||||
output_message += '\n' + class + ':\n\t'
|
if meson.version().version_compare('>=0.47')
|
||||||
output_count = 0
|
output_message = '\n===============\nDrivers Enabled\n===============\n'
|
||||||
foreach drv:class_drivers
|
foreach class:driver_classes
|
||||||
output_message += drv + ', '
|
class_drivers = get_variable(class + '_drivers')
|
||||||
output_count += 1
|
output_message += '\n' + class + ':\n\t'
|
||||||
if output_count == 8
|
output_count = 0
|
||||||
output_message += '\n\t'
|
foreach drv:class_drivers
|
||||||
output_count = 0
|
output_message += drv + ', '
|
||||||
endif
|
output_count += 1
|
||||||
|
if output_count == 8
|
||||||
|
output_message += '\n\t'
|
||||||
|
output_count = 0
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
endforeach
|
endforeach
|
||||||
endforeach
|
message(output_message + '\n')
|
||||||
message(output_message + '\n')
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user