From 8bb21cfef3955e42bab30ca2dd074f29be5c2c36 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 19 Jun 2017 18:25:43 +0300 Subject: Move project into intermediate sub-directory --- hello/.gitignore | 17 +++++++++++++++++ hello/build/.gitignore | 1 + hello/build/bootstrap.build | 7 +++++++ hello/build/root.build | 9 +++++++++ hello/buildfile | 11 +++++++++++ hello/hello.cxx | 22 ++++++++++++++++++++++ hello/manifest | 18 ++++++++++++++++++ hello/test.out | 2 ++ 8 files changed, 87 insertions(+) create mode 100644 hello/.gitignore create mode 100644 hello/build/.gitignore create mode 100644 hello/build/bootstrap.build create mode 100644 hello/build/root.build create mode 100644 hello/buildfile create mode 100644 hello/hello.cxx create mode 100644 hello/manifest create mode 100644 hello/test.out (limited to 'hello') diff --git a/hello/.gitignore b/hello/.gitignore new file mode 100644 index 0000000..1e10829 --- /dev/null +++ b/hello/.gitignore @@ -0,0 +1,17 @@ +# Compiler/linker output. +# +*.d +*.ii +*.o +*.obj +*.so +*.dll +*.a +*.lib +*.exp +*.exe +*.exe.dlls/ +*.exe.manifest + +hello +version diff --git a/hello/build/.gitignore b/hello/build/.gitignore new file mode 100644 index 0000000..225c27f --- /dev/null +++ b/hello/build/.gitignore @@ -0,0 +1 @@ +config.build diff --git a/hello/build/bootstrap.build b/hello/build/bootstrap.build new file mode 100644 index 0000000..5990cab --- /dev/null +++ b/hello/build/bootstrap.build @@ -0,0 +1,7 @@ +project = hello + +using version +using config +using dist +using test +using install diff --git a/hello/build/root.build b/hello/build/root.build new file mode 100644 index 0000000..7c65dab --- /dev/null +++ b/hello/build/root.build @@ -0,0 +1,9 @@ +cxx.std = 11 + +using cxx + +cxx{*}: extension = cxx + +# Specify the test target for cross-testing. +# +test.target = $cxx.target diff --git a/hello/buildfile b/hello/buildfile new file mode 100644 index 0000000..95ac13d --- /dev/null +++ b/hello/buildfile @@ -0,0 +1,11 @@ +import libs = libhello%lib{hello} + +./: exe{hello} doc{version} file{manifest} + +doc{version}: file{manifest} # Generated by the version module. +doc{version}: dist = true + +exe{hello}: cxx{hello} $libs +exe{hello}: test.arguments = World "Planet #345732" +exe{hello}: test.output = test.out + diff --git a/hello/hello.cxx b/hello/hello.cxx new file mode 100644 index 0000000..728af76 --- /dev/null +++ b/hello/hello.cxx @@ -0,0 +1,22 @@ +// file: hello.cxx -*- C++ -*- + +#include + +#include + +using namespace std; + +int +main (int argc, char* argv[]) +{ + if (argc < 2) + { + cerr << "usage: hello ..." << endl; + return 1; + } + + using hello::say; + + for (int i (1); i != argc; ++i) + say (argv[i]); +} diff --git a/hello/manifest b/hello/manifest new file mode 100644 index 0000000..fb0a6d7 --- /dev/null +++ b/hello/manifest @@ -0,0 +1,18 @@ +: 1 +name: hello +version: 1.0.0 +summary: The "Hello World" example program +license: MIT +tags: c++, hello, world, example +description: \ +A simple program that implements the "Hello World" example in C++ using the +libhello library. Its primary goal is to show a canonical build2/bpkg +project/package. +\ +url: http://www.example.org/hello +email: hello-users@example.org +build-email: builds@build2.org +requires: c++11 +depends: * build2 >= 0.5.0- +depends: * bpkg >= 0.5.0- +depends: libhello [1.0.0 2.0.0-); compatible with libhello-1.X.Y diff --git a/hello/test.out b/hello/test.out new file mode 100644 index 0000000..275233c --- /dev/null +++ b/hello/test.out @@ -0,0 +1,2 @@ +Hello, World! +Hello, Planet #345732! -- cgit v1.1