File: SConstruct

package info (click to toggle)
dtl 1.21-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 440 kB
  • sloc: cpp: 2,285; makefile: 2
file content (42 lines) | stat: -rw-r--r-- 685 bytes parent folder | download
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
30
31
32
33
34
35
36
37
38
39
40
41
42
# -*- 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=['..'],
    CXXFLAGS="-std=c++14",
)

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)