Add new configuration option ENABLE_ARMA_NO_DEBUG

When enabled, defines the ARMA_NO_DEBUG macro in Armadillo, disabling bound checking.
Disabled by default, but it is set automatically to ON if ENABLE_PACKAGING is set to ON
This commit is contained in:
Carles Fernandez 2019-08-12 11:33:51 +02:00
parent e6700907b4
commit 3e3af9de5a
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
8 changed files with 15 additions and 10 deletions

View File

@ -82,8 +82,11 @@ option(ENABLE_OWN_ARMADILLO "Download and build Armadillo locally" OFF)
option(ENABLE_LOG "Enable logging" ON)
option(ENABLE_ARMA_NO_DEBUG OFF)
if(ENABLE_PACKAGING)
set(ENABLE_GENERIC_ARCH ON)
set(ENABLE_ARMA_NO_DEBUG ON)
endif()
# Testing
@ -138,7 +141,7 @@ if(NOT ${THIS_IS_A_RELEASE})
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif(NOT GIT_BRANCH)
endif()
# was this info set in the CMake commandline?
if(NOT GIT_COMMIT_HASH)
# Get the latest abbreviated commit hash of the working branch
@ -148,7 +151,7 @@ if(NOT ${THIS_IS_A_RELEASE})
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif(NOT GIT_COMMIT_HASH)
endif()
endif()
endif()
@ -756,7 +759,7 @@ if(CMAKE_VERSION VERSION_LESS 3.5)
INTERFACE_LINK_LIBRARIES ${Boost_FILESYSTEM_LIBRARIES}
IMPORTED_LOCATION ${Boost_FILESYSTEM_LIBRARIES}
)
endif()
endif()
endif()
endif()
@ -1464,6 +1467,7 @@ find_library(GNUTLS_OPENSSL_LIBRARY NAMES gnutls-openssl libgnutls-openssl.so.27
/usr/lib/powerpc64-linux-gnu
/usr/lib/powerpc64le-linux-gnu
/usr/lib/s390x-linux-gnu
/usr/lib/riscv64-linux-gnu
/usr/lib/sparc64-linux-gnu
/usr/lib/x86_64-linux-gnux32
/usr/lib/sh4-linux-gnu
@ -2460,6 +2464,7 @@ add_feature_info(ENABLE_PROFILING ENABLE_PROFILING "Runs volk_gnsssdr_profile at
add_feature_info(ENABLE_OPENCL ENABLE_OPENCL "Enables GPS_L1_CA_PCPS_OpenCl_Acquisition (experimental). Requires OpenCL.")
add_feature_info(ENABLE_CUDA ENABLE_CUDA "Enables GPS_L1_CA_DLL_PLL_Tracking_GPU (experimental). Requires CUDA.")
add_feature_info(ENABLE_FPGA ENABLE_FPGA "Enables building of processing blocks for FPGA off-loading.")
add_feature_info(ENABLE_ARMA_NO_DEBUG ENABLE_ARMA_NO_DEBUG "Enables passing the ARMA_NO_DEBUG macro to Armadillo, hence disabling bound checking.")
add_feature_info(ENABLE_GENERIC_ARCH ENABLE_GENERIC_ARCH "When disabled, flags such as '-march=native' are passed to the compiler.")
add_feature_info(ENABLE_PACKAGING ENABLE_PACKAGING "Enables software packaging.")
add_feature_info(ENABLE_OWN_GLOG ENABLE_OWN_GLOG "Forces the downloading and building of Google glog.")

View File

@ -95,7 +95,7 @@ target_include_directories(pvt_libs
target_compile_definitions(pvt_libs PRIVATE -DGNSS_SDR_VERSION="${VERSION}")
if(CMAKE_BUILD_TYPE MATCHES Rel)
if(ENABLE_ARMA_NO_DEBUG)
target_compile_definitions(pvt_libs
PUBLIC -DARMA_NO_BOUND_CHECKING=1
)

View File

@ -91,7 +91,7 @@ target_include_directories(acquisition_gr_blocks
${CMAKE_SOURCE_DIR}/src/core/receiver
)
if(CMAKE_BUILD_TYPE MATCHES Rel)
if(ENABLE_ARMA_NO_DEBUG)
target_compile_definitions(acquisition_gr_blocks
PUBLIC -DARMA_NO_BOUND_CHECKING=1
)

View File

@ -118,7 +118,7 @@ if(ENABLE_OPENCL)
)
endif()
if(CMAKE_BUILD_TYPE MATCHES Rel)
if(ENABLE_ARMA_NO_DEBUG)
target_compile_definitions(algorithms_libs
PUBLIC -DARMA_NO_BOUND_CHECKING=1
)

View File

@ -40,7 +40,7 @@ set(TELEMETRY_DECODER_ADAPTER_HEADERS
glonass_l1_ca_telemetry_decoder.h
glonass_l2_ca_telemetry_decoder.h
beidou_b1i_telemetry_decoder.h
beidou_b3i_telemetry_decoder.h
beidou_b3i_telemetry_decoder.h
)
list(SORT TELEMETRY_DECODER_ADAPTER_HEADERS)

View File

@ -109,7 +109,7 @@ if(ENABLE_CUDA AND NOT CMAKE_VERSION VERSION_GREATER 3.11)
)
endif()
if(CMAKE_BUILD_TYPE MATCHES Rel)
if(ENABLE_ARMA_NO_DEBUG)
target_compile_definitions(tracking_gr_blocks
PUBLIC -DARMA_NO_BOUND_CHECKING=1
)

View File

@ -134,7 +134,7 @@ if(OS_IS_MACOSX)
endif()
endif()
if(CMAKE_BUILD_TYPE MATCHES Rel)
if(ENABLE_ARMA_NO_DEBUG)
target_compile_definitions(tracking_libs
PUBLIC -DARMA_NO_BOUND_CHECKING=1
)

View File

@ -154,7 +154,7 @@ target_link_libraries(core_receiver
Armadillo::armadillo
)
if(CMAKE_BUILD_TYPE MATCHES Rel)
if(ENABLE_ARMA_NO_DEBUG)
target_compile_definitions(core_receiver
PRIVATE -DARMA_NO_BOUND_CHECKING=1
)