Debian Codegraph @

cmake/tribits/examples/TribitsExampleProject/README.md

raw
1 # TribitsExampleProject Documentation
2
3 The project `TribitsExampleProject` defines a TriBITS CMake project designed to
4 provide a simple example to demonstrate how to use the TriBITS system to
5 create a CMake build, test, and deployment system using a package-based
6 architecture. To build all of the packages from `TribitsExampleProject`,
7 a Fortran compiler is needed.
8
9 To build and test the project, one must first create a build directory and
10 configure by pointing to the TriBITS source dir `<tribits-dir>`
11 (i.e. `TriBITS/tribits`) and the `TribitsExampleProject` project source dir
12 with:
13
14 ```
15 mkdir <build-dir>
16
17 cd <build-dir>
18
19 cmake \
20 -DTribitsExProj_TRIBITS_DIR=<tribits-dir> \
21 -DCMAKE_INSTALL_PREFIX=<TribitsExampleProject-install-dir>
22 -DTribitsExProj_ENABLE_TESTS=ON \
23 -DTribitsExProj_ENABLE_ALL_PACKAGES=ON
24 -DTribitsExProj_ENABLE_SECONDARY_TESTED_CODE=ON \
25 -DCMAKE_CXX_COMPILER=g++ \
26 <path-to-TribitsExampleProject>
27 ```
28
29 then build and test with:
30
31 ```
32 make -j4 && ctest -j4
33 ```
34
35 and then install:
36
37 ```
38 make install
39 ```
40
41 `TribitsExampleProject` will be installed to
42 `<TribitsExampleProject-install-dir>` and this path should be then used
43 to point `-DCMAKE_PREFIX_PATH=<TribitsExampleProject-install-dir>` when
44 building e.g. `TribitsExampleApp`
45
46 The layout of a TriBITS project is described in:
47
48 * https://tribits.org/doc/TribitsUsersGuide.html#tribits-project-structure
49
50 Otherwise, this example TriBITS project is simple enough that it should be
51 enough to get started as a template.