mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-08-01 13:32:33 -04:00
Implemented sanitize address option on cmake command
This commit is contained in:
parent
e9f2680391
commit
bc8ea82e8b
@ -27,6 +27,7 @@ option(V4L-RTL "Use Linux Kernel RTL-SDR Source." OFF)
|
|||||||
option(V4L-MSI "Use Linux Kernel MSI2500 Source." OFF)
|
option(V4L-MSI "Use Linux Kernel MSI2500 Source." OFF)
|
||||||
option(BUILD_TYPE "Build type (RELEASE, RELEASEWITHDBGINFO, DEBUG" RELEASE)
|
option(BUILD_TYPE "Build type (RELEASE, RELEASEWITHDBGINFO, DEBUG" RELEASE)
|
||||||
option(DEBUG_OUTPUT "Print debug messages" OFF)
|
option(DEBUG_OUTPUT "Print debug messages" OFF)
|
||||||
|
option(SANITIZE_ADDRESS "Activate memory address sanitization" OFF)
|
||||||
option(HOST_RPI "Compiling on RPi" OFF)
|
option(HOST_RPI "Compiling on RPi" OFF)
|
||||||
option(RX_SAMPLE_24BIT "Internal 24 bit Rx DSP" OFF)
|
option(RX_SAMPLE_24BIT "Internal 24 bit Rx DSP" OFF)
|
||||||
|
|
||||||
@ -194,6 +195,15 @@ else()
|
|||||||
message(STATUS "Compiling for 16 bit Rx DSP chain")
|
message(STATUS "Compiling for 16 bit Rx DSP chain")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (SANITIZE_ADDRESS)
|
||||||
|
message(STATUS "Activate address sanitization")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
|
||||||
|
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fsanitize=address")
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address")
|
||||||
|
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} -fsanitize=address")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fmax-errors=10 -ffast-math -ftree-vectorize ${EXTRA_FLAGS}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fmax-errors=10 -ffast-math -ftree-vectorize ${EXTRA_FLAGS}")
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user