diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-06-19 18:25:43 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-06-19 18:25:43 +0300 |
commit | 8bb21cfef3955e42bab30ca2dd074f29be5c2c36 (patch) | |
tree | 988419a3bb68c6233792e820725c09daf5b66d3c /hello | |
parent | 8f70a0a00cec8a5c72fb5bcc9a7b2b37af29736e (diff) |
Move project into intermediate sub-directory
Diffstat (limited to 'hello')
-rw-r--r-- | hello/.gitignore | 17 | ||||
-rw-r--r-- | hello/build/.gitignore | 1 | ||||
-rw-r--r-- | hello/build/bootstrap.build | 7 | ||||
-rw-r--r-- | hello/build/root.build | 9 | ||||
-rw-r--r-- | hello/buildfile | 11 | ||||
-rw-r--r-- | hello/hello.cxx | 22 | ||||
-rw-r--r-- | hello/manifest | 18 | ||||
-rw-r--r-- | hello/test.out | 2 |
8 files changed, 87 insertions, 0 deletions
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 <iostream> + +#include <libhello/hello.hxx> + +using namespace std; + +int +main (int argc, char* argv[]) +{ + if (argc < 2) + { + cerr << "usage: hello <name>..." << 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! |