add waf, skeleton main.cc

This commit is contained in:
Josh Holtrop 2018-03-15 21:50:03 -04:00
commit 1ce1dc41ea
6 changed files with 222 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
/.lock-waf*
/.waf*
/build/
/test/tmp/
/coverage/

20
Makefile Normal file
View File

@ -0,0 +1,20 @@
all:
./waf build --targets oniguruma-test
.PHONY: clean
clean:
./waf clean
ifneq ($(FILTER),)
GTEST_FILTER := --gtest_filter=$(FILTER)
endif
.PHONY: build_tests
build_tests:
./waf build --targets tests
.PHONY: test
test: build_tests
./build/tests $(GTEST_FILTER)
@-rm -rf coverage
-gcovinator -b build -s src

3
configure vendored Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
exec ./waf configure "$@"

5
main.cc Normal file
View File

@ -0,0 +1,5 @@
#include <oniguruma.h>
int main(int argc, char * argv[])
{
}

169
waf vendored Executable file

File diff suppressed because one or more lines are too long

20
wscript Normal file
View File

@ -0,0 +1,20 @@
import platform
import re
import os.path
APPNAME = "oniguruma-test"
def options(opt):
opt.load("compiler_c compiler_cxx")
def configure(conf):
conf.load("compiler_c compiler_cxx")
conf.check_cfg(package = "oniguruma", args = "--cflags --libs")
def build(bld):
sources = bld.path.ant_glob("*.cc")
bld(features = "c cprogram cxx cxxprogram",
target = APPNAME,
source = sources,
cxxflags = ["-Wall", "-std=gnu++14", "-O2", "-Wno-switch"],
uselib = ["oniguruma"])