diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-06-03 09:58:54 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-06-03 09:58:54 +0200 |
| commit | 42338efc99190d4f3362ecbc326a740cb7bd0479 (patch) | |
| tree | 13b94bd8cfb17be13b35f7b2539bf03c7ad9592c /examples/settling_spheres_2d_hlbm_gpu/SConstruct | |
| parent | 1c9d05a7cf13b4bd4ebe5583d10cae85d507ea9c (diff) | |
| parent | d7c88d561d4e2b7a2706d14c11ea5fa4cd6ceaf3 (diff) | |
| download | libs-lbm-42338efc99190d4f3362ecbc326a740cb7bd0479.tar.gz | |
Merge branch 'fb-ibm-coupling' into dev
Diffstat (limited to 'examples/settling_spheres_2d_hlbm_gpu/SConstruct')
| -rw-r--r-- | examples/settling_spheres_2d_hlbm_gpu/SConstruct | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/examples/settling_spheres_2d_hlbm_gpu/SConstruct b/examples/settling_spheres_2d_hlbm_gpu/SConstruct new file mode 100644 index 0000000..0611b67 --- /dev/null +++ b/examples/settling_spheres_2d_hlbm_gpu/SConstruct @@ -0,0 +1,81 @@ +#!/usr/bin/env python3 + +import sys +import os +import os.path +import glob +import re + + +if sys.version_info < (3,): + def isbasestring(s): + return isinstance(s,basestring) +else: + def isbasestring(s): + return isinstance(s, (str,bytes)) + +def add_kel_source_files(self, sources, filetype, lib_env=None, shared=False, target_post=""): + + if isbasestring(filetype): + dir_path = self.Dir('.').abspath + filetype = sorted(glob.glob(dir_path+"/"+filetype)) + + for path in filetype: + target_name = re.sub( r'(.*?)(\.cpp|\.c\+\+)', r'\1' + target_post, path ) + if shared: + target_name+='.os' + sources.append( self.SharedObject( target=target_name, source=path ) ) + else: + target_name+='.o' + sources.append( self.StaticObject( target=target_name, source=path ) ) + pass + +def isAbsolutePath(key, dirname, env): + assert os.path.isabs(dirname), "%r must have absolute path syntax" % (key,) + +env_vars = Variables( + args=ARGUMENTS +) + +env_vars.Add('prefix', + help='Installation target location of build results and headers', + default='/usr/local/', + validator=isAbsolutePath +) + +env_vars.Add('build_examples', + help='If examples should be built', + default="true" +) + +env=Environment(ENV=os.environ, variables=env_vars, CPPPATH=[], + CPPDEFINES=['SAW_UNIX'], + CXXFLAGS=[ + '-std=c++20', + '-g', + '-Wall', + '-Wextra' + ], + LIBS=[ + 'forstio-core', + 'forstio-async', + 'forstio-io' + ] +); +env.__class__.add_source_files = add_kel_source_files +env.Tool('compilation_db'); +env.cdb = env.CompilationDatabase('compile_commands.json'); + +env.objects = []; +env.sources = []; +env.headers = []; +env.targets = []; + +Export('env') +SConscript('SConscript') + +env.Alias('cdb', env.cdb); +env.Alias('all', [env.targets]); +env.Default('all'); + +env.Alias('install', '$prefix') |
