Debian Codegraph @

cmake/tribits/examples/TribitsExampleApp/app.cpp

raw
1 #ifdef TRIBITSEXAPP_HAVE_SIMPLECXX
2 # include "SimpleCxx_HelloWorld.hpp"
3 #endif
4 #ifdef TRIBITSEXAPP_HAVE_MIXEDLANG
5 # include "MixedLang.hpp"
6 #endif
7 #ifdef TRIBITSEXAPP_HAVE_WITHSUBPACKAGESA
8 # include "A.hpp"
9 #endif
10 #ifdef TRIBITSEXAPP_HAVE_WITHSUBPACKAGESB
11 # include "B.hpp"
12 #endif
13 #ifdef TRIBITSEXAPP_HAVE_WITHSUBPACKAGESC
14 # include "wsp_c/C.hpp"
15 #endif
16
17
18 #include <iostream>
19 #include <string>
20
21
22 void appendDepsStr(std::string &depsStr, const std::string &str)
23 {
24 if (depsStr.length()) {
25 depsStr += "; "+str;
26 }
27 else {
28 depsStr = str;
29 }
30 }
31
32
33 int main(int argc, char *argv[]) {
34 // Get deps down the deps graph
35 std::string depsStr;
36 #ifdef TRIBITSEXAPP_HAVE_WITHSUBPACKAGESC
37 appendDepsStr(depsStr, "WithSubpackagesC:"+WithSubpackages::depsC());
38 #endif
39 #ifdef TRIBITSEXAPP_HAVE_WITHSUBPACKAGESB
40 appendDepsStr(depsStr, "WithSubpackagesB:"+WithSubpackages::depsB());
41 #endif
42 #ifdef TRIBITSEXAPP_HAVE_WITHSUBPACKAGESA
43 appendDepsStr(depsStr, "WithSubpackagesA:"+WithSubpackages::depsA());
44 #endif
45 #ifdef TRIBITSEXAPP_HAVE_MIXEDLANG
46 appendDepsStr(depsStr, "MixedLang:"+tribits_mixed::mixedLang()); // Just print something
47 #endif
48 #ifdef TRIBITSEXAPP_HAVE_SIMPLECXX
49 appendDepsStr(depsStr, "SimpleCxx:"+SimpleCxx::deps());
50 #endif
51 // NOTE: The above all call functions from the libraries and requires that
52 // both the header files be found at compile time and the libraries be found
53 // at link time and runtime for this these function calls to work.
54
55 std::cout << "Full Deps: " << depsStr << "\n";
56
57 return 0;
58 }