File: SConstruct

package info (click to toggle)
python-escript 5.0-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 87,772 kB
  • ctags: 49,550
  • sloc: python: 585,488; cpp: 133,173; ansic: 18,675; xml: 3,283; sh: 690; makefile: 215
file content (29 lines) | stat: -rw-r--r-- 655 bytes parent folder | download | duplicates (32)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import os
import inspect
import glob

# try to import an environment first
try:
  Import('env')
except:
  exec open("../../build/build-env.py")
  env = Environment()

# on mac we have to tell the linker to link against the C++ library
if env['PLATFORM'] == "darwin":
  env.Append(LINKFLAGS = "-lstdc++")

# find all .cus & .cpps in the current directory
sources = []
directories = ['.']
extensions = ['*.cu', '*.cpp']
for dir in directories:
  for ext in extensions:
    regexp = os.path.join(dir, ext)
    #sources.extend(env.Glob(regexp, strings = True))
    sources.extend(glob.glob(regexp))

# compile examples
for src in sources:
  env.Program(src)