1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 12:40:35 +00:00

Fix for Armadillo older than 9.800

This commit is contained in:
Carles Fernandez 2020-02-18 21:21:46 +01:00
parent 61557a8c2c
commit 054ca06917
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
3 changed files with 60 additions and 42 deletions

View File

@ -373,6 +373,7 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
IMPORTED_LOCATION "${GPSTK_LIBRARY}" IMPORTED_LOCATION "${GPSTK_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${GPSTK_INCLUDE_DIRS};${GPSTK_INCLUDE_DIRS}/gpstk" INTERFACE_INCLUDE_DIRECTORIES "${GPSTK_INCLUDE_DIRS};${GPSTK_INCLUDE_DIRS}/gpstk"
INTERFACE_LINK_LIBRARIES "${GPSTK_LIBRARY}" INTERFACE_LINK_LIBRARIES "${GPSTK_LIBRARY}"
CXX_STANDARD 14
) )
else() else()
set(GPSTK_BINDIR ${GPSTK_INCLUDE_DIR}/../bin/) set(GPSTK_BINDIR ${GPSTK_INCLUDE_DIR}/../bin/)

View File

@ -7,6 +7,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
# #
if("${ARMADILLO_VERSION_STRING}" VERSION_GREATER "9.800" OR (NOT ARMADILLO_FOUND) OR ENABLE_OWN_ARMADILLO) # requires back(), introduced in Armadillo 9.800
find_package(GPSTK QUIET) find_package(GPSTK QUIET)
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK) if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
include(GNUInstallDirs) include(GNUInstallDirs)
@ -24,6 +25,9 @@ target_include_directories(obsdiff PUBLIC ${CMAKE_SOURCE_DIR}/src/tests/common-f
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK) if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
add_dependencies(obsdiff gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}) add_dependencies(obsdiff gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION})
endif() endif()
if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
add_dependencies(obsdiff armadillo-${armadillo_RELEASE})
endif()
target_link_libraries(obsdiff target_link_libraries(obsdiff
PUBLIC PUBLIC
@ -50,3 +54,4 @@ install(TARGETS obsdiff
RUNTIME DESTINATION bin RUNTIME DESTINATION bin
COMPONENT "obsdiff" COMPONENT "obsdiff"
) )
endif()

View File

@ -13,6 +13,11 @@ This program computes single-differences and double-differences from RINEX obser
### Building ### Building
Requirements:
* [GPSTK](https://github.com/SGL-UT/GPSTk): The GPS Toolkit. If not found in your system, the latest version will be downloaded, built and linked for you at building time.
* [Armadillo](http://arma.sourceforge.net/): A C++ library for linear algebra and scientific computing. This program requires version 9.800 or higher. If your installed Armadillo version is older, see below.
This program is built along with GNSS-SDR if the options `ENABLE_UNIT_TESTING_EXTRA` or `ENABLE_SYSTEM_TESTING_EXTRA` are set to `ON` when calling CMake: This program is built along with GNSS-SDR if the options `ENABLE_UNIT_TESTING_EXTRA` or `ENABLE_SYSTEM_TESTING_EXTRA` are set to `ON` when calling CMake:
``` ```
@ -23,6 +28,13 @@ $ sudo make install
The last step is optional. Without it, you still will get the executable at `../install/obsdiff`. The last step is optional. Without it, you still will get the executable at `../install/obsdiff`.
This program requires Armadillo 9.800 or higher. If the available Armadillo version is older, this program will not be built. If your local Armadillo installed version is older, you can force CMake to download, build and link a recent one:
```
$ cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON -DENABLE_OWN_ARMADILLO=ON ..
$ make obsdiff
$ sudo make install
```
### Usage ### Usage