From 398bea3c765b031540bd17841c71825dcb7b62c7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 3 Jun 2016 17:11:56 +0200 Subject: Add test, install support --- .gitignore | 3 +++ README | 0 build/bootstrap.build | 4 ++++ buildfile | 3 ++- hello.cpp | 12 ++++++++++-- 5 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 README diff --git a/.gitignore b/.gitignore index 251f0ea..faeba53 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ *.o +*.obj *.d hello +hello.exe + diff --git a/README b/README new file mode 100644 index 0000000..e69de29 diff --git a/build/bootstrap.build b/build/bootstrap.build index 0cf21db..bb0cfe1 100644 --- a/build/bootstrap.build +++ b/build/bootstrap.build @@ -1,2 +1,6 @@ project = hello0 + using config +using test +using install + diff --git a/buildfile b/buildfile index e435988..3d0db76 100644 --- a/buildfile +++ b/buildfile @@ -1 +1,2 @@ -exe{hello}: cxx{hello} +exe{hello}: cxx{hello} doc{README} +exe{hello}: test.arguments = World diff --git a/hello.cpp b/hello.cpp index 0dde4c9..fad8a40 100644 --- a/hello.cpp +++ b/hello.cpp @@ -1,6 +1,14 @@ #include -int main () +using namespace std; + +int main (int argc, char* argv[]) { - std::cout << "Hello, World!" << std::endl; + if (argc != 2) + { + cerr << "usage: " << argv[0] << " " << endl; + return 1; + } + + cout << "Hello, " << argv[1] << "!" << endl; } -- cgit v1.1