Skip to content

Commit

Permalink
Merge pull request #445 from marcinwrobel1986/improve-tribits-readme
Browse files Browse the repository at this point in the history
Improve TribitsExampleProject and TribitsExampleApp readme
  • Loading branch information
bartlettroscoe authored Feb 6, 2022
2 parents 8d42716 + 4ced1c0 commit cc709dc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
6 changes: 4 additions & 2 deletions tribits/examples/TribitsExampleApp/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# TribitsExampleApp

The example project `TribitsExampleApp` is a raw CMake project that pulls in
libraries from packages from `TribitsExampleProject`. To build against all of
the installed packages from an upstream `TribitsExampleProject`, configure,
libraries from packages from `TribitsExampleProject`. If `WithSubpackageC`
subpackage or the `MixedLang` packages are built, then a Fortran compiler
is required to build `TribitsExampleApp`. To build against all of the
installed packages from an upstream `TribitsExampleProject`, configure,
build, and run the tests with:

```
Expand Down
18 changes: 16 additions & 2 deletions tribits/examples/TribitsExampleProject/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
The project `TribitsExampleProject` defines a TriBITS CMake project designed to
provide a simple example to demonstrate how to use the TriBITS system to
create a CMake build, test, and deployment system using a package-based
architecture.
architecture. To build all of the packages from `TribitsExampleProject`,
a Fortran compiler is needed.

To build and test the project, one must first create a build directory and
configure by pointing to the TriBITS source dir `<tribits-dir>`
Expand All @@ -17,18 +18,31 @@ with:
cmake \
-DTribitsExProj_TRIBITS_DIR=<tribits-dir> \
-DCMAKE_INSTALL_PREFIX=<TribitsExampleProject-install-dir>
-DTribitsExProj_ENABLE_TESTS=ON \
-DTribitsExProj_ENABLE_ALL_PACKAGES=ON
-DTribitsExProj_ENABLE_SECONDARY_TESTED_CODE=ON \
-DCMAKE_CXX_COMPILER=g++ \
<path-to-TribitsExampleProject>
```

and then build and test with:
then build and test with:

```
make -j4 && ctest -j4
```

and then install:

```
make install
```

`TribitsExampleProject` will be installed to
`<TribitsExampleProject-install-dir>` and this path should be then used
to point `-DCMAKE_PREFIX_PATH=<TribitsExampleProject-install-dir>` when
building e.g. `TribitsExampleApp`

The layout of a TriBITS project is described in:

* https://tribits.org/doc/TribitsUsersGuide.html#tribits-project-structure
Expand Down

0 comments on commit cc709dc

Please sign in to comment.