Skip to content

Commit 6265047

Browse files
committed
More updates to build2 files.
1 parent 0d96112 commit 6265047

12 files changed

Lines changed: 86 additions & 239 deletions

File tree

.gitignore

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Build artifacts
2-
.bdep/
2+
/build-*/
3+
/build_*/
4+
/build/bootstrap/
5+
/.bdep/
6+
.bpkg/
7+
8+
**/*.config.build
9+
**/*.config.build.save
10+
311
*.o
412
*.a
513
*.so
@@ -21,6 +29,20 @@ Thumbs.db
2129
tests/static/*.txt
2230
tests/benchmarks/results/
2331

32+
# Build2 symlinks exes from build dir to src dir for convenient
33+
examples/debug_conv
34+
examples/debug_pool
35+
examples/edge_detection
36+
examples/xor_gate
37+
tests/benchmarks/test_timing_consistency
38+
tests/unit/test_activations
39+
tests/unit/test_convolution
40+
tests/unit/test_fixed_point
41+
tests/unit/test_hash_basic
42+
tests/unit/test_hash_consistency
43+
tests/unit/test_matrix_reproducibility
44+
tests/unit/test_pooling
45+
2446
# Temporary files
2547
*.tmp
2648
*.log

CMakeLists.txt

Lines changed: 0 additions & 197 deletions
This file was deleted.

build/.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/config.build
2-
/root/
3-
/bootstrap/
4-
build/
1+
*.config.build
2+
*.config.build.save
3+
*.variables.build
4+
5+
.DS_Store

build/bootstrap.build

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ project = certifiable-inference
22

33
using version
44
using config
5-
using test
65
using install
7-
using dist
6+
using test

build/export.build

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export \
2+
{
3+
include = include/
4+
}

build/root.build

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
1-
c.std = 99
2-
31
using c
2+
using test
43

5-
# Strict C compiler flags
6-
c.coptions += -Wall -Wextra -Werror -pedantic -Wno-unused-parameter
4+
c.std = c99
5+
c.warnings = all
6+
c.coptions += -Werror -pedantic -Wno-unused-parameter
77

8-
# Enable -fanalyzer if available
98
if ($c.id == 'gcc')
109
c.coptions += -fanalyzer
1110

12-
# Math library
13-
c.libs += -lm
14-
15-
# Include directories
16-
c.poptions =+ "-I$out_root" "-I$src_root/include"
17-
18-
using install
19-
using test
11+
c.poptions =+ "-I$src_root/include"

buildfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
./: {*/ -build/ -tools/ -certifiable-build/ -include/ -.github/ -docs/} manifest
22

3-
# Import subdirectories
4-
import libs = src/
5-
import exes = examples/
3+
./: src/ examples/ tests/
4+
5+
import src = src/
6+
import examples = examples/
67
import tests = tests/

examples/buildfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import libs = ../src/
1+
exes = exe{xor_gate edge_detection debug_conv debug_pool}
22

3-
exe{xor_gate}: c{xor_gate} $libs
4-
exe{edge_detection}: c{edge_detection} $libs
5-
exe{debug_conv}: c{debug_conv} $libs
6-
exe{debug_pool}: c{debug_pool} $libs
3+
exe{xor_gate}: c{xor_gate} ../src/liba{certifiable_inference}
4+
exe{edge_detection}: c{edge_detection} ../src/liba{certifiable_inference}
5+
exe{debug_conv}: c{debug_conv} ../src/liba{certifiable_inference}
6+
exe{debug_pool}: c{debug_pool} ../src/liba{certifiable_inference}
7+
8+
./: $exes

src/buildfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
lib{certifiable_inference}: core/c{*} containers/c{*} ../include/h{*}
1+
liba{certifiable_inference}: \
2+
c{core/**.c} \
3+
c{containers/**.c} \
4+
h{../include/**.h}
5+
{
6+
export = true
7+
install = true
8+
libs = -lm
9+
}
210

3-
lib{certifiable_inference}: ../include/h{*}: install = include/
11+
./: liba{certifiable_inference}

tests/benchmarks/buildfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1-
import libs = ../../src/
1+
bench = exe{test_timing_consistency}
22

3-
exe{timing_benchmark}: c{test_timing_consistency} $libs
3+
exe{test_timing_consistency}: c{test_timing_consistency} ../../src/liba{certifiable_inference}
4+
5+
$bench:
6+
{
7+
test = true
8+
}
9+
10+
./: $bench

0 commit comments

Comments
 (0)