From dd8d7f4102653ef55d872c71ae5d5f2ca2ead0c1 Mon Sep 17 00:00:00 2001 From: Matthew Bentham Date: Thu, 15 Jun 2023 11:50:57 +0000 Subject: Escape double qoutes in embedded version string Allows for double quotes to be used in build options without breaking compilation of Version.cpp Signed-off-by: Matthew Bentham Change-Id: If503111d46419022d9a3255ab6c9774b75c35b90 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/528085 Reviewed-by: Matthew Bentham Reviewed-by: Jakub Sujak Comments-Addressed: bsgcomp Release-Notes: Jakub Sujak Release-Notes: Gunes Bayir Release-Notes: Ramy Elgammal Tested-by: bsgcomp Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9780 Benchmark: Arm Jenkins Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- SConscript | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'SConscript') diff --git a/SConscript b/SConscript index 370486eace..904d5babf1 100644 --- a/SConscript +++ b/SConscript @@ -220,7 +220,8 @@ def create_version_file(target, source, env): except (OSError, subprocess.CalledProcessError): git_hash="unknown" - build_info = "\"arm_compute_version=%s Build options: %s Git hash=%s\"" % (VERSION, vars.args, git_hash.strip()) + build_options = str(vars.args).replace('"', '\\"') + build_info = "\"arm_compute_version=%s Build options: %s Git hash=%s\"" % (VERSION,build_options, git_hash.strip()) with open(target[0].get_path(), "w") as fd: fd.write(build_info) -- cgit v1.2.1