136
136
< div role ="main " class ="document " itemscope ="itemscope " itemtype ="http://schema.org/Article ">
137
137
< div class ="section " itemprop ="articleBody ">
138
138
139
- < h1 > General build instructions</ h1 >
139
+ < h1 id =" general-build-instructions " > General build instructions< a class =" headerlink " href =" #general-build-instructions " title =" Permanent link " > ¶ </ a > </ h1 >
140
140
< h2 id ="dependencies "> Dependencies< a class ="headerlink " href ="#dependencies " title ="Permanent link "> ¶</ a > </ h2 >
141
141
< p > The components within this repository have some dependencies:</ p >
142
142
< ul >
@@ -187,14 +187,12 @@ <h2 id="dependencies">Dependencies<a class="headerlink" href="#dependencies" tit
187
187
< li > libpython-dev</ li >
188
188
</ ul >
189
189
< p > Those can be installed by calling:</ p >
190
- < pre > < code class ="bash "> $> sudo apt-get install libboost-all-dev libpugixml-dev libgtest-dev libpython-dev libproj-dev
190
+ < pre > < code class ="language- bash "> $> sudo apt-get install libboost-all-dev libpugixml-dev libgtest-dev libpython-dev libproj-dev
191
191
</ code > </ pre >
192
-
193
192
< p > Additional dependencies for the python bindings:</ p >
194
- < pre > < code class ="bash "> $> sudo apt-get install castxml
193
+ < pre > < code class ="language- bash "> $> sudo apt-get install castxml
195
194
$> pip install --user pygccxml pyplusplus xmlrunner
196
195
</ code > </ pre >
197
-
198
196
< p > Remaining dependencies are present as GIT submodules; also to fix the version of these:</ p >
199
197
< ul >
200
198
< li > ad_map_access</ li >
@@ -207,27 +205,22 @@ <h2 id="building">Building<a class="headerlink" href="#building" title="Permanen
207
205
Please use the link above for installation instructions.</ p >
208
206
< p > This repository is prepared as colcon workspace including all dependencies not provided as installable packages by the OS.
209
207
Those dependencies are part of the < strong > dependencies</ strong > folder as GIT submodules. To properly fetch these, the submodules have to be updated and initialized.</ p >
210
- < pre > < code class ="bash "> ad-rss-lib$> git submodule update --init --recursive
208
+ < pre > < code class ="language- bash "> ad-rss-lib$> git submodule update --init --recursive
211
209
</ code > </ pre >
212
-
213
210
< p > Once this is done, the full set of dependencies and components can be built calling:</ p >
214
- < pre > < code class ="bash "> ad-rss-lib$> colcon build
211
+ < pre > < code class ="language- bash "> ad-rss-lib$> colcon build
215
212
</ code > </ pre >
216
-
217
213
< p > All components will be compiled respecting the dependencies between them.</ p >
218
214
< p > The python bindings are disabled by default. To integrate them into the build you can make use of the prepared
219
215
colcon meta file:</ p >
220
- < pre > < code class ="bash "> ad-rss-lib$> colcon build --metas colcon_python.meta
216
+ < pre > < code class ="language- bash "> ad-rss-lib$> colcon build --metas colcon_python.meta
221
217
</ code > </ pre >
222
-
223
218
< p > < strong > colcon_python.meta</ strong > enables python build (-DBUILD_PYTHON_BINDING=ON). To specify the python version to be used you call e.g.:</ p >
224
- < pre > < code class ="bash "> ad-rss-lib$> colcon build --metas colcon_python.meta --cmake-args -DPYTHON_BINDING_VERSION=3.8
219
+ < pre > < code class ="language- bash "> ad-rss-lib$> colcon build --metas colcon_python.meta --cmake-args -DPYTHON_BINDING_VERSION=3.8
225
220
</ code > </ pre >
226
-
227
221
< p > If cmake isn't able to find the requested python version you can try to specify the python executable explicitly (e.g. under Ubuntu22.04):</ p >
228
- < pre > < code class ="bash "> ad-rss-lib$> colcon build --metas colcon_python.meta --cmake-args -DPYTHON_BINDING_VERSION=3.10 -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3.10
222
+ < pre > < code class ="language- bash "> ad-rss-lib$> colcon build --metas colcon_python.meta --cmake-args -DPYTHON_BINDING_VERSION=3.10 -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3.10
229
223
</ code > </ pre >
230
-
231
224
< h2 id ="build-options "> Build options< a class ="headerlink " href ="#build-options " title ="Permanent link "> ¶</ a > </ h2 >
232
225
< p > There are some CMake options affecting what or how the components are built.</ p >
233
226
< ul >
@@ -240,27 +233,23 @@ <h2 id="build-options">Build options<a class="headerlink" href="#build-options"
240
233
</ ul >
241
234
< p > By default, all options are set to off. Any of these could be activate by adding them via the colcon call above as "--cmake-args -D<OPTION>=[ON|OFF]",
242
235
e.g.:</ p >
243
- < pre > < code class ="bash "> ad-rss-lib$> colcon build --cmake-args -DBUILD_TESTING=ON -DBUILD_APIDOC=ON -DBUILD_PYTHON_BINDING=ON -DPYTHON_BINDING_VERSION=3.8
236
+ < pre > < code class ="language- bash "> ad-rss-lib$> colcon build --cmake-args -DBUILD_TESTING=ON -DBUILD_APIDOC=ON -DBUILD_PYTHON_BINDING=ON -DPYTHON_BINDING_VERSION=3.8
244
237
</ code > </ pre >
245
-
246
238
< h3 id ="unit-tests "> Unit tests< a class ="headerlink " href ="#unit-tests " title ="Permanent link "> ¶</ a > </ h3 >
247
- < pre > < code class ="bash "> ad-rss-lib$> colcon build --cmake-args -DBUILD_TESTING=ON
239
+ < pre > < code class ="language- bash "> ad-rss-lib$> colcon build --cmake-args -DBUILD_TESTING=ON
248
240
</ code > </ pre >
249
-
250
241
< p > When activating the Unit tests, they all can be executed with:</ p >
251
- < pre > < code class ="bash "> ad-rss-lib$> colcon test
242
+ < pre > < code class ="language- bash "> ad-rss-lib$> colcon test
252
243
</ code > </ pre >
253
-
254
244
< h3 id ="api-documentation "> API documentation< a class ="headerlink " href ="#api-documentation " title ="Permanent link "> ¶</ a > </ h3 >
255
245
< p > When BUILD_APIDOC is enabled, the "colcon" call will automatically generate the API documentation.</ p >
256
- < pre > < code class ="bash "> ad-rss-lib$> colcon build --cmake-args -DBUILD_APIDOC=ON
246
+ < pre > < code class ="language- bash "> ad-rss-lib$> colcon build --cmake-args -DBUILD_APIDOC=ON
257
247
</ code > </ pre >
258
-
259
248
< p > The API documentation is written to the < em > apidoc</ em > folder within the < em > build</ em > directory.</ p >
260
249
< h3 id ="build-hardening "> Build hardening< a class ="headerlink " href ="#build-hardening " title ="Permanent link "> ¶</ a > </ h3 >
261
250
< p > Usually, build hardening is injected by the surrounding build system. Nevertheless, the CMakeLists.txt defines
262
251
hardening flags to ensure the code is compatible to respective flags. To enable hardening compiler and linker flags:</ p >
263
- < pre > < code class ="bash "> ad-rss-lib$> colcon build --cmake-args -DBUILD_HARDENING=ON
252
+ < pre > < code class ="language- bash "> ad-rss-lib$> colcon build --cmake-args -DBUILD_HARDENING=ON
264
253
</ code > </ pre >
265
254
266
255
</ div >
0 commit comments