diff options
author | Anthony Barbier <anthony.barbier@arm.com> | 2018-08-24 11:22:08 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:54:54 +0000 |
commit | 0e72c69e9896a83d4f393ab63333223b428e7505 (patch) | |
tree | 1cd74a9527c6f0f4cd38c116d39132ad969c57be /SConscript | |
parent | 9fb6c7e5c9bd60727e119fc370fb4d5b5d605fd1 (diff) | |
download | armcl-0e72c69e9896a83d4f393ab63333223b428e7505.tar.gz armcl-0e72c69e9896a83d4f393ab63333223b428e7505.tar.bz2 armcl-0e72c69e9896a83d4f393ab63333223b428e7505.zip |
COMPMID-1246: Always re-generate arm_compute_version.embed
- This won't trigger a rebuild of the library if the file is unchanged (i.e SCons does a checksum after the file is generated)
- This fix the issue when build options or a commit changes and the file isn't updated
Change-Id: Ic1d0f5435960b4c50b07b54484b660d6f8ce3f71
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/145540
Reviewed-by: Michele DiGiorgio <michele.digiorgio@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'SConscript')
-rw-r--r-- | SConscript | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/SConscript b/SConscript index 7b0753ddc..36fa7b6af 100644 --- a/SConscript +++ b/SConscript @@ -118,15 +118,16 @@ def create_version_file(target, source, env): except (OSError, subprocess.CalledProcessError): git_hash="unknown" - version_filename = "%s/arm_compute_version.embed" % Dir("src/core").path build_info = "\"arm_compute_version=%s Build options: %s Git hash=%s\"" % (VERSION, vars.args, git_hash.strip()) with open(target[0].get_path(), "w") as fd: fd.write(build_info) arm_compute_env = env.Clone() +version_file = arm_compute_env.Command("src/core/arm_compute_version.embed", "", action=create_version_file) +arm_compute_env.AlwaysBuild(version_file) # Generate embed files -generate_embed = [ arm_compute_env.Command("src/core/arm_compute_version.embed", "", action=create_version_file) ] +generate_embed = [ version_file ] if env['opencl'] and env['embed_kernels']: cl_files = Glob('src/core/CL/cl_kernels/*.cl') cl_files += Glob('src/core/CL/cl_kernels/*.h') |