mirror of
https://github.com/boostorg/build.git
synced 2026-02-15 00:52:16 +00:00
Example to illustrate using dependent targets as test input files.
[SVN r27479]
This commit is contained in:
29
v1/example/target_test_arg/Jamfile
Normal file
29
v1/example/target_test_arg/Jamfile
Normal file
@@ -0,0 +1,29 @@
|
||||
# (C) Copyright Rene Rivera, 2005.
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
subproject tools/build/v1/example/target_test_arg ;
|
||||
|
||||
import testing ;
|
||||
|
||||
dll simple
|
||||
: # SOURCES
|
||||
simple_lib.cpp
|
||||
: # REQUIREMENTS
|
||||
: # DEFAULT BUILDS
|
||||
debug release
|
||||
;
|
||||
|
||||
run simple.cpp
|
||||
: # ARGS
|
||||
: # INPUT FILES
|
||||
<dll>simple
|
||||
simple_lib.cpp
|
||||
<lib>../lib_use/simple
|
||||
: # REQUIREMENTS
|
||||
: # TEST NAME
|
||||
simple
|
||||
: # DEFAULT BUILDS
|
||||
debug
|
||||
release
|
||||
;
|
||||
15
v1/example/target_test_arg/simple.cpp
Normal file
15
v1/example/target_test_arg/simple.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
/* (C) Copyright Rene Rivera, 2005.
|
||||
** Distributed under the Boost Software License, Version 1.0.
|
||||
** (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
for (int i = 0; i < argc; ++i)
|
||||
{
|
||||
std::printf("arg #%u = '%s'\n",i,argv[i]);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
11
v1/example/target_test_arg/simple_lib.cpp
Normal file
11
v1/example/target_test_arg/simple_lib.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
/* (C) Copyright Rene Rivera, 2002.
|
||||
** Distributed under the Boost Software License, Version 1.0.
|
||||
** (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
extern int lib_call(int x);
|
||||
|
||||
int lib_call(int x)
|
||||
{
|
||||
return x*2;
|
||||
}
|
||||
Reference in New Issue
Block a user