move some sources to src/core
This commit is contained in:
parent
e9c4d6419f
commit
e16e81375b
10
wscript
10
wscript
@ -1,5 +1,6 @@
|
||||
import platform
|
||||
import re
|
||||
import os.path
|
||||
|
||||
def options(opt):
|
||||
opt.load("compiler_c compiler_cxx")
|
||||
@ -9,23 +10,26 @@ def configure(conf):
|
||||
conf.check(header_name = "getopt.h")
|
||||
|
||||
def build(bld):
|
||||
includes = [p for p in bld.path.ant_glob("src/**", dir = True) if os.path.isdir(p.abspath())]
|
||||
bld(features = "c cprogram cxx cxxprogram",
|
||||
target = "jes",
|
||||
source = bld.path.ant_glob(["src/**/*.cc", "src/**/*.c"]),
|
||||
includes = includes,
|
||||
cxxflags = ["-Wall", "-std=gnu++14"],
|
||||
lib = ["dl", "GL"])
|
||||
|
||||
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("src/core/**/*.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"]
|
||||
test_includes = ["src/core"]
|
||||
test_includes += ["gtest-1.7.0/include", "gtest-1.7.0"]
|
||||
bld(features = "cxx cxxprogram",
|
||||
target = "tests",
|
||||
source = test_sources,
|
||||
includes = ["gtest-1.7.0/include", "gtest-1.7.0", "src"],
|
||||
includes = test_includes,
|
||||
lib = test_libs,
|
||||
cxxflags = ["-Wall", "-std=gnu++14"])
|
||||
|
Loading…
x
Reference in New Issue
Block a user