mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-12 11:10:33 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into fpga_signal_sources
This commit is contained in:
commit
d0caa64c5f
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -146,7 +146,7 @@ jobs:
|
||||
ln -s $(brew --prefix llvm)/bin/clang-apply-replacements /usr/local/bin
|
||||
ln -s $(brew --prefix llvm)/bin/run-clang-tidy.py /usr/local/bin
|
||||
- name: Prepare run
|
||||
run: cd build && cmake .. && make volk_gnsssdr_module gtest-1.14.0 core_monitor core_libs pvt_libs
|
||||
run: cd build && cmake .. && make volk_gnsssdr_module gtest-1.15.2 core_monitor core_libs pvt_libs
|
||||
- name: run clang-tidy
|
||||
run: cd build && /opt/homebrew/opt/llvm/bin/run-clang-tidy -fix
|
||||
- name: check
|
||||
|
7
.gitignore
vendored
7
.gitignore
vendored
@ -20,3 +20,10 @@ cmake-build-debug/
|
||||
.vscode/
|
||||
.vs/
|
||||
Testing/
|
||||
|
||||
GSDR*
|
||||
PVT_*
|
||||
HAS_*
|
||||
gnss_sdr_pvt.nmea
|
||||
build-debug/
|
||||
build-release/
|
@ -28,6 +28,7 @@ list(APPEND CMAKE_MODULE_PATH ${GNSSSDR_SOURCE_DIR}/cmake/Modules)
|
||||
# Enable them at the command line by doing 'cmake -DENABLE_XXX=ON ..'
|
||||
################################################################################
|
||||
include(FeatureSummary)
|
||||
include(GnsssdrLibPaths)
|
||||
|
||||
# Support of optional RF front-ends
|
||||
option(ENABLE_UHD "Enable the use of UHD (driver for all USRP devices)" ON)
|
||||
@ -355,9 +356,9 @@ set(GNSSSDR_ARMADILLO_LOCAL_VERSION "14.0.x")
|
||||
set(GNSSSDR_GFLAGS_LOCAL_VERSION "2.2.2")
|
||||
set(GNSSSDR_GLOG_LOCAL_VERSION "0.7.1")
|
||||
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.27")
|
||||
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "27.2")
|
||||
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "27.3")
|
||||
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.14")
|
||||
set(GNSSSDR_GTEST_LOCAL_VERSION "1.14.0")
|
||||
set(GNSSSDR_GTEST_LOCAL_VERSION "1.15.2")
|
||||
set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "origin/master")
|
||||
set(GNSSSDR_GNSSTK_LOCAL_VERSION "14.3.0")
|
||||
set(GNSSSDR_BENCHMARK_LOCAL_VERSION "1.8.5")
|
||||
|
@ -490,8 +490,8 @@ $ sudo ldconfig
|
||||
#### Download [GoogleTest](https://github.com/google/googletest "Googletest Homepage")
|
||||
|
||||
```
|
||||
$ wget https://github.com/google/googletest/archive/refs/tags/v1.14.0.zip
|
||||
$ unzip v1.14.0.zip
|
||||
$ wget https://github.com/google/googletest/archive/refs/tags/v1.15.2.zip
|
||||
$ unzip v1.15.2.zip
|
||||
```
|
||||
|
||||
Please **DO NOT build or install** Google Test. Every user needs to compile
|
||||
@ -515,10 +515,10 @@ downloaded resides. Just type in your terminal (or add it to your
|
||||
`$HOME/.bashrc` file for a permanent solution) the following line:
|
||||
|
||||
```
|
||||
export GTEST_DIR=/home/username/googletest-1.14.0
|
||||
export GTEST_DIR=/home/username/googletest-1.15.2
|
||||
```
|
||||
|
||||
changing `/home/username/googletest-1.14.0` by the actual path where you
|
||||
changing `/home/username/googletest-1.15.2` by the actual path where you
|
||||
unpacked Google Test. If the CMake script does not find that folder, or the
|
||||
environment variable is not defined, or the source code is not installed by a
|
||||
package, then it will download a fresh copy of the Google Test source code and
|
||||
|
@ -6,38 +6,13 @@
|
||||
|
||||
set(FPHSA_NAME_MISMATCHED ON)
|
||||
|
||||
if(NOT GNSSSDR_LIB_PATHS)
|
||||
include(GnsssdrLibPaths)
|
||||
endif()
|
||||
|
||||
find_library(CPUFEATURES_LIBRARIES
|
||||
NAMES cpu_features
|
||||
PATHS /usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/i386-gnu
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i386-kfreebsd-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/lib/loongarch64-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
PATHS ${GNSSSDR_LIB_PATHS}
|
||||
)
|
||||
|
||||
find_path(CPUFEATURES_INCLUDE_DIR cpu_features_macros.h
|
||||
|
@ -25,6 +25,10 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GNSSSDR_LIB_PATHS)
|
||||
include(GnsssdrLibPaths)
|
||||
endif()
|
||||
|
||||
if(NOT GFLAGS_ROOT)
|
||||
set(GFLAGS_ROOT_USER_PROVIDED /usr/local)
|
||||
else()
|
||||
@ -52,36 +56,7 @@ else()
|
||||
PATHS
|
||||
${GFLAGS_ROOT_USER_PROVIDED}/lib
|
||||
${GFLAGS_ROOT_USER_PROVIDED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/i386-gnu
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i386-kfreebsd-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/lib/loongarch64-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNSSSDR_LIB_PATHS}
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -8,6 +8,10 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GNSSSDR_LIB_PATHS)
|
||||
include(GnsssdrLibPaths)
|
||||
endif()
|
||||
|
||||
if(NOT GFORTRAN_ROOT)
|
||||
set(GFORTRAN_ROOT_USER_DEFINED /usr/lib)
|
||||
else()
|
||||
@ -20,13 +24,12 @@ if(DEFINED ENV{GFORTRAN_ROOT})
|
||||
)
|
||||
endif()
|
||||
|
||||
set(GCC_MAJOR_SERIES 14 13 12 11 10 9 8 7 6 5)
|
||||
set(GCC_MAJOR_SERIES 15 14 13 12 11 10 9 8 7 6 5)
|
||||
set(GCC4_SERIES 4.9.1 4.9 4.8.3 4.8.1 4.7.2 4.7 4.8.2 4.8 4.7 4.6 4.5 4.4.4 4.4)
|
||||
set(GCC_SERIES ${GCC_MAJOR_SERIES} ${GCC4_SERIES})
|
||||
|
||||
find_library(GFORTRAN NAMES gfortran
|
||||
PATHS ${GFORTRAN_ROOT_USER_DEFINED}
|
||||
/usr/lib64
|
||||
/usr/lib/gcc/x86_64-linux-gnu # Debian
|
||||
/usr/lib/gcc/i386-linux-gnu
|
||||
/usr/lib/gcc/i486-linux-gnu
|
||||
@ -65,35 +68,13 @@ find_library(GFORTRAN NAMES gfortran
|
||||
/usr/lib/gcc/x86_64-suse-linux
|
||||
/usr/lib/gcc/armv6hl-suse-linux-gnueabi
|
||||
/usr/lib/gcc/armv7hl-suse-linux-gnueabi
|
||||
/usr/lib/gcc/loongarch64-linux-gnu
|
||||
/usr/lib64/gcc/aarch64-suse-linux
|
||||
/usr/lib64/gcc/powerpc64-suse-linux
|
||||
/usr/lib64/gcc/powerpc64le-suse-linux
|
||||
/usr/lib64/gcc/riscv64-suse-linux
|
||||
/usr/lib64/gcc/s390x-suse-linux
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/i386-gnu
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i386-kfreebsd-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/lib/loongarch64-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/usr/local/lib/i386
|
||||
${GNSSSDR_LIB_PATHS}
|
||||
PATH_SUFFIXES
|
||||
${GCC_SERIES}
|
||||
)
|
||||
|
@ -24,6 +24,10 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GNSSSDR_LIB_PATHS)
|
||||
include(GnsssdrLibPaths)
|
||||
endif()
|
||||
|
||||
if(NOT PKG_CONFIG_FOUND)
|
||||
include(FindPkgConfig)
|
||||
endif()
|
||||
@ -45,36 +49,7 @@ macro(_FIND_GLOG_LIBRARIES _var)
|
||||
NAMES ${ARGN}
|
||||
HINTS ${PC_GLOG_LIBDIR}
|
||||
PATHS ${LIB_PATHS}
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/i386-gnu
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i386-kfreebsd-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/lib/loongarch64-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNSSSDR_LIB_PATHS}
|
||||
${GLOG_ROOT}/lib
|
||||
$ENV{GLOG_ROOT}/lib
|
||||
${GLOG_ROOT}/lib64
|
||||
|
@ -12,6 +12,10 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GNSSSDR_LIB_PATHS)
|
||||
include(GnsssdrLibPaths)
|
||||
endif()
|
||||
|
||||
if(NOT PKG_CONFIG_FOUND)
|
||||
include(FindPkgConfig)
|
||||
endif()
|
||||
@ -105,36 +109,7 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
|
||||
HINTS ${PC_LIBDIR}
|
||||
PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/lib
|
||||
${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/i386-gnu
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i386-kfreebsd-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/lib/loongarch64-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNSSSDR_LIB_PATHS}
|
||||
)
|
||||
list(APPEND ${LIBVAR_NAME} ${${LIBVAR_NAME}_${libname}})
|
||||
endforeach()
|
||||
@ -314,35 +289,7 @@ if(GNURADIO_VERSION VERSION_GREATER 3.8.99)
|
||||
HINTS ${PC_GNURADIO_IIO_LIBDIR}
|
||||
PATHS ${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/lib
|
||||
${GNURADIO_INSTALL_PREFIX_USER_PROVIDED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/i386-gnu
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i386-kfreebsd-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNSSSDR_LIB_PATHS}
|
||||
)
|
||||
|
||||
if(GNURADIO_IIO_LIBRARIES)
|
||||
|
@ -13,6 +13,10 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GNSSSDR_LIB_PATHS)
|
||||
include(GnsssdrLibPaths)
|
||||
endif()
|
||||
|
||||
if(NOT PKG_CONFIG_FOUND)
|
||||
include(FindPkgConfig)
|
||||
endif()
|
||||
@ -70,36 +74,7 @@ find_library(IIO_LIBRARIES
|
||||
HINTS ${PC_IIO_LIBDIR}
|
||||
PATHS ${GRIIO_ROOT_USER_DEFINED}/lib
|
||||
${GRIIO_ROOT_USER_DEFINED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/i686-gnu
|
||||
/usr/lib/i686-linux-gnu
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i686-kfreebsd-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/usr/lib/loongarch64-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNSSSDR_LIB_PATHS}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
@ -31,6 +31,10 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GNSSSDR_LIB_PATHS)
|
||||
include(GnsssdrLibPaths)
|
||||
endif()
|
||||
|
||||
if(NOT PKG_CONFIG_FOUND)
|
||||
include(FindPkgConfig)
|
||||
endif()
|
||||
@ -70,36 +74,7 @@ find_library(GRLIMESDR_LIBRARIES
|
||||
PATHS
|
||||
${GRLIMESDR_ROOT_USER_DEFINED}/lib
|
||||
${GRLIMESDR_ROOT_USER_DEFINED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/i386-gnu
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i386-kfreebsd-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/loongarch64-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNSSSDR_LIB_PATHS}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
@ -31,6 +31,10 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GNSSSDR_LIB_PATHS)
|
||||
include(GnsssdrLibPaths)
|
||||
endif()
|
||||
|
||||
if(NOT PKG_CONFIG_FOUND)
|
||||
include(FindPkgConfig)
|
||||
endif()
|
||||
@ -70,36 +74,7 @@ find_library(GROSMOSDR_LIBRARIES
|
||||
PATHS
|
||||
${GROSMOSDR_ROOT_USER_DEFINED}/lib
|
||||
${GROSMOSDR_ROOT_USER_DEFINED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/i386-gnu
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i386-kfreebsd-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/loongarch64-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNSSSDR_LIB_PATHS}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
@ -13,6 +13,10 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GNSSSDR_LIB_PATHS)
|
||||
include(GnsssdrLibPaths)
|
||||
endif()
|
||||
|
||||
if(NOT PKG_CONFIG_FOUND)
|
||||
include(FindPkgConfig)
|
||||
endif()
|
||||
@ -49,36 +53,7 @@ find_library(LIBAD9361_LIBRARIES
|
||||
HINTS ${PC_LIBAD9361_LIBDIR}
|
||||
PATHS ${LIBAD9361_ROOT_USER_DEFINED}/lib
|
||||
${LIBAD9361_ROOT_USER_DEFINED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/i686-gnu
|
||||
/usr/lib/i686-linux-gnu
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i686-kfreebsd-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/lib/loongarch64-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNSSSDR_LIB_PATHS}
|
||||
/Library/Frameworks/ad9361.framework
|
||||
)
|
||||
|
||||
|
@ -13,6 +13,10 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GNSSSDR_LIB_PATHS)
|
||||
include(GnsssdrLibPaths)
|
||||
endif()
|
||||
|
||||
if(NOT PKG_CONFIG_FOUND)
|
||||
include(FindPkgConfig)
|
||||
endif()
|
||||
@ -51,36 +55,7 @@ find_library(
|
||||
HINTS ${PC_LIBIIO_LIBDIR}
|
||||
PATHS ${LIBIIO_ROOT_USER_DEFINED}/lib
|
||||
${LIBIIO_ROOT_USER_DEFINED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/i686-gnu
|
||||
/usr/lib/i686-linux-gnu
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i686-kfreebsd-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/lib/loongarch64-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNSSSDR_LIB_PATHS}
|
||||
/Library/Frameworks/iio.framework/
|
||||
)
|
||||
|
||||
|
@ -17,6 +17,10 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GNSSSDR_LIB_PATHS)
|
||||
include(GnsssdrLibPaths)
|
||||
endif()
|
||||
|
||||
find_path(LIBUNWIND_INCLUDE_DIR
|
||||
NAMES
|
||||
libunwind.h
|
||||
@ -41,6 +45,7 @@ find_library(LIBUNWIND_GENERIC_LIBRARY
|
||||
PATHS
|
||||
"${LIBUNWIND_ROOT}/lib"
|
||||
"${LIBUNWIND_ROOT}/lib64"
|
||||
${GNSSSDR_LIB_PATHS}
|
||||
)
|
||||
|
||||
if(LIBUNWIND_INCLUDE_DIR)
|
||||
|
@ -19,6 +19,10 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GNSSSDR_LIB_PATHS)
|
||||
include(GnsssdrLibPaths)
|
||||
endif()
|
||||
|
||||
if(NOT PKG_CONFIG_FOUND)
|
||||
include(FindPkgConfig)
|
||||
endif()
|
||||
@ -74,35 +78,7 @@ find_library(LOG4CPP_LIBRARY
|
||||
HINTS ${PC_LOG4CPP_LIBDIR}
|
||||
PATHS ${LOG4CPP_ROOT_USER_PROVIDED}/lib
|
||||
${LOG4CPP_ROOT_USER_PROVIDED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/i386-gnu
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i386-kfreebsd-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNSSSDR_LIB_PATHS}
|
||||
)
|
||||
|
||||
if(LOG4CPP_INCLUDE_DIR AND LOG4CPP_LIBRARY)
|
||||
|
@ -55,6 +55,10 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GNSSSDR_LIB_PATHS)
|
||||
include(GnsssdrLibPaths)
|
||||
endif()
|
||||
|
||||
if(NOT MATIO_ROOT)
|
||||
set(MATIO_ROOT_USER_DEFINED /usr)
|
||||
else()
|
||||
@ -85,33 +89,7 @@ find_library(MATIO_LIBRARY
|
||||
PATHS
|
||||
${MATIO_ROOT_USER_DEFINED}/lib
|
||||
${MATIO_ROOT_USER_DEFINED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i386-kfreebsd-gnu
|
||||
/usr/lib/loongarch64-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNSSSDR_LIB_PATHS}
|
||||
${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib
|
||||
DOC "The MATIO library"
|
||||
)
|
||||
|
@ -13,6 +13,10 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GNSSSDR_LIB_PATHS)
|
||||
include(GnsssdrLibPaths)
|
||||
endif()
|
||||
|
||||
if(NOT PKG_CONFIG_FOUND)
|
||||
include(FindPkgConfig)
|
||||
endif()
|
||||
@ -65,26 +69,7 @@ find_path(ORC_LIBRARY_DIR
|
||||
${ORC_ROOT_USER_PROVIDED}/lib64
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/lib/loongarch64-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNSSSDR_LIB_PATHS}
|
||||
)
|
||||
|
||||
find_library(ORC_LIB orc-0.4
|
||||
@ -93,26 +78,7 @@ find_library(ORC_LIB orc-0.4
|
||||
${ORC_ROOT_USER_PROVIDED}/lib64
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/lib/loongarch64-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNSSSDR_LIB_PATHS}
|
||||
)
|
||||
|
||||
find_library(ORC_LIBRARY_STATIC ${CMAKE_STATIC_LIBRARY_PREFIX}orc-0.4${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
|
@ -23,6 +23,10 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GNSSSDR_LIB_PATHS)
|
||||
include(GnsssdrLibPaths)
|
||||
endif()
|
||||
|
||||
if(NOT PKG_CONFIG_FOUND)
|
||||
include(FindPkgConfig)
|
||||
endif()
|
||||
@ -88,33 +92,7 @@ else()
|
||||
${PC_PCAP_LIBDIR}
|
||||
PATHS
|
||||
${PCAP_ROOT_USER_PROVIDED}/lib
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/lib/loongarch64-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i386-kfreebsd-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNSSSDR_LIB_PATHS}
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -20,6 +20,10 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GNSSSDR_LIB_PATHS)
|
||||
include(GnsssdrLibPaths)
|
||||
endif()
|
||||
|
||||
if(NOT PKG_CONFIG_FOUND)
|
||||
include(FindPkgConfig)
|
||||
endif()
|
||||
@ -66,36 +70,9 @@ find_library(PUGIXML_LIBRARY
|
||||
${PUGIXML_ROOT_USER_DEFINED}/lib64/pugixml-${PC_PUGIXML_VERSION}
|
||||
${PUGIXML_ROOT_USER_DEFINED}}/lib/pugixml-1.9
|
||||
${PUGIXML_ROOT_USER_DEFINED}/lib64/pugixml-1.9
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/lib/loongarch64-linux-gnu
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i386-kfreebsd-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
${GNSSSDR_LIB_PATHS}
|
||||
/usr/local/lib/pugixml-${PC_PUGIXML_VERSION}
|
||||
/usr/local/lib/pugixml-1.9
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
# Support the REQUIRED and QUIET arguments, and set PUGIXML_FOUND if found.
|
||||
|
@ -16,6 +16,10 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GNSSSDR_LIB_PATHS)
|
||||
include(GnsssdrLibPaths)
|
||||
endif()
|
||||
|
||||
if(NOT PKG_CONFIG_FOUND)
|
||||
include(FindPkgConfig)
|
||||
endif()
|
||||
@ -60,36 +64,7 @@ find_library(UHD_LIBRARIES
|
||||
HINTS ${PC_UHD_LIBDIR}
|
||||
PATHS ${UHD_ROOT_USER_PROVIDED}/lib
|
||||
${UHD_ROOT_USER_PROVIDED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/i386-gnu
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i386-kfreebsd-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/lib/loongarch64-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNSSSDR_LIB_PATHS}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
@ -16,6 +16,10 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GNSSSDR_LIB_PATHS)
|
||||
include(GnsssdrLibPaths)
|
||||
endif()
|
||||
|
||||
if(NOT PKG_CONFIG_FOUND)
|
||||
include(FindPkgConfig)
|
||||
endif()
|
||||
@ -58,35 +62,7 @@ find_library(VOLK_LIBRARIES
|
||||
HINTS ${PC_VOLK_LIBDIR}
|
||||
PATHS ${VOLK_ROOT_USER_PROVIDED}/lib
|
||||
${VOLK_ROOT_USER_PROVIDED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/i386-gnu
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i386-kfreebsd-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/lib/loongarch64-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
${GNSSSDR_LIB_PATHS}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
@ -13,6 +13,10 @@ if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
if(NOT GNSSSDR_LIB_PATHS)
|
||||
include(GnsssdrLibPaths)
|
||||
endif()
|
||||
|
||||
if(NOT PKG_CONFIG_FOUND)
|
||||
include(FindPkgConfig)
|
||||
endif()
|
||||
@ -29,33 +33,7 @@ find_path(ZEROMQ_INCLUDE_DIRS
|
||||
find_library(ZEROMQ_LIBRARIES
|
||||
NAMES zmq libzmq.so.5 ${ZEROMQ_LIBRARY_NAME}
|
||||
HINTS ${PC_ZEROMQ_LIBDIR} ${CMAKE_INSTALL_PREFIX}/lib ${CMAKE_INSTALL_PREFIX}/lib64
|
||||
PATHS /usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/lib/loongarch64-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/i386-kfreebsd-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
PATHS ${GNSSSDR_LIB_PATHS}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
43
cmake/Modules/GnsssdrLibPaths.cmake
Normal file
43
cmake/Modules/GnsssdrLibPaths.cmake
Normal file
@ -0,0 +1,43 @@
|
||||
# GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2011-2024 C. Fernandez-Prades cfernandez(at)cttc.es
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
if(GNSSSDR_LIB_PATHS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(GNSSSDR_LIB_PATHS
|
||||
/usr/lib
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/alpha-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/i386-gnu
|
||||
/usr/lib/i386-kfreebsd-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/loongarch64-linux-gnu
|
||||
/usr/lib/m68k-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc-linux-gnuspe
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/riscv64-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/lib/sh4-linux-gnu
|
||||
/usr/lib/sparc64-linux-gnu
|
||||
/usr/lib/x86_64-kfreebsd-gnu
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/x86_64-linux-gnux32
|
||||
/usr/lib64
|
||||
/usr/local/lib
|
||||
/usr/local/lib/i386
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
)
|
@ -2173,7 +2173,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
d_gnss_observables_map_t1 = d_gnss_observables_map;
|
||||
|
||||
// ### select the rx_time and interpolate observables at that time
|
||||
if (!d_gnss_observables_map_t0.empty())
|
||||
if (!d_gnss_observables_map_t0.empty() && !d_gnss_observables_map_t1.empty())
|
||||
{
|
||||
const auto t0_int_ms = static_cast<uint32_t>(d_gnss_observables_map_t0.cbegin()->second.RX_time * 1000.0);
|
||||
const uint32_t adjust_next_obs_interval_ms = d_observable_interval_ms - t0_int_ms % d_observable_interval_ms;
|
||||
|
@ -13,6 +13,7 @@
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
#include "ad936x_iio_custom.h"
|
||||
#include "display.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <chrono>
|
||||
@ -44,6 +45,7 @@ ad936x_iio_custom::ad936x_iio_custom(int debug_level_, int log_level_)
|
||||
n_channels = 0;
|
||||
}
|
||||
|
||||
|
||||
ad936x_iio_custom::~ad936x_iio_custom()
|
||||
{
|
||||
// disable TX
|
||||
@ -59,11 +61,13 @@ void ad936x_iio_custom::set_gnsstime_queue(std::shared_ptr<Concurrent_Queue<Gnss
|
||||
GnssTime_queue = std::move(queue);
|
||||
}
|
||||
|
||||
|
||||
void ad936x_iio_custom::set_pps_samplestamp_queue(std::shared_ptr<Concurrent_Queue<PpsSamplestamp>> queue)
|
||||
{
|
||||
Pps_queue = std::move(queue);
|
||||
}
|
||||
|
||||
|
||||
bool ad936x_iio_custom::initialize_device(std::string pluto_device_uri, std::string board_type)
|
||||
{
|
||||
// Find devices
|
||||
@ -125,7 +129,6 @@ bool ad936x_iio_custom::initialize_device(std::string pluto_device_uri, std::str
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
phy = iio_context_find_device(ctx, "ad9361-phy");
|
||||
|
||||
if (phy == NULL)
|
||||
@ -328,7 +331,6 @@ bool ad936x_iio_custom::config_ad9361_dds(uint64_t freq_rf_tx_hz_,
|
||||
configure_params(dds_dev, params_dds);
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -345,6 +347,7 @@ bool ad936x_iio_custom::check_device()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool ad936x_iio_custom::get_iio_param(iio_device *dev, const std::string ¶m, std::string &value)
|
||||
{
|
||||
struct iio_channel *chn = 0;
|
||||
@ -386,6 +389,7 @@ bool ad936x_iio_custom::get_iio_param(iio_device *dev, const std::string ¶m,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool ad936x_iio_custom::read_die_temp(double &temp_c)
|
||||
{
|
||||
std::string temp_mC_str;
|
||||
@ -410,6 +414,8 @@ bool ad936x_iio_custom::read_die_temp(double &temp_c)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool ad936x_iio_custom::init_config_ad9361_rx(long long bandwidth_,
|
||||
long long sample_rate_,
|
||||
long long freq_,
|
||||
@ -425,7 +431,6 @@ bool ad936x_iio_custom::init_config_ad9361_rx(long long bandwidth_,
|
||||
double lo_attenuation_db_,
|
||||
bool high_side_lo_,
|
||||
int tx_lo_channel_)
|
||||
|
||||
{
|
||||
if (check_device() == false) return false;
|
||||
|
||||
@ -610,14 +615,12 @@ bool ad936x_iio_custom::init_config_ad9361_rx(long long bandwidth_,
|
||||
std::cerr << "Warning: rf_port_select write returned: " << ret << "\n";
|
||||
no_errors = false;
|
||||
}
|
||||
|
||||
// ret = iio_channel_attr_write_longlong(phy_ch, "rf_bandwidth", bandwidth_);
|
||||
// if (ret < 0)
|
||||
// {
|
||||
// std::cerr << "Warning: rf_bandwidth write returned: " << ret << "\n";
|
||||
// no_errors = false;
|
||||
// }
|
||||
|
||||
long long set_rf_bw;
|
||||
ret = iio_channel_attr_read_longlong(phy_ch, "rf_bandwidth", &set_rf_bw);
|
||||
if (ret < 0)
|
||||
@ -630,7 +633,6 @@ bool ad936x_iio_custom::init_config_ad9361_rx(long long bandwidth_,
|
||||
std::cerr << "Info: rf_bandwidth read returned: " << set_rf_bw << " Hz \n";
|
||||
}
|
||||
|
||||
|
||||
if (setRXGain(0, gain_mode_rx0_, rf_gain_rx0_) == false)
|
||||
{
|
||||
std::cerr << "Info: setRXGain read returned false \n";
|
||||
@ -662,14 +664,12 @@ bool ad936x_iio_custom::init_config_ad9361_rx(long long bandwidth_,
|
||||
std::cerr << "Warning: rf_port_select write returned: " << ret << "\n";
|
||||
no_errors = false;
|
||||
}
|
||||
|
||||
// ret = iio_channel_attr_write_longlong(phy_ch, "rf_bandwidth", bandwidth_);
|
||||
// if (ret < 0)
|
||||
// {
|
||||
// std::cerr << "Warning: rf_bandwidth write returned: " << ret << "\n";
|
||||
// no_errors = false;
|
||||
// }
|
||||
|
||||
long long set_rf_bw;
|
||||
ret = iio_channel_attr_read_longlong(phy_ch, "rf_bandwidth", &set_rf_bw);
|
||||
if (ret < 0)
|
||||
@ -702,6 +702,7 @@ bool ad936x_iio_custom::init_config_ad9361_rx(long long bandwidth_,
|
||||
return no_errors;
|
||||
}
|
||||
|
||||
|
||||
bool ad936x_iio_custom::set_rx_frequency(long long freq_hz)
|
||||
{
|
||||
if (check_device() == false) return false;
|
||||
@ -747,6 +748,7 @@ bool ad936x_iio_custom::get_rx_frequency(long long &freq_hz)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ad936x_iio_custom::setRXGain(int ch_num, std::string gain_mode, double gain_dB)
|
||||
{
|
||||
if (check_device() == false) return false;
|
||||
@ -779,6 +781,7 @@ bool ad936x_iio_custom::setRXGain(int ch_num, std::string gain_mode, double gain
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
double ad936x_iio_custom::get_rx_gain(int ch_num)
|
||||
{
|
||||
if (check_device() == false) return -1;
|
||||
@ -817,6 +820,7 @@ bool ad936x_iio_custom::calibrate([[maybe_unused]] int ch, [[maybe_unused]] doub
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void ad936x_iio_custom::monitor_thread_fn()
|
||||
{
|
||||
uint32_t val;
|
||||
@ -849,11 +853,12 @@ void ad936x_iio_custom::monitor_thread_fn()
|
||||
// } else {
|
||||
if (val & 4)
|
||||
{
|
||||
std::cout << "WARNING: IIO status register reported overflow!\n";
|
||||
LOG(INFO) << "WARNING: IIO status register reported overflow!";
|
||||
std::cout
|
||||
<< TEXT_BOLD_RED
|
||||
<< "WARNING: IIO status register reported overflow!\n";
|
||||
LOG(WARNING) << "WARNING: IIO status register reported overflow!";
|
||||
}
|
||||
|
||||
|
||||
/* Clear bits */
|
||||
if (val)
|
||||
{
|
||||
@ -867,6 +872,7 @@ void ad936x_iio_custom::monitor_thread_fn()
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void ad936x_iio_custom::stop_record()
|
||||
{
|
||||
receive_samples = false;
|
||||
@ -915,6 +921,7 @@ void ad936x_iio_custom::PlutoTxEnable(bool txon)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ad936x_iio_custom::setPlutoGpo(int p)
|
||||
{
|
||||
char pins[11];
|
||||
@ -953,7 +960,6 @@ bool ad936x_iio_custom::select_rf_filter(std::string rf_filter)
|
||||
// 1 Enable
|
||||
// X Enable Mask if Identifier=0xF
|
||||
|
||||
|
||||
if (check_device() == false) return false;
|
||||
// int plutoGpo = 0;
|
||||
int ret;
|
||||
@ -1006,6 +1012,8 @@ bool ad936x_iio_custom::select_rf_filter(std::string rf_filter)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void ad936x_iio_custom::get_PPS_timestamp()
|
||||
{
|
||||
GnssTime tow;
|
||||
@ -1042,7 +1050,6 @@ void ad936x_iio_custom::get_PPS_timestamp()
|
||||
// record pps rise samplestamp associated to the absolute sample counter
|
||||
// PPS rising edge must be associated with the corresponding uBlox time message (tx once a second)
|
||||
|
||||
|
||||
if (GnssTime_queue->timed_wait_and_pop(tow, 2000) == false)
|
||||
{
|
||||
if (receive_samples == true)
|
||||
@ -1073,6 +1080,8 @@ void ad936x_iio_custom::get_PPS_timestamp()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool ad936x_iio_custom::start_sample_rx(bool ppsmode)
|
||||
{
|
||||
// using queues of smart pointers to preallocated buffers
|
||||
@ -1118,9 +1127,7 @@ bool ad936x_iio_custom::start_sample_rx(bool ppsmode)
|
||||
// start sample overflow detector
|
||||
overflow_monitor_thread = std::thread(&ad936x_iio_custom::monitor_thread_fn, this);
|
||||
|
||||
|
||||
// start PPS and GNSS Time capture thread
|
||||
|
||||
if (ppsmode == true)
|
||||
{
|
||||
capture_time_thread = std::thread(&ad936x_iio_custom::get_PPS_timestamp, this);
|
||||
@ -1128,16 +1135,19 @@ bool ad936x_iio_custom::start_sample_rx(bool ppsmode)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void ad936x_iio_custom::pop_sample_buffer(std::shared_ptr<ad936x_iio_samples> ¤t_buffer)
|
||||
{
|
||||
used_buffers.wait_and_pop(current_buffer);
|
||||
}
|
||||
|
||||
|
||||
void ad936x_iio_custom::push_sample_buffer(std::shared_ptr<ad936x_iio_samples> ¤t_buffer)
|
||||
{
|
||||
free_buffers.push(current_buffer);
|
||||
}
|
||||
|
||||
|
||||
void ad936x_iio_custom::capture(const std::vector<std::string> &channels)
|
||||
{
|
||||
if (check_device() == false) return;
|
||||
|
@ -46,6 +46,7 @@ gnss_synchro_monitor::gnss_synchro_monitor(int n_channels,
|
||||
: gr::block("gnss_synchro_monitor",
|
||||
gr::io_signature::make(n_channels, n_channels, sizeof(Gnss_Synchro)),
|
||||
gr::io_signature::make(0, 0, 0)),
|
||||
count(0),
|
||||
d_nchannels(n_channels),
|
||||
d_decimation_factor(decimation_factor)
|
||||
{
|
||||
@ -73,7 +74,6 @@ int gnss_synchro_monitor::general_work(int noutput_items __attribute__((unused))
|
||||
for (int channel_index = 0; channel_index < d_nchannels; channel_index++)
|
||||
{
|
||||
// Loop through each item in each input stream channel
|
||||
int count = 0;
|
||||
for (int item_index = 0; item_index < ninput_items[channel_index]; item_index++)
|
||||
{
|
||||
// Use the count variable to limit how many items are sent per channel
|
||||
|
@ -71,9 +71,10 @@ private:
|
||||
const std::vector<std::string>& udp_addresses,
|
||||
bool enable_protobuf);
|
||||
|
||||
std::unique_ptr<Gnss_Synchro_Udp_Sink> udp_sink_ptr;
|
||||
int count;
|
||||
int d_nchannels;
|
||||
int d_decimation_factor;
|
||||
std::unique_ptr<Gnss_Synchro_Udp_Sink> udp_sink_ptr;
|
||||
};
|
||||
|
||||
|
||||
|
@ -36,52 +36,48 @@ template <typename Data>
|
||||
*/
|
||||
class Concurrent_Map
|
||||
{
|
||||
typedef typename std::map<int, Data>::iterator Data_iterator; // iterator is scope dependent
|
||||
public:
|
||||
void write(int key, Data const& data)
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(the_mutex);
|
||||
Data_iterator data_iter;
|
||||
data_iter = the_map.find(key);
|
||||
std::lock_guard<std::mutex> lock(the_mutex);
|
||||
auto data_iter = the_map.find(key);
|
||||
if (data_iter != the_map.end())
|
||||
{
|
||||
data_iter->second = data; // update
|
||||
}
|
||||
else
|
||||
{
|
||||
the_map.insert(std::pair<int, Data>(key, data)); // insert SILENTLY fails if the item already exists in the map!
|
||||
the_map.insert(std::pair<int, Data>(key, data)); // insert does not overwrite if the item already exists in the map!
|
||||
}
|
||||
lock.unlock();
|
||||
}
|
||||
|
||||
std::map<int, Data> get_map_copy()
|
||||
std::map<int, Data> get_map_copy() const&
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(the_mutex);
|
||||
std::map<int, Data> map_aux = the_map;
|
||||
lock.unlock();
|
||||
return map_aux;
|
||||
std::lock_guard<std::mutex> lock(the_mutex);
|
||||
return the_map; // This implicitly creates a copy
|
||||
}
|
||||
|
||||
size_t size()
|
||||
std::map<int, Data> get_map_copy() &&
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(the_mutex);
|
||||
size_t size_ = the_map.size();
|
||||
lock.unlock();
|
||||
return size_;
|
||||
std::lock_guard<std::mutex> lock(the_mutex);
|
||||
return std::move(the_map);
|
||||
}
|
||||
|
||||
bool read(int key, Data& p_data)
|
||||
size_t size() const
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(the_mutex);
|
||||
Data_iterator data_iter;
|
||||
data_iter = the_map.find(key);
|
||||
std::lock_guard<std::mutex> lock(the_mutex);
|
||||
return the_map.size();
|
||||
}
|
||||
|
||||
bool read(int key, Data& p_data) const
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(the_mutex);
|
||||
auto data_iter = the_map.find(key);
|
||||
if (data_iter != the_map.end())
|
||||
{
|
||||
p_data = data_iter->second;
|
||||
lock.unlock();
|
||||
return true;
|
||||
}
|
||||
lock.unlock();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -19,9 +19,10 @@
|
||||
|
||||
#include <chrono>
|
||||
#include <condition_variable>
|
||||
#include <cstddef>
|
||||
#include <mutex>
|
||||
#include <queue>
|
||||
#include <thread>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Core
|
||||
* \{ */
|
||||
@ -33,48 +34,53 @@ template <typename Data>
|
||||
|
||||
/*!
|
||||
* \brief This class implements a thread-safe std::queue
|
||||
*
|
||||
* Thread-safe object queue which uses the library
|
||||
* boost_thread to perform MUTEX based on the code available at
|
||||
* https://www.justsoftwaresolutions.co.uk/threading/implementing-a-thread-safe-queue-using-condition-variables.html
|
||||
*/
|
||||
class Concurrent_Queue
|
||||
{
|
||||
public:
|
||||
void push(Data const& data)
|
||||
void push(const Data& data)
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(the_mutex);
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(the_mutex);
|
||||
the_queue.push(data);
|
||||
lock.unlock();
|
||||
}
|
||||
the_condition_variable.notify_one();
|
||||
}
|
||||
|
||||
bool empty() const
|
||||
void push(Data&& data)
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(the_mutex);
|
||||
return the_queue.empty();
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(the_mutex);
|
||||
the_queue.push(std::move(data));
|
||||
}
|
||||
the_condition_variable.notify_one();
|
||||
}
|
||||
|
||||
size_t size() const
|
||||
bool empty() const noexcept
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(the_mutex);
|
||||
return size() == 0;
|
||||
}
|
||||
|
||||
size_t size() const noexcept
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(the_mutex);
|
||||
return the_queue.size();
|
||||
}
|
||||
|
||||
void clear()
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(the_mutex);
|
||||
the_queue = std::queue<Data>();
|
||||
std::lock_guard<std::mutex> lock(the_mutex);
|
||||
std::queue<Data>().swap(the_queue);
|
||||
}
|
||||
|
||||
bool try_pop(Data& popped_value)
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(the_mutex);
|
||||
std::lock_guard<std::mutex> lock(the_mutex);
|
||||
if (the_queue.empty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
popped_value = the_queue.front();
|
||||
popped_value = std::move(the_queue.front());
|
||||
the_queue.pop();
|
||||
return true;
|
||||
}
|
||||
@ -82,26 +88,21 @@ public:
|
||||
void wait_and_pop(Data& popped_value)
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(the_mutex);
|
||||
while (the_queue.empty())
|
||||
{
|
||||
the_condition_variable.wait(lock);
|
||||
}
|
||||
popped_value = the_queue.front();
|
||||
the_condition_variable.wait(lock, [this] { return !the_queue.empty(); });
|
||||
popped_value = std::move(the_queue.front());
|
||||
the_queue.pop();
|
||||
}
|
||||
|
||||
bool timed_wait_and_pop(Data& popped_value, int wait_ms)
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(the_mutex);
|
||||
if (the_queue.empty())
|
||||
{
|
||||
the_condition_variable.wait_for(lock, std::chrono::milliseconds(wait_ms));
|
||||
if (the_queue.empty())
|
||||
if (!the_condition_variable.wait_for(lock,
|
||||
std::chrono::milliseconds(wait_ms),
|
||||
[this] { return !the_queue.empty(); }))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
popped_value = the_queue.front();
|
||||
popped_value = std::move(the_queue.front());
|
||||
the_queue.pop();
|
||||
return true;
|
||||
}
|
||||
|
@ -113,6 +113,7 @@
|
||||
#include "tracking_interface.h"
|
||||
#include "two_bit_cpx_file_signal_source.h"
|
||||
#include "two_bit_packed_file_signal_source.h"
|
||||
#include <cstdlib> // for exit
|
||||
#include <exception> // for exception
|
||||
#include <iostream> // for cerr
|
||||
#include <utility> // for move
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include <algorithm> // for transform, sort, unique
|
||||
#include <cmath> // for floor
|
||||
#include <cstddef> // for size_t
|
||||
#include <cstdlib> // for exit
|
||||
#include <exception> // for exception
|
||||
#include <iostream> // for operator<<
|
||||
#include <iterator> // for insert_iterator, inserter
|
||||
@ -124,9 +125,15 @@ void GNSSFlowgraph::init()
|
||||
sources_count_ = configuration_->property("GNSS-SDR.num_sources", sources_count_deprecated);
|
||||
|
||||
// Avoid segmentation fault caused by wrong configuration
|
||||
if (sources_count_ == 2 && block_factory->GetSignalSource(configuration_.get(), queue_.get(), 0)->implementation() == "Multichannel_File_Signal_Source")
|
||||
auto check_not_nullptr = block_factory->GetSignalSource(configuration_.get(), queue_.get(), 0);
|
||||
if (!check_not_nullptr)
|
||||
{
|
||||
std::cout << " * Please set GNSS-SDR.num_sources=1 in your configuraiion file\n";
|
||||
std::cout << "GNSS-SDR program ended.\n";
|
||||
exit(1);
|
||||
}
|
||||
if (sources_count_ == 2 && check_not_nullptr->implementation() == "Multichannel_File_Signal_Source")
|
||||
{
|
||||
std::cout << " * Please set GNSS-SDR.num_sources=1 in your configuration file\n";
|
||||
std::cout << " if you are using the Multichannel_File_Signal_Source implementation.\n";
|
||||
sources_count_ = 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user