dtl/test/SConstruct
2019-09-16 12:13:18 -06:00

42 lines
658 B
Python

# -*- coding: utf-8 -*-
# SConstrunct for dtl test
import os
def path_chomp(path):
if path[-1] == '/':
return path[:-1]
return path
env = Environment(
CPPFLAGS=['-Wall', '-O2'],
CPPPATH=['..'],
)
conf = Configure(env);
if not conf.CheckCXX():
print("c++ compiler is not installed!")
Exit(1)
libs = ['stdc++', 'pthread', 'gtest']
for lib in libs:
if not conf.CheckLib(lib):
print("library " + lib + " not installed!")
Exit(1)
conf.Finish()
test = env.Program(
'dtl_test',
[Glob('*.cpp')],
)
test_alias = env.Alias(
'check',
test,
test[0].abspath
)
env.AlwaysBuild(test_alias)