chore: initialize build2 project

This commit is contained in:
Glen Whitney 2022-12-18 16:50:01 -05:00
parent bd36a8b3fb
commit a8fba52b44
11 changed files with 114 additions and 26 deletions

5
cpm/.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
cpm
# Testscript output directory (can be symlink).
#
test-cpm

6
cpm/buildfile Normal file
View file

@ -0,0 +1,6 @@
libs =
#import libs += libhello%lib{hello}
exe{cpm}: {hxx ixx txx cxx}{**} $libs testscript
cxx.poptions =+ "-I$out_root" "-I$src_root"

14
cpm/cpm.cxx Normal file
View file

@ -0,0 +1,14 @@
#include <iostream>
int main (int argc, char* argv[])
{
using namespace std;
if (argc < 2)
{
cerr << "error: missing name" << endl;
return 1;
}
cout << "Hello, " << argv[1] << '!' << endl;
}

9
cpm/testscript Normal file
View file

@ -0,0 +1,9 @@
: basics
:
$* 'World' >'Hello, World!'
: missing-name
:
$* 2>>EOE != 0
error: missing name
EOE