From 5769aaa5ccfca2cfa25bf898c2dd113b1504c1d6 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 30 Aug 2016 20:43:20 +0300 Subject: Build infrastructure update --- .gitignore | 14 +++++++++++--- build/.gitignore | 1 + build/bootstrap.build | 13 ++++++++++++- build/root.build | 4 +++- buildfile | 4 +++- hello.cpp | 14 -------------- hello.cxx | 14 ++++++++++++++ manifest | 2 ++ 8 files changed, 46 insertions(+), 20 deletions(-) create mode 100644 build/.gitignore delete mode 100644 hello.cpp create mode 100644 hello.cxx diff --git a/.gitignore b/.gitignore index faeba53..2a1dc8f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,15 @@ +# Compiler/linker output. +# +*.d *.o *.obj -*.d +*.so +*.dll +*.a +*.lib +*.exp +*.exe +*.exe.dlls/ +*.exe.manifest hello -hello.exe - diff --git a/build/.gitignore b/build/.gitignore new file mode 100644 index 0000000..225c27f --- /dev/null +++ b/build/.gitignore @@ -0,0 +1 @@ +config.build diff --git a/build/bootstrap.build b/build/bootstrap.build index bb0cfe1..284ccd0 100644 --- a/build/bootstrap.build +++ b/build/bootstrap.build @@ -1,6 +1,17 @@ project = hello0 +using build@0.4.0-a1 + +version = 1.0.0 + +revision = 0 + +dist.package = $project-$version + +if ($revision != 0) + dist.package += +$revision + using config +using dist using test using install - diff --git a/build/root.build b/build/root.build index 99d62c0..54a5851 100644 --- a/build/root.build +++ b/build/root.build @@ -1,3 +1,5 @@ +cxx.std = 11 + using cxx -cxx{*}: extension = cpp +cxx{*}: extension = cxx diff --git a/buildfile b/buildfile index 3d0db76..d85744d 100644 --- a/buildfile +++ b/buildfile @@ -1,2 +1,4 @@ -exe{hello}: cxx{hello} doc{README} +exe{hello}: cxx{hello} exe{hello}: test.arguments = World + +./: exe{hello} doc{README} file{manifest} diff --git a/hello.cpp b/hello.cpp deleted file mode 100644 index fad8a40..0000000 --- a/hello.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include - -using namespace std; - -int main (int argc, char* argv[]) -{ - if (argc != 2) - { - cerr << "usage: " << argv[0] << " " << endl; - return 1; - } - - cout << "Hello, " << argv[1] << "!" << endl; -} diff --git a/hello.cxx b/hello.cxx new file mode 100644 index 0000000..fad8a40 --- /dev/null +++ b/hello.cxx @@ -0,0 +1,14 @@ +#include + +using namespace std; + +int main (int argc, char* argv[]) +{ + if (argc != 2) + { + cerr << "usage: " << argv[0] << " " << endl; + return 1; + } + + cout << "Hello, " << argv[1] << "!" << endl; +} diff --git a/manifest b/manifest index 40b6a86..720f406 100644 --- a/manifest +++ b/manifest @@ -5,3 +5,5 @@ summary: Zero-dependencies "Hello World" program license: public-domain url: http://example.org/hello0 email: hello0@example.org +requires: c++11 +requires: build2 >= 0.4.0 -- cgit v1.1