summaryrefslogtreecommitdiffstats
path: root/test/CacheDir/custom_cachedir_fixture/SConstruct
blob: 8d9c47858427a9f61f1d5857e7774982a464a41d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# SPDX-License-Identifier: MIT
#
# Copyright The SCons Foundation

import SCons

class CustomCacheDir(SCons.CacheDir.CacheDir):
    @classmethod
    def copy_to_cache(cls, env, src, dst):
        print("MY_CUSTOM_CACHEDIR_CLASS")
        super().copy_to_cache(env, src, dst)

DefaultEnvironment(tools=[])
env = Environment(tools=[])
env.CacheDir('cache', CustomCacheDir)
env.Command('file.out', 'file.in', Copy('$TARGET', '$SOURCE'))