From d1753af195bccde1690f639ee83a6a8611d9e323 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 22 Jan 2016 10:27:59 +0200 Subject: "Hello World" printer C++ library with build2 --- print/buildfile | 8 ++++++++ print/print | 8 ++++++++ print/print.cxx | 13 +++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 print/buildfile create mode 100644 print/print create mode 100644 print/print.cxx (limited to 'print') diff --git a/print/buildfile b/print/buildfile new file mode 100644 index 0000000..20a7d60 --- /dev/null +++ b/print/buildfile @@ -0,0 +1,8 @@ +lib{print}: {hxx cxx}{print} + +cxx.poptions += -I$src_root +lib{print}: cxx.export.poptions = -I$src_root + +# Install into the print/ subdirectory of, say, /usr/include/. +# +install.include = $install.include/print diff --git a/print/print b/print/print new file mode 100644 index 0000000..8943b6e --- /dev/null +++ b/print/print @@ -0,0 +1,8 @@ +// file: print/print -*- C++ -*- + +#pragma once + +#include + +void +print (const std::string& hello); diff --git a/print/print.cxx b/print/print.cxx new file mode 100644 index 0000000..99a466d --- /dev/null +++ b/print/print.cxx @@ -0,0 +1,13 @@ +// file: print/print.cxx -*- C++ -*- + +#include + +#include + +using namespace std; + +void +print (const string& h) +{ + cout << h << endl; +} -- cgit v1.1