diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-01-22 10:27:59 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-01-22 10:27:59 +0200 |
commit | d1753af195bccde1690f639ee83a6a8611d9e323 (patch) | |
tree | 4f51663112a1be23ef7089fc29f8df86d38bef2f /print |
"Hello World" printer C++ library with build2
Diffstat (limited to 'print')
-rw-r--r-- | print/buildfile | 8 | ||||
-rw-r--r-- | print/print | 8 | ||||
-rw-r--r-- | print/print.cxx | 13 |
3 files changed, 29 insertions, 0 deletions
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 <string> + +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 <print/print> + +#include <iostream> + +using namespace std; + +void +print (const string& h) +{ + cout << h << endl; +} |