jes/wscript
2016-06-19 15:44:48 -04:00

30 lines
993 B
Python

import platform
import re
def options(opt):
opt.load("compiler_cxx")
def configure(conf):
conf.load("compiler_cxx")
conf.check(header_name = "getopt.h")
def build(bld):
bld(features = "cxx cxxprogram",
target = "jes",
source = bld.path.ant_glob("src/**/*.cc"),
cxxflags = ["-Wall", "-std=gnu++14"])
test_libs = []
if re.search(r'linux', platform.platform(), re.IGNORECASE):
test_libs += ["pthread"]
test_sources = bld.path.ant_glob("src/**/*.cc")
test_sources = [s for s in test_sources if not s.abspath().endswith("src/jes.cc")]
test_sources += bld.path.ant_glob("test/src/**/*.cc")
test_sources += ["gtest-1.7.0/src/gtest-all.cc",
"gtest-1.7.0/src/gtest_main.cc"]
bld(features = "cxx cxxprogram",
target = "tests",
source = test_sources,
includes = ["gtest-1.7.0/include", "gtest-1.7.0", "src"],
lib = test_libs,
cxxflags = ["-Wall", "-std=gnu++14"])