cmake: dts: Fix passing multiple EXTRA_DTC_FLAGS to gen_defines.py

Since EXTRA_DTC_FLAGS will be ';' seperated if we pass that as is if
there are multiple items in the list we'll get an error.  Sanitize
EXTRA_DTC_FLAGS by replacing ';' with ' ' before we call gen_defines.py

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2021-02-03 14:10:43 -06:00 committed by Anas Nashif
parent bb739b13ee
commit 5a11af3ce2

View file

@ -210,9 +210,10 @@ if(SUPPORTS_DTS)
# Run gen_defines.py to create a header file, zephyr.dts, and edt.pickle.
#
string(REPLACE ";" " " EXTRA_DTC_FLAGS_RAW "${EXTRA_DTC_FLAGS}")
set(CMD_EXTRACT ${PYTHON_EXECUTABLE} ${GEN_DEFINES_SCRIPT}
--dts ${BOARD}.dts.pre.tmp
--dtc-flags '${EXTRA_DTC_FLAGS}'
--dtc-flags '${EXTRA_DTC_FLAGS_RAW}'
--bindings-dirs ${DTS_ROOT_BINDINGS}
--header-out ${DEVICETREE_UNFIXED_H}
--device-header-out ${DEVICE_EXTERN_H}