mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-04-19 09:13:20 +00:00
Fix building when Armadillo < 5.300
This commit is contained in:
parent
a8f5b505b7
commit
adb088e36c
@ -61,6 +61,7 @@ option(ENABLE_CUDA "Enable building of processing blocks implemented with CUDA (
|
||||
option(ENABLE_GENERIC_ARCH "Builds a portable binary" OFF)
|
||||
option(ENABLE_PACKAGING "Enable software packaging" OFF)
|
||||
option(ENABLE_OWN_GLOG "Download glog and link it to gflags" OFF)
|
||||
option(ENABLE_OWN_ARMADILLO "Download and build Armadillo locally" OFF)
|
||||
option(ENABLE_LOG "Enable logging" ON)
|
||||
if(ENABLE_PACKAGING)
|
||||
set(ENABLE_GENERIC_ARCH ON)
|
||||
@ -875,7 +876,7 @@ if(OS_IS_LINUX)
|
||||
endif(OS_IS_LINUX)
|
||||
|
||||
find_package(Armadillo)
|
||||
if(NOT ARMADILLO_FOUND)
|
||||
if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
|
||||
message(STATUS " Armadillo has not been found.")
|
||||
message(STATUS " Armadillo will be downloaded and built automatically ")
|
||||
message(STATUS " when doing 'make'. ")
|
||||
@ -924,11 +925,12 @@ if(NOT ARMADILLO_FOUND)
|
||||
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}
|
||||
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo
|
||||
)
|
||||
else(NOT ARMADILLO_FOUND)
|
||||
set(ARMADILLO_VERSION_STRING ${armadillo_RELEASE})
|
||||
else(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
|
||||
set(armadillo_RELEASE ${ARMADILLO_VERSION_STRING})
|
||||
add_library(armadillo-${armadillo_RELEASE} UNKNOWN IMPORTED)
|
||||
set_property(TARGET armadillo-${armadillo_RELEASE} PROPERTY IMPORTED_LOCATION "${ARMADILLO_LIBRARIES}")
|
||||
endif(NOT ARMADILLO_FOUND)
|
||||
endif(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
|
||||
|
||||
|
||||
|
||||
|
@ -252,6 +252,9 @@ include_directories(
|
||||
# Unit testing
|
||||
################################################################################
|
||||
if(ENABLE_UNIT_TESTING)
|
||||
if( ${ARMADILLO_VERSION_STRING} STRGREATER "5.300") # make sure interp1 is present
|
||||
add_definitions(-DMODERN_ARMADILLO)
|
||||
endif( ${ARMADILLO_VERSION_STRING} STRGREATER "5.300")
|
||||
add_executable(run_tests ${CMAKE_CURRENT_SOURCE_DIR}/test_main.cc)
|
||||
|
||||
add_custom_command(TARGET run_tests POST_BUILD
|
||||
|
@ -125,9 +125,11 @@ DECLARE_string(log_dir);
|
||||
|
||||
#if EXTRA_TESTS
|
||||
#include "unit-tests/signal-processing-blocks/acquisition/gps_l2_m_pcps_acquisition_test.cc"
|
||||
#include "unit-tests/signal-processing-blocks/tracking/gps_l2_m_dll_pll_tracking_test.cc"
|
||||
#if MODERN_ARMADILLO
|
||||
#include "unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc"
|
||||
#include "unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc"
|
||||
#include "unit-tests/signal-processing-blocks/tracking/gps_l2_m_dll_pll_tracking_test.cc"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// For GPS NAVIGATION (L1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user