diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-06-03 17:11:56 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-06-03 17:11:56 +0200 |
commit | 398bea3c765b031540bd17841c71825dcb7b62c7 (patch) | |
tree | 5893e4cbe74cd0974b23bf46addf5b2155b554a6 | |
parent | fccc41f63b78202d29f3f13b557166b931b4b520 (diff) |
Add test, install support
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | README | 0 | ||||
-rw-r--r-- | build/bootstrap.build | 4 | ||||
-rw-r--r-- | buildfile | 3 | ||||
-rw-r--r-- | hello.cpp | 12 |
5 files changed, 19 insertions, 3 deletions
@@ -1,4 +1,7 @@ *.o +*.obj *.d hello +hello.exe + 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 + @@ -1 +1,2 @@ -exe{hello}: cxx{hello} +exe{hello}: cxx{hello} doc{README} +exe{hello}: test.arguments = World @@ -1,6 +1,14 @@ #include <iostream> -int main () +using namespace std; + +int main (int argc, char* argv[]) { - std::cout << "Hello, World!" << std::endl; + if (argc != 2) + { + cerr << "usage: " << argv[0] << " <name>" << endl; + return 1; + } + + cout << "Hello, " << argv[1] << "!" << endl; } |