forked from glen/cplusminus
chore: initialize build2 project
This commit is contained in:
parent
bd36a8b3fb
commit
a8fba52b44
11 changed files with 114 additions and 26 deletions
5
cpm/.gitignore
vendored
Normal file
5
cpm/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
cpm
|
||||
|
||||
# Testscript output directory (can be symlink).
|
||||
#
|
||||
test-cpm
|
6
cpm/buildfile
Normal file
6
cpm/buildfile
Normal 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
14
cpm/cpm.cxx
Normal 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
9
cpm/testscript
Normal file
|
@ -0,0 +1,9 @@
|
|||
: basics
|
||||
:
|
||||
$* 'World' >'Hello, World!'
|
||||
|
||||
: missing-name
|
||||
:
|
||||
$* 2>>EOE != 0
|
||||
error: missing name
|
||||
EOE
|
Loading…
Add table
Add a link
Reference in a new issue