Skip to content

Commit

Permalink
Update SConscript
Browse files Browse the repository at this point in the history
  • Loading branch information
pfernique committed Oct 8, 2017
1 parent 9e28ca5 commit 63d4b8b
Showing 1 changed file with 31 additions and 43 deletions.
74 changes: 31 additions & 43 deletions src/cpp/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -134,52 +134,40 @@ with open('STL.cpp', 'w') as filehandler:

from SCons.Errors import EnvironmentError

try:
Import("env")
Import("env")

cppenv = env.Clone(tools = ['cpp'])
cppenv = env.Clone(tools = ['cpp'])

cppenv.AppendUnique(CPPDEFINES = ['LIBSTATISKIT_STL'])
exclude = """
""".split()
cppenv.AppendUnique(CPPDEFINES = ['LIBSTATISKIT_STL'])
exclude = """
""".split()

sources = [source for source in cppenv.Glob('*.h*') if not source.name in exclude]
targets = cppenv.CppDev(["statiskit", "stl"], sources)
Alias("cpp-dev", targets)
Alias("cpp", targets)
sources = [source for source in cppenv.Glob('*.h*') if not source.name in exclude]
targets = cppenv.CppDev(["statiskit", "stl"], sources)
Alias("cpp-dev", targets)
Alias("cpp", targets)
Alias("autowig", targets)
Alias("install", targets)
try:
wigenv = cppenv.Clone(tools = ['wig'])

targets = wigenv.BoostPythonWIG('statiskit_stl', [target for target in targets if target.name.endswith('.h')],
module='../py/wrapper/_stl.cpp',
decorator='../py/statiskit/stl/_stl.py',
parser_bootstrap=1,
controller='AutoWIG.py',
depends=[])
Alias("autowig", targets)
Alias("install", targets)
try:
wigenv = cppenv.Clone(tools = ['wig'])

targets = wigenv.BoostPythonWIG('statiskit_stl', [target for target in targets if target.name.endswith('.h')],
module='../py/wrapper/_stl.cpp',
decorator='../py/statiskit/stl/_stl.py',
parser_bootstrap=1,
controller='AutoWIG.py',
depends=[])
Alias("autowig", targets)
wigenv.Depends(targets, "cpp-dev")
except EnvironmentError:
Alias("autowig", [])
pass
except Exception:
raise

exclude = """
""".split()

sources = [source for source in cppenv.Glob('*.cpp') if not source.name in exclude]
targets = cppenv.CppLib("statiskit_stl", sources)
Alias("cpp-lib", targets)
Alias("cpp", targets)
Alias("install", targets)
except EnvironmentError:
Alias("cpp-dev", [])
Alias("cpp-lib", [])
Alias("cpp", [])
wigenv.Depends(targets, "cpp-dev")
except Exception:
Alias("autowig", [])
Alias("install", [])
pass
except Exception:
raise

exclude = """
""".split()

sources = [source for source in cppenv.Glob('*.cpp') if not source.name in exclude]
targets = cppenv.CppLib("statiskit_stl", sources)
Alias("cpp-lib", targets)
Alias("cpp", targets)
Alias("install", targets)

0 comments on commit 63d4b8b

Please sign in to comment.