about summary refs log tree commit diff stats
path: root/build2
diff options
context:
space:
mode:
Diffstat (limited to 'build2')
-rwxr-xr-xbuild211
1 files changed, 6 insertions, 5 deletions
diff --git a/build2 b/build2
index 293436ee..9b24bc81 100755
--- a/build2
+++ b/build2
@@ -14,6 +14,7 @@ test "$CXX" || export CXX=c++
 test "$CC" || export CC=cc
 test "$CFLAGS" || export CFLAGS="-g -O2"
 export CFLAGS="$CFLAGS -Wall -Wextra -ftrapv -fno-strict-aliasing"
+export CXXFLAGS="-std=c++98 $CFLAGS"  # CI has an ancient version; don't expect recent dialects
 
 # Outline:
 # [0-9]*.cc -> mu.cc -> .build/*.cc -> .build/*.o -> .build/mu_bin
@@ -81,7 +82,7 @@ noisy_cd() {
 }
 
 older_than enumerate/enumerate enumerate/enumerate.cc && {
-  $CXX $CFLAGS enumerate/enumerate.cc -o enumerate/enumerate
+  $CXX $CXXFLAGS enumerate/enumerate.cc -o enumerate/enumerate
 }
 
 older_than tangle/tangle tangle/*.cc && {
@@ -103,7 +104,7 @@ older_than tangle/tangle tangle/*.cc && {
     grep -h "^\s*void test_" [0-9]*.cc  |sed 's/^\s*void \(.*\)() {.*/"\1",/'  |update test_name_list
     # }
     # Now that we have all the _lists, compile 'tangle'
-    $CXX $CFLAGS boot.cc -o tangle
+    $CXX $CXXFLAGS boot.cc -o tangle
     ./tangle test
   noisy_cd ..  # no effect; just to show us returning to the parent directory
 }
@@ -115,7 +116,7 @@ older_than mu.cc $LAYERS enumerate/enumerate tangle/tangle && {
 }
 
 older_than cleave/cleave cleave/cleave.cc && {
-  $CXX $CFLAGS cleave/cleave.cc -o cleave/cleave
+  $CXX $CXXFLAGS cleave/cleave.cc -o cleave/cleave
   rm -rf .build
 }
 
@@ -139,7 +140,7 @@ older_than mu_bin mu.cc *_list cleave/cleave termbox/* && {
     for f in mu_*.cc
     do
       older_than `echo $f  |sed 's/\.cc$/.o/'` $f header global_declarations_list function_list test_list && {
-        $CXX $CFLAGS -c $f
+        $CXX $CXXFLAGS -c $f
       }
     done
   noisy_cd ../termbox
@@ -153,7 +154,7 @@ older_than mu_bin mu.cc *_list cleave/cleave termbox/* && {
       ar rcs libtermbox.a *.o
     }
   noisy_cd ..
-  $CXX $CFLAGS .build/*.o termbox/libtermbox.a -o .build/mu_bin
+  $CXX $CXXFLAGS .build/*.o termbox/libtermbox.a -o .build/mu_bin
   cp .build/mu_bin .
 }
 
45acafa0370db4a1'>^
a9151143 ^












fca55d2a ^
93d8141e ^
8b215b65 ^
3b02c3df ^
de0e57d3 ^
426fcd3e ^
11b4bd3e ^
d496dd0b ^
fd4d7b38 ^
63a4fd03 ^
be8799b7 ^
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73