summaryrefslogtreecommitdiff
path: root/examples/cavity_2d/SConstruct
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2025-09-09 11:08:58 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2025-09-09 11:08:58 +0200
commit3c2778f440a48ec809b6c9d176c393cbefbee69d (patch)
tree96894a8209936212a489f943db8c3a72df714647 /examples/cavity_2d/SConstruct
parent7ff6ea3bde6eb1d3b55c558303c48e065c38199b (diff)
Isolating the gpu setup
Diffstat (limited to 'examples/cavity_2d/SConstruct')
-rw-r--r--examples/cavity_2d/SConstruct80
1 files changed, 0 insertions, 80 deletions
diff --git a/examples/cavity_2d/SConstruct b/examples/cavity_2d/SConstruct
deleted file mode 100644
index fc60882..0000000
--- a/examples/cavity_2d/SConstruct
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/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-codec'
- ]
-);
-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')