Build system: implement REUSE with SPDX identifiers
[lttng-ust.git] / doc / examples / cmake-multiple-shared-libraries / README.md
CommitLineData
e03d7c66
MJ
1<!--
2SPDX-FileCopyrightText: 2016 Sebastien Boisvert <sboisvert@gydle.com>
3
4SPDX-License-Identifier: CC-BY-4.0
5-->
6
c2da416a
SB
7This examples shows how to use LTTng-UST in a project that uses
8CMake as the build system generator.
9
10Build the libraries and applications
11=====
12
13```bash
14mkdir build
15cd build
16cmake ..
17make
18```
19
203 shared libraries will be generated
21
22```
23libaligner-lib.so
24libtester-lib.so
25libtracepoint-provider.so
26```
27
28
29and 2 executables will be generated
30
31```
32aligner
33tester
34```
35
36
37
38Trace the application tester
39============================
40
41The script trace.sh can be used.
42
43```bash
44lttng create
45lttng enable-event -u 'gydle_om:*'
46lttng start
47./tester
48lttng stop
49lttng view > trace.txt
50cat trace.txt
51```
52
53The content of trace.txt should be:
54
55```
b57809aa
MD
56[21:45:34.940246019] (+?.?????????) osiris gydle_om:align_query: { cpu_id = 2 }, { query_name = "moleculeX" }
57[21:45:34.940263188] (+0.000017169) osiris gydle_om:test_alignment: { cpu_id = 2 }, { alignment = "my-alignment" }
c2da416a 58```
This page took 0.028988 seconds and 4 git commands to generate.