From f89aba47cf56053b4ed073c5d6ed787e09dc9c23 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 22 Feb 2005 05:33:03 +0000 Subject: [PATCH] Example to illustrate using dependent targets as test input files. [SVN r27479] --- v1/example/target_test_arg/Jamfile | 29 +++++++++++++++++++++++ v1/example/target_test_arg/simple.cpp | 15 ++++++++++++ v1/example/target_test_arg/simple_lib.cpp | 11 +++++++++ 3 files changed, 55 insertions(+) create mode 100644 v1/example/target_test_arg/Jamfile create mode 100644 v1/example/target_test_arg/simple.cpp create mode 100644 v1/example/target_test_arg/simple_lib.cpp diff --git a/v1/example/target_test_arg/Jamfile b/v1/example/target_test_arg/Jamfile new file mode 100644 index 000000000..2102f91e8 --- /dev/null +++ b/v1/example/target_test_arg/Jamfile @@ -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 + simple + simple_lib.cpp + ../lib_use/simple + : # REQUIREMENTS + : # TEST NAME + simple + : # DEFAULT BUILDS + debug + release + ; diff --git a/v1/example/target_test_arg/simple.cpp b/v1/example/target_test_arg/simple.cpp new file mode 100644 index 000000000..ace3872f5 --- /dev/null +++ b/v1/example/target_test_arg/simple.cpp @@ -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 + +int main(int argc, char ** argv) +{ + for (int i = 0; i < argc; ++i) + { + std::printf("arg #%u = '%s'\n",i,argv[i]); + } + return 1; +} diff --git a/v1/example/target_test_arg/simple_lib.cpp b/v1/example/target_test_arg/simple_lib.cpp new file mode 100644 index 000000000..842759c73 --- /dev/null +++ b/v1/example/target_test_arg/simple_lib.cpp @@ -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; +}