1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-10-24 03:57:39 +00:00

Fix bug in MacOS when BeiDou was enabled in rtklib.h

The BLAS and LAPACK implementations that come with the Accelerate Framework (soft-linked in /usr/bin) caused a random crash when exiting the program, only if the variable ENABDS was set. This bug disappears when linking to the libraries that Homebrew or Macports install, or when manually downloaded, built and installed by the user
This commit is contained in:
Carles Fernandez
2019-03-22 11:00:13 +01:00
parent c2917939ba
commit cb59c1cc83
5 changed files with 96 additions and 17 deletions

View File

@@ -70,14 +70,10 @@ target_link_libraries(algorithms_libs_rtklib
core_system_parameters
Gflags::gflags
Glog::glog
${LAPACK_LIBRARIES}
${BLAS_LIBRARIES}
)
if(OS_IS_MACOSX)
target_link_libraries(algorithms_libs_rtklib PRIVATE "-framework Accelerate")
else()
target_link_libraries(algorithms_libs_rtklib PRIVATE ${LAPACK} ${BLAS})
endif()
set_property(TARGET algorithms_libs_rtklib
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>

View File

@@ -215,9 +215,7 @@ const int NSATQZS = 0;
const int NSYSQZS = 0;
#endif
#ifndef __APPLE__
#define ENABDS
#endif
#ifdef ENABDS
const int MINPRNBDS = 1; //!< min satellite sat number of BeiDou
const int MAXPRNBDS = 37; //!< max satellite sat number of BeiDou