Skip to content

Commit 07a631c

Browse files
authored
Doc: Explain variables required for building Routing Service examples (#617)
* Doc: Explain variables required for building Routing Service examples * chore: Fixed linter errors * doc: Applied corrections from PR Closes #621
1 parent 41e750f commit 07a631c

File tree

7 files changed

+92
-70
lines changed

7 files changed

+92
-70
lines changed

examples/routing_service/file_adapter/c++11/README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,25 @@ For more details, please refer to the *RTI Routing Service SDK* documentation.
2828

2929
## Building C++ example
3030

31-
In order to build this example, you need to provide the following variables to
32-
`CMake`:
33-
34-
- `CONNEXTDDS_DIR`
35-
- `CONNEXTDDS_ARCH`
31+
In order to build this example, you need to define the variables `CONNEXTDDS_DIR`
32+
and `CONNEXTDDS_ARCH`. You can do so by exporting them manually, by sourcing
33+
the `rtisetenv` script for your architecture, or by passing them to the `cmake`
34+
command as arguments:
3635

3736
```bash
38-
$mkdir build
39-
$cmake -DCONNEXTDDS_DIR=<Connext DDS Directory>
40-
-DCONNEXTDDS_ARCH=<Connext DDS Architecture>
41-
-DBUILD_SHARED_LIBS=ON|OFF
42-
-DCMAKE_BUILD_TYPE=Debug|Release ..
37+
mkdir build
38+
cd build
39+
cmake -DCONNEXTDDS_DIR=<Connext DDS Directory> \ # If not exported
40+
-DCONNEXTDDS_ARCH=<Connext DDS Architecture> \ # If not exported
41+
-DBUILD_SHARED_LIBS=ON|OFF \
42+
-DCMAKE_BUILD_TYPE=Debug|Release ..
4343
cmake --build .
4444
```
4545

46-
**Note**: when compiling on a Windows 64-bit machine you will need to add the
46+
**Note**: You do not need to define `CONNEXTDDS_ARCH` if you only have one
47+
architecture target installed in your system.
48+
49+
**Note**: When compiling on a Windows 64-bit machine you will need to add the
4750
`-A x64` parameter to the call to CMake.
4851

4952
**Note:** If you are using a multi-configuration generator, such as Visual Studio

examples/routing_service/file_adapter/c/README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,24 @@ configuration file.
1515

1616
## Building C example
1717

18-
In order to build this example, you need to provide the following variables to
19-
`CMake`:
20-
21-
- `CONNEXTDDS_DIR`
22-
- `CONNEXTDDS_ARCH` (needed only if you have multiple architectures installed)
18+
In order to build this example, you need to define the variables `CONNEXTDDS_DIR`
19+
and `CONNEXTDDS_ARCH`. You can do so by exporting it manually, by sourcing
20+
the `rtisetenv` script for your architecture, or by passing them to the `cmake`
21+
command as arguments:
2322

2423
```bash
25-
$mkdir build
26-
$cmake -DCONNEXTDDS_DIR=<Connext DDS Directory>
27-
-DCONNEXTDDS_ARCH=<Connext DDS Architecture>
28-
-DBUILD_SHARED_LIBS=ON|OFF
29-
-DCMAKE_BUILD_TYPE=Debug|Release ..
24+
mkdir build
25+
cd build
26+
cmake -DCONNEXTDDS_DIR=<Connext DDS Directory> \ # If not exported
27+
-DCONNEXTDDS_ARCH=<Connext DDS Architecture> \ # If not exported
28+
-DBUILD_SHARED_LIBS=ON|OFF \
29+
-DCMAKE_BUILD_TYPE=Debug|Release ..
3030
cmake --build .
3131
```
3232

33+
**Note**: You do not need to define `CONNEXTDDS_ARCH` if you only have one
34+
architecture target installed in your system.
35+
3336
**Note:** Since this example uses the `pthread` library, it only works on
3437
UNIX-like systems. It has been successfully tested on Ubuntu and macOS.
3538

examples/routing_service/mongo_db/c++11/README.rst

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,29 @@ Example Code: MongoDB Adapter
44
Building
55
--------
66

7-
In order to build this example, you need to provide the following variables to
8-
``CMake``:
7+
In order to build this example, you need to define the variables ``CONNEXTDDS_DIR``
8+
and ``CONNEXTDDS_ARCH``. You can do so by exporting them manually, by sourcing
9+
the ``rtisetenv`` script for your architecture, or by passing them to the ``cmake``
10+
command as arguments.
911

10-
- ``CONNEXTDDS_DIR``: path to the ``Connext`` installation root folder
11-
- ``CONNEXTDDS_ARCH``: target architecture
12-
- ``MONGODB_DIR``: path to the ``mongodbcxx`` installation root folder
12+
You also need to define the variable ``MONGODB_DIR`` as the path to the
13+
``mongodbcxx`` installation directory, which can be either exported or passed as
14+
an argument to ``cmake``, but won't be set by ``rtisetenv``.
1315

1416
.. code::
15-
1617
mkdir build
17-
cmake -DCONNEXTDDS_DIR=<Connext DDS Directory> \
18-
-DCONNEXTDDS_ARCH=<Connext DDS Architecture> \
19-
-DMONGODB_DIR=<mongodbcxx directory> \
20-
-DBUILD_SHARED_LIBS=ON \
21-
-DCMAKE_BUILD_TYPE=Release ..
18+
cd build
19+
cmake -DCONNEXTDDS_DIR=<Connext DDS Directory> \ # If not exported
20+
-DCONNEXTDDS_ARCH=<Connext DDS Architecture> \ # If not exported
21+
-DMONGODB_DIR=<mongodbcxx directory> \ # If not exported
22+
-DBUILD_SHARED_LIBS=ON|OFF \
23+
-DCMAKE_BUILD_TYPE=Debug|Release ..
2224
cmake --build .
2325
26+
.. note::
27+
28+
You do not need to define ``CONNEXTDDS_ARCH`` if you only have one architecture
29+
target installed in your system.
2430

2531
.. note::
2632

examples/routing_service/monitoring/c++11/README.md

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,29 @@
22

33
## Building the Example :wrench:
44

5-
To build this example, first run CMake to generate the corresponding build
6-
files. We recommend you use a separate directory to store all the generated
7-
files (e.g., ./build).
5+
In order to build this example, you need to define the variables `CONNEXTDDS_DIR`
6+
and `CONNEXTDDS_ARCH`. You can do so by exporting them manually, by sourcing
7+
the `rtisetenv` script for your architecture, or by passing them to the `cmake`
8+
command as arguments:
89

9-
```sh
10+
```bash
1011
mkdir build
1112
cd build
12-
cmake ..
13-
```
14-
15-
Once you have run CMake, you will find a number of new files in your build
16-
directory (the list of generated files will depend on the specific CMake
17-
Generator). To build the example, run CMake as follows:
18-
19-
```sh
13+
cmake -DCONNEXTDDS_DIR=<Connext DDS Directory> \ # If not exported
14+
-DCONNEXTDDS_ARCH=<Connext DDS Architecture> \ # If not exported
15+
-DBUILD_SHARED_LIBS=ON|OFF \
16+
-DCMAKE_BUILD_TYPE=Debug|Release ..
2017
cmake --build .
2118
```
2219

23-
**Note**: if you are using a multi-configuration generator, such as Visual
24-
Studio solutions, you can specify the configuration mode to build as follows:
25-
26-
```sh
27-
cmake --build . --config Release|Debug
28-
```
20+
**Note**: You do not need to define `CONNEXTDDS_ARCH` if you only have one
21+
architecture target installed in your system.
2922

30-
Alternatively, you can use directly the generated infrastructure (e.g.,
31-
Makefiles or Visual Studio Solutions) to build the example. If you generated
32-
Makefiles in the configuration process, run make to build the example. Likewise,
33-
if you generated a Visual Studio solution, open the solution and follow the
34-
regular build process.
23+
Instead of using `cmake --build`, you can directly use the generated
24+
infrastructure (e.g., Makefiles or Visual Studio Solutions) to build the example.
25+
If you generated Makefiles in the configuration process, run make to build the
26+
example. Likewise, if you generated a Visual Studio solution, open the solution
27+
and follow the regular build process.
3528

3629
## Running the Example
3730

@@ -104,7 +97,7 @@ Also, if you installed libraries for multiple target architectures on your syste
10497
you want to link against. For example:
10598

10699
```sh
107-
cmake -DCONNEXTDDS_ARCH=x64Linux3gcc5.4.0 ..
100+
cmake -DCONNEXTDDS_ARCH=<Connext DDS Architecture>..
108101
```
109102

110103
### CMake Build Infrastructure

examples/routing_service/remote_admin/c++11/README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,24 @@ The following files are part of the example:
2828

2929
## Building the Example
3030

31-
Build the example code by running the following command:
31+
In order to build this example, you need to define the variable `CONNEXTDDS_DIR`
32+
You can do so by exporting it manually, by sourcing the `rtisetenv` script for
33+
your architecture, or by passing it to the `cmake` command as arguments:
3234

33-
```sh
35+
```bash
3436
mkdir build
3537
cd build
36-
cmake ..
38+
cmake -DCONNEXTDDS_DIR=<Connext DDS Directory> \ # If not exported
39+
-DBUILD_SHARED_LIBS=ON|OFF \
40+
-DCMAKE_BUILD_TYPE=Debug|Release ..
3741
cmake --build .
3842
```
3943

44+
> **Note**:
45+
>
46+
> You do not need to define `CONNEXTDDS_ARCH` if you only have one architecture
47+
> target installed in your system.
48+
>
4049
> **Note**:
4150
>
4251
> When using a multi-configuration generator, make sure you specify

examples/routing_service/shapes_processor/c++11/README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ different architecture, please adapt the commands accordingly.
66

77
## Building the Example :wrench:
88

9-
To build this example, first run CMake to generate the corresponding build
10-
files. We recommend you use a separate directory to store all the generated
11-
files (e.g., ./build).
12-
13-
```sh
9+
```bash
1410
mkdir build
1511
cd build
16-
cmake -DBUILD_SHARED_LIBS=ON ..
12+
cmake -DCONNEXTDDS_DIR=<Connext DDS Directory> \ # If not exported
13+
-DBUILD_SHARED_LIBS=ON|OFF \
14+
-DCMAKE_BUILD_TYPE=Debug|Release ..
15+
cmake --build .
1716
```
1817

18+
**Note**: You do not need to define `CONNEXTDDS_ARCH` if you only have one
19+
architecture target installed in your system.
20+
1921
**Note**: when compiling on a Windows 64-bit machine you will need to add the
2022
`-A x64` parameter to the call to CMake. See
2123
[Customizing the Build](#customizing-the-build) for more details.

examples/routing_service/struct_array_transf/c++11/README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,22 @@ different architecture, please adapt the commands accordingly.
66

77
## Building the Example :wrench:
88

9-
To build this example, first run CMake to generate the corresponding build
10-
files. We recommend you use a separate directory to store all the generated
11-
files (e.g., ./build).
9+
In order to build this example, you need to define the variable `CONNEXTDDS_DIR`
10+
You can do so by exporting it manually, by sourcing the `rtisetenv` script for
11+
your architecture, or by passing it to the `cmake` command as arguments:
1212

13-
```sh
13+
```bash
1414
mkdir build
1515
cd build
16-
cmake -DBUILD_SHARED_LIBS=ON ..
16+
cmake -DCONNEXTDDS_DIR=<Connext DDS Directory> \ # If not exported
17+
-DBUILD_SHARED_LIBS=ON \
18+
-DCMAKE_BUILD_TYPE=Debug|Release ..
19+
cmake --build .
1720
```
1821

22+
**Note**: You do not need to define `CONNEXTDDS_ARCH` if you only have one
23+
architecture target installed in your system.
24+
1925
**Note**: when compiling on a Windows 64-bit machine you will need to add the
2026
`-A x64` parameter to the call to CMake. See
2127
[Customizing the Build](#customizing-the-build) for more details.

0 commit comments

Comments
 (0)