From 7b19ba10dbb1aed19779f1e9296afce784395b96 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sun, 30 Jul 2017 16:05:51 +0300 Subject: Convert to use utility library --- build/root.build | 4 ++++ cli/buildfile | 9 +++++---- unit-tests/lexer/buildfile | 8 +------- unit-tests/parser/buildfile | 10 +--------- 4 files changed, 11 insertions(+), 20 deletions(-) diff --git a/build/root.build b/build/root.build index ee1272a..fc8c83c 100644 --- a/build/root.build +++ b/build/root.build @@ -21,6 +21,10 @@ cxx.poptions =+ "-I$out_root" "-I$src_root" # using? cli +# Don't link whole archives by default in unit-tests/. +# +unit-tests/libu{*}: bin.whole = false + # Specify the test target for cross-testing. # test.target = $cxx.target diff --git a/cli/buildfile b/cli/buildfile index 48edffd..e64458f 100644 --- a/cli/buildfile +++ b/cli/buildfile @@ -4,10 +4,11 @@ import libs = libcutl%lib{cutl} -exe{cli}: {hxx ixx txx cxx}{** -version -options} \ - {hxx}{version} \ - {hxx ixx cxx}{options} \ - $libs +exe{cli}: cxx{cli} libu{cli} + +libu{cli}: {hxx ixx txx cxx}{** -cli -version -options} \ + {hxx}{version} {hxx ixx cxx}{options} \ + $libs hxx{version}: in{version} $src_root/file{manifest} hxx{version}: dist = true diff --git a/unit-tests/lexer/buildfile b/unit-tests/lexer/buildfile index 0b4fbcf..3827d04 100644 --- a/unit-tests/lexer/buildfile +++ b/unit-tests/lexer/buildfile @@ -2,11 +2,5 @@ # copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC # license : MIT; see accompanying LICENSE file -#@@ Temporary until we get utility library support. -# -import libs = libcutl%lib{cutl} -src = lexer - -exe{driver}: {hxx cxx}{*} ../../cli/cxx{$src} $libs test{testscript} - include ../../cli/ +exe{driver}: {hxx cxx}{*} ../../cli/libu{cli} test{testscript} diff --git a/unit-tests/parser/buildfile b/unit-tests/parser/buildfile index 44020d8..381f56a 100644 --- a/unit-tests/parser/buildfile +++ b/unit-tests/parser/buildfile @@ -2,13 +2,5 @@ # copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC # license : MIT; see accompanying LICENSE file -#@@ Temporary until we get utility library support. -# -import libs = libcutl%lib{cutl} -src = lexer parser \ -semantics/{class elements expression namespace option unit} \ -traversal/{class elements namespace option unit} - -exe{driver}: {hxx cxx}{*} ../../cli/cxx{$src} $libs test{testscript} - include ../../cli/ +exe{driver}: {hxx cxx}{*} ../../cli/libu{cli} test{testscript} -- cgit v1.1