aboutsummaryrefslogtreecommitdiff
path: root/SConscript
diff options
context:
space:
mode:
authorMatthew Bentham <Matthew.Bentham@arm.com>2023-06-15 11:50:57 +0000
committerMatthew Bentham <matthew.bentham@arm.com>2023-06-16 10:53:23 +0000
commitdd8d7f4102653ef55d872c71ae5d5f2ca2ead0c1 (patch)
tree33b6e44f5196b7af325c54c8db92ec437151eeb1 /SConscript
parentf66a7e864c3a44272dc81e806ac690c5cc3e4e28 (diff)
downloadComputeLibrary-dd8d7f4102653ef55d872c71ae5d5f2ca2ead0c1.tar.gz
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 <Matthew.Bentham@arm.com> Change-Id: If503111d46419022d9a3255ab6c9774b75c35b90 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/528085 Reviewed-by: Matthew Bentham <matthew.bentham@arm.com> Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Comments-Addressed: bsgcomp <bsgcomp@arm.com> Release-Notes: Jakub Sujak <jakub.sujak@arm.com> Release-Notes: Gunes Bayir <gunes.bayir@arm.com> Release-Notes: Ramy Elgammal <ramy.elgammal@arm.com> Tested-by: bsgcomp <bsgcomp@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9780 Benchmark: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'SConscript')
-rw-r--r--SConscript3
1 files changed, 2 insertions, 1 deletions
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)