diff --git a/CMakeLists.txt b/CMakeLists.txt index de2c5de1c..296fa0597 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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.") diff --git a/src/algorithms/PVT/libs/CMakeLists.txt b/src/algorithms/PVT/libs/CMakeLists.txt index 45705ab57..a34880648 100644 --- a/src/algorithms/PVT/libs/CMakeLists.txt +++ b/src/algorithms/PVT/libs/CMakeLists.txt @@ -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 ) diff --git a/src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt b/src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt index ccd6e4e6c..6cc0041d8 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt @@ -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 ) diff --git a/src/algorithms/libs/CMakeLists.txt b/src/algorithms/libs/CMakeLists.txt index ff0695985..7689c7ed0 100644 --- a/src/algorithms/libs/CMakeLists.txt +++ b/src/algorithms/libs/CMakeLists.txt @@ -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 ) diff --git a/src/algorithms/telemetry_decoder/adapters/CMakeLists.txt b/src/algorithms/telemetry_decoder/adapters/CMakeLists.txt index e67d66d27..991538704 100644 --- a/src/algorithms/telemetry_decoder/adapters/CMakeLists.txt +++ b/src/algorithms/telemetry_decoder/adapters/CMakeLists.txt @@ -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) diff --git a/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt b/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt index 01d9e5378..fdba427c0 100644 --- a/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt @@ -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 ) diff --git a/src/algorithms/tracking/libs/CMakeLists.txt b/src/algorithms/tracking/libs/CMakeLists.txt index c22fd8618..1a5d30c1c 100644 --- a/src/algorithms/tracking/libs/CMakeLists.txt +++ b/src/algorithms/tracking/libs/CMakeLists.txt @@ -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 ) diff --git a/src/core/receiver/CMakeLists.txt b/src/core/receiver/CMakeLists.txt index 416339b9d..9c2acfaaf 100644 --- a/src/core/receiver/CMakeLists.txt +++ b/src/core/receiver/CMakeLists.txt @@ -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 )