Fix runtime errors if compiling in Debug mode on MacOS

Before this fix, the execution crashed at the first PVT fix computation when compiling with the Debug mode
This commit is contained in:
Carles Fernandez 2020-02-28 22:00:36 +01:00
parent 581ba96904
commit 1656463d04
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 23 additions and 10 deletions

View File

@ -233,6 +233,18 @@ if((${CMAKE_SYSTEM_NAME} MATCHES "Linux|kFreeBSD|GNU") AND (CMAKE_CXX_COMPILER_I
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")
endif()
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# Fix for Debug mode in macOS
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-fstandalone-debug HAVE_STANDALONE_DEBUG)
check_cxx_compiler_flag(-Og HAVE_OG_FLAG)
if(HAVE_STANDALONE_DEBUG AND HAVE_OG_FLAG)
set(CMAKE_CXX_FLAGS_DEBUG "-Og -g -fstandalone-debug")
set(CMAKE_C_FLAGS_DEBUG "-Og -g -fstandalone-debug")
endif()
endif()
endif()
# allow 'large' files in 32 bit builds
if(UNIX)

View File

@ -100,6 +100,7 @@ SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades <carles.fernandez@cttc
(e.g, the volk_gnsssdr library and googletest). Build types available: `None`,
`Release` (by default), `Debug`, `RelWithDebInfo`, `MinSizeRel`, `Coverage`,
`NoOptWithASM`, `O2WithASM`, `O3WithASM`, `ASAN`.
- Fix runtime errors when compiling in `Debug` mode on macOS.
- Updated links in comments along the source code and in CMake scripts.
- Update GSL implementation to 0.36.0. See
https://github.com/gsl-lite/gsl-lite/releases/tag/v0.36.0
@ -161,7 +162,7 @@ SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades <carles.fernandez@cttc
### Improvements in Testability:
- Add receiver runtime to position_test report.
- Add receiver runtime to `position_test` report.
- Improvements in FPGA unit tests.
- Add new utility tool `obsdiff` to perform single and double differences
computations from observation RINEX files. Requires GPSTk and Armadillo >=
@ -190,7 +191,7 @@ SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades <carles.fernandez@cttc
See the definitions of concepts and metrics at
https://gnss-sdr.org/design-forces/
## [0.0.11](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.11)
## [GNSS-SDR v0.0.11](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.11)
This release has several improvements in different dimensions, addition of new
features and bug fixes:
@ -337,7 +338,7 @@ features and bug fixes:
See the definitions of concepts and metrics at
https://gnss-sdr.org/design-forces/
## [0.0.10](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.10)
## [GNSS-SDR v0.0.10](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.10)
This release has several improvements in different dimensions, addition of new
features and bug fixes:
@ -567,7 +568,7 @@ features and bug fixes:
See the definitions of concepts and metrics at
https://gnss-sdr.org/design-forces/
## [0.0.9](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.9)
## [GNSS-SDR v0.0.9](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.9)
DOI: https://doi.org/10.5281/zenodo.291371
@ -686,7 +687,7 @@ many dimensions:
See the definitions of concepts and metrics at
https://gnss-sdr.org/design-forces/
## [0.0.8](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.8)
## [GNSS-SDR v0.0.8](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.8)
DOI: https://doi.org/10.5281/zenodo.57022
@ -710,7 +711,7 @@ respect to v0.0.7. The main changes are:
- VOLK_GNSSSDR: Added an option to trigger profiling at building time.
- VOLK_GNSSSDR: Fix the CMake-based check for posix_memalign.
## [0.0.7](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.7)
## [GNSS-SDR v0.0.7](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.7)
DOI: https://doi.org/10.5281/zenodo.51521
@ -800,7 +801,7 @@ This release has several improvements, addition of new features and bug fixes:
- Added a CGRAN (https://www.cgran.org/) manifest
- Lots of code cleaning and fixes of typos and small bugs.
## [0.0.6](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.6)
## [GNSS-SDR v0.0.6](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.6)
This release has several improvements and bug fixes:
@ -847,7 +848,7 @@ This release has several improvements and bug fixes:
- Enabled cross-compilation for ARM devices.
- Lots of code cleaning.
## [0.0.5](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.5)
## [GNSS-SDR v0.0.5](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.5)
This release has several improvements and bug fixes:
@ -872,7 +873,7 @@ This release has several improvements and bug fixes:
- Added support for interleaved I/Q byte-size sample files.
- Minor bug fixes, updated documentation and code cleaning.
## [0.0.4](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.4)
## [GNSS-SDR v0.0.4](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.4)
This release has several improvements and bug fixes:
@ -907,7 +908,7 @@ This release has several improvements and bug fixes:
- Some raw pointers have been changed to smart pointers.
- Minor bug fixes and code cleaning.
## [0.0.3](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.3)
## [GNSS-SDR v0.0.3](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.3)
This release has several improvements and bug fixes, completing the transition
from Subversion to Git. The main changes are: