From 0c7ec44cdb1775e53e3bc4be1ba7c2652e564430 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 9 Mar 2019 01:39:32 +0100 Subject: [PATCH 1/9] Generate CMake summary report --- CMakeLists.txt | 452 +++++++++++++++++++++++------ cmake/Modules/FindGNURADIO.cmake | 7 + cmake/Modules/FindGOOGLETEST.cmake | 51 ++++ src/tests/CMakeLists.txt | 16 +- 4 files changed, 441 insertions(+), 85 deletions(-) create mode 100644 cmake/Modules/FindGOOGLETEST.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 492169801..6ca0e123e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,50 +43,100 @@ endif() # Determine optional blocks/libraries to be built (default: not built) # Enable them at the command line by doing 'cmake -DENABLE_XXX=ON ..' ######################################################################## +include(FeatureSummary) # Support of optional RF front-ends option(ENABLE_UHD "Enable the use of UHD (driver for all USRP devices)" ON) +add_feature_info(ENABLE_UHD ENABLE_UHD "Enables UHD_Signal_Source for using RF front-ends from the USRP family. Requires gr-uhd.") + option(ENABLE_OSMOSDR "Enable the use of OsmoSDR and other front-ends (RTL-based dongles, HackRF, bladeRF, etc.) as signal source" OFF) -option(ENABLE_FLEXIBAND "Enable the use of the signal source adater for the Teleorbit Flexiband GNURadio driver" OFF) +add_feature_info(ENABLE_OSMOSDR ENABLE_OSMOSDR "Enables Osmosdr_Signal_Source and RtlTcp_Signal_Source for using RF front-ends compatible with the OsmoSDR driver. Requires gr-osmosdr.") + +option(ENABLE_FLEXIBAND "Enable the use of the signal source adater for the Teleorbit Flexiband GNU Radio driver" OFF) +add_feature_info(ENABLE_FLEXIBAND ENABLE_FLEXIBAND "Enables Flexiband_Signal_Source for using Teleorbit's Flexiband RF front-end. Requires gr-teleorbit.") + option(ENABLE_ARRAY "Enable the use of CTTC's antenna array front-end as signal source (experimental)" OFF) +add_feature_info(ENABLE_ARRAY ENABLE_ARRAY "Enables Raw_Array_Signal_Source and Array_Signal_Conditioner for using CTTC's antenna array. Requires gr-dbfcttc.") + option(ENABLE_GN3S "Enable the use of the GN3S dongle as signal source (experimental)" OFF) +add_feature_info(ENABLE_GN3S ENABLE_GN3S "Enables Gn3s_Signal_Source for using the GN3S v2 dongle. Requires gr-gn3s.") + option(ENABLE_PLUTOSDR "Enable the use of ADALM-PLUTO Evaluation Boards (Analog Devices Inc.), requires gr-iio" OFF) +add_feature_info(ENABLE_PLUTOSDR ENABLE_PLUTOSDR "Enables Plutosdr_Signal_Source for using ADALM-PLUTO boards. Requires gr-iio.") + option(ENABLE_FMCOMMS2 "Enable the use of FMCOMMS4-EBZ + ZedBoard hardware, requires gr-iio" OFF) -option(ENABLE_AD9361 "Enable the use of AD9361 directo to FPGA hardware, requires libiio" OFF) +add_feature_info(ENABLE_FMCOMMS2 ENABLE_FMCOMMS2 "Enables Fmcomms2_Signal_Source for FMCOMMS2/3/4 devices. Requires gr-iio.") + +option(ENABLE_AD9361 "Enable the use of AD9361 direct to FPGA hardware, requires libiio" OFF) +add_feature_info(ENABLE_AD9361 ENABLE_AD9361 "Enables Ad9361_Fpga_Signal_Source for devices with the AD9361 chipset. Requires libiio.") + option(ENABLE_RAW_UDP "Enable the use of high-optimized custom UDP packet sample source, requires libpcap" OFF) +add_feature_info(ENABLE_RAW_UDP ENABLE_RAW_UDP "Enables Custom_UDP_Signal_Source for custom UDP packet sample source. Requires libpcap.") # Performance analysis tools option(ENABLE_GPERFTOOLS "Enable linking to Gperftools libraries (tcmalloc and profiler)" OFF) +add_feature_info(ENABLE_GPERFTOOLS ENABLE_GPERFTOOLS "Enables performance analysis. Requires Gperftools.") + option(ENABLE_GPROF "Enable the use of the GNU profiler tool 'gprof'" OFF) +add_feature_info(ENABLE_GPROF ENABLE_GPROF "Enables performance analysis with 'gprof'.") # Code correctness option(ENABLE_CLANG_TIDY "Enable the use of clang-tidy when compiling" OFF) +add_feature_info(ENABLE_CLANG_TIDY ENABLE_CLANG_TIDY "Runs clang-tidy along with the compiler. Requires Clang.") # Acceleration option(ENABLE_PROFILING "Enable execution of volk_gnsssdr_profile at the end of the building" OFF) +add_feature_info(ENABLE_PROFILING ENABLE_PROFILING "Runs volk_gnsssdr_profile at the end of the building.") + option(ENABLE_OPENCL "Enable building of processing blocks implemented with OpenCL (experimental)" OFF) +add_feature_info(ENABLE_OPENCL ENABLE_OPENCL "Enables GPS_L1_CA_PCPS_OpenCl_Acquisition (experimental). Requires OpenCL.") + option(ENABLE_CUDA "Enable building of processing blocks implemented with CUDA (experimental, requires CUDA SDK)" OFF) -option(ENABLE_FPGA "Enable building of processing blocks implemented with FPGA (experimental, requires EZDMA driver)" OFF) +add_feature_info(ENABLE_CUDA ENABLE_CUDA "Enables GPS_L1_CA_DLL_PLL_Tracking_GPU (experimental). Requires CUDA.") + +option(ENABLE_FPGA "Enable building of processing blocks implemented with FPGA" OFF) +add_feature_info(ENABLE_FPGA ENABLE_FPGA "Enables building of processing blocks for FPGA off-loading.") # Building and packaging options option(ENABLE_GENERIC_ARCH "Builds a portable binary" OFF) + option(ENABLE_PACKAGING "Enable software packaging" OFF) +add_feature_info(ENABLE_PACKAGING ENABLE_PACKAGING "Enables software packaging.") + option(ENABLE_OWN_GLOG "Download glog and link it to gflags" OFF) +add_feature_info(ENABLE_OWN_GLOG ENABLE_OWN_GLOG "Forces the downloading and building of Google glog.") + option(ENABLE_OWN_ARMADILLO "Download and build Armadillo locally" OFF) +add_feature_info(ENABLE_OWN_ARMADILLO ENABLE_OWN_ARMADILLO "Forces the downloading and building of Armadillo.") + option(ENABLE_LOG "Enable logging" ON) +add_feature_info(ENABLE_LOG ENABLE_LOG "Enables runtime internal logging with Google glog.") + if(ENABLE_PACKAGING) set(ENABLE_GENERIC_ARCH ON) endif() # Testing option(ENABLE_UNIT_TESTING "Build unit tests" ON) +add_feature_info(ENABLE_UNIT_TESTING ENABLE_UNIT_TESTING "Enables building of Unit Tests.") + option(ENABLE_UNIT_TESTING_MINIMAL "Build a minimal set of unit tests" OFF) +add_feature_info(ENABLE_UNIT_TESTING_MINIMAL ENABLE_UNIT_TESTING_MINIMAL "Enables building a minimal set of Unit Tests.") + option(ENABLE_UNIT_TESTING_EXTRA "Download external files and build extra unit tests" OFF) +add_feature_info(ENABLE_UNIT_TESTING_EXTRA ENABLE_UNIT_TESTING_EXTRA "Enables building of Extra Unit Tests and downloading of external data files.") + option(ENABLE_SYSTEM_TESTING "Build system tests" OFF) +add_feature_info(ENABLE_SYSTEM_TESTING ENABLE_SYSTEM_TESTING "Enables building of System Tests.") + option(ENABLE_SYSTEM_TESTING_EXTRA "Download external tools and build extra system tests" OFF) +add_feature_info(ENABLE_SYSTEM_TESTING_EXTRA ENABLE_SYSTEM_TESTING_EXTRA "Enables building of Extra System Tests and downloading of external tools.") + if(ENABLE_SYSTEM_TESTING_EXTRA) set(ENABLE_SYSTEM_TESTING ON) endif() option(ENABLE_OWN_GPSTK "Force to download, build and link GPSTk for system tests, even if it is already installed" OFF) +add_feature_info(ENABLE_OWN_GPSTK ENABLE_OWN_GPSTK "Forces the downloading and building of GPSTk for system tests.") + option(ENABLE_INSTALL_TESTS "Install QA code system-wide" OFF) if(ENABLE_FPGA) set(ENABLE_INSTALL_TESTS ON) @@ -131,6 +181,7 @@ set(VERSION ${VERSION_INFO_MAJOR_VERSION}.${VERSION_INFO_API_COMPAT}.${VERSION_I # Environment setup ######################################################################## include(ExternalProject) + # Detect 64-bits machine if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(ARCH_64BITS TRUE) @@ -321,7 +372,7 @@ endif() if(NOT CMAKE_MAKE_PROGRAM_PRETTY_NAME) set(CMAKE_MAKE_PROGRAM_PRETTY_NAME "${CMAKE_MAKE_PROGRAM}") endif() - +add_feature_info(ENABLE_INSTALL_TESTS ENABLE_INSTALL_TESTS "Install test binaries when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} install'.") ################################################################################ @@ -501,6 +552,11 @@ else() endif() find_package(Threads REQUIRED) endif() +set_package_properties(Threads PROPERTIES + URL "https://computing.llnl.gov/tutorials/pthreads/" + DESCRIPTION "Implements the POSIX Threads execution model" + PURPOSE "Used to implement parallelism." +) @@ -511,29 +567,34 @@ enable_testing() if(ENABLE_UNIT_TESTING OR ENABLE_SYSTEM_TESTING) if(EXISTS $ENV{GTEST_DIR}) set(GTEST_DIR $ENV{GTEST_DIR}) - endif() - if(GTEST_DIR) message(STATUS "Googletest root folder set at ${GTEST_DIR}") - find_path(LIBGTEST_DEV_DIR NAMES src/gtest-all.cc PATHS ${GTEST_DIR} ${GTEST_DIR}/googletest) - if(LIBGTEST_DEV_DIR) - message(STATUS "Googletest has been found.") - else() - message(FATAL_ERROR " Googletest source code has not been found at ${GTEST_DIR}.") - endif() - find_path(GTEST_INCLUDE_DIRS NAMES gtest/gtest.h PATHS ${GTEST_DIR}/googletest/include) - else() - find_path(LIBGTEST_DEV_DIR NAMES src/gtest-all.cc PATHS /usr/src/googletest/googletest /usr/src/gtest /usr/include/gtest /opt/local/src/gtest-1.7.0) - find_path(GTEST_INCLUDE_DIRS NAMES gtest/gtest.h PATHS /usr/include /opt/local/src/gtest-1.7.0/include) - if(LIBGTEST_DEV_DIR) - message(STATUS "Googletest package has been found.") - else() - message(STATUS " Googletest has not been found.") - message(STATUS " Googletest v${GNSSSDR_GTEST_LOCAL_VERSION} will be downloaded and built automatically ") - message(STATUS " when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'. ") - endif() endif() endif() +find_package(GOOGLETEST) + +if(GTEST_DIR) + if(NOT GOOGLETEST_FOUND) + message(FATAL_ERROR " Googletest source code has not been found at ${GTEST_DIR}.") + endif() +endif() + +set_package_properties(GOOGLETEST PROPERTIES + URL "https://github.com/google/googletest" + DESCRIPTION "Source code of Google's Testing Framework" + TYPE REQUIRED +) + +if(GOOGLETEST_FOUND) + set_package_properties(GOOGLETEST PROPERTIES + PURPOSE "Used for QA code." + ) +else() + set_package_properties(GOOGLETEST PROPERTIES + PURPOSE "Used for QA code. Googletest v${GNSSSDR_GTEST_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + ) +endif() + ################################################################################ @@ -630,13 +691,28 @@ if(CMAKE_VERSION VERSION_LESS 3.5) IMPORTED_LOCATION ${Boost_ATOMIC_LIBRARIES}) endif() endif() - +set_package_properties(Boost PROPERTIES + URL "https://www.boost.org" + DESCRIPTION "Portable C++ source libraries" + PURPOSE "Used widely across the source code." + TYPE REQUIRED +) ################################################################################ # GNU Radio - https://gnuradio.org ################################################################################ set(GR_REQUIRED_COMPONENTS RUNTIME ANALOG BLOCKS FFT FILTER PMT) + +find_package(UHD) +if(ENABLE_UHD) + if(NOT UHD_FOUND) + set(ENABLE_UHD OFF) + else() + set(GR_REQUIRED_COMPONENTS ${GR_REQUIRED_COMPONENTS} UHD) + endif() +endif() + find_package(GNURADIO) if(PC_GNURADIO_RUNTIME_VERSION) if(PC_GNURADIO_RUNTIME_VERSION VERSION_LESS ${GNSSSDR_GNURADIO_MIN_VERSION}) @@ -752,6 +828,26 @@ else() endif() endif() +if(ENABLE_UHD AND UHD_FOUND AND GNURADIO_UHD_FOUND) + if(NOT TARGET Gnuradio::uhd) + add_library(Gnuradio::uhd SHARED IMPORTED) + list(GET GNURADIO_UHD_LIBRARIES 0 FIRST_DIR) + get_filename_component(GNURADIO_UHD_DIR ${FIRST_DIR} ABSOLUTE) + set_target_properties(Gnuradio::uhd PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" + IMPORTED_LOCATION "${GNURADIO_UHD_DIR}" + INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_UHD_INCLUDE_DIRS}" + INTERFACE_LINK_LIBRARIES "${GNURADIO_UHD_LIBRARIES}" + ) + endif() +endif() +set_package_properties(GNURADIO PROPERTIES + URL "https://www.gnuradio.org/" + DESCRIPTION "The free and open software radio ecosystem" + PURPOSE "Implements flowgraph scheduler, provides some processing blocks and classes to create new ones." + TYPE REQUIRED +) + ################################################################################ @@ -761,6 +857,12 @@ find_package(VOLK) if(NOT VOLK_FOUND) message(FATAL_ERROR "*** VOLK is required to build gnss-sdr") endif() +set_package_properties(VOLK PROPERTIES + URL "http://libvolk.org" + DESCRIPTION "Vector-Optimized Library of Kernels" + PURPOSE "Provides an abstraction of optimized math routines targeting several SIMD processors." + TYPE REQUIRED +) @@ -771,7 +873,12 @@ find_package(LOG4CPP) if(NOT LOG4CPP_FOUND) message(FATAL_ERROR "*** Log4cpp is required to build gnss-sdr") endif() - +set_package_properties(LOG4CPP PROPERTIES + URL "http://log4cpp.sourceforge.net/" + DESCRIPTION "Library of C++ classes for flexible logging to files" + PURPOSE "Required by GNU Radio." + TYPE REQUIRED +) ################################################################################ @@ -779,7 +886,7 @@ endif() ################################################################################ find_package(VOLKGNSSSDR) if(NOT VOLKGNSSSDR_FOUND) - message(STATUS " volk_gnsssdr will be built along with gnss-sdr when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'") + message(STATUS " volk_gnsssdr will be built along with gnss-sdr when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'.") ############################### # Find Python required modules ############################### @@ -893,6 +1000,12 @@ if(NOT VOLKGNSSSDR_FOUND) set(ORC_LIBRARIES "") set(ORC_INCLUDE_DIRS "") endif() + set_package_properties(ORC PROPERTIES + URL "https://gstreamer.freedesktop.org/modules/orc.html" + DESCRIPTION "The Optimized Inner Loops Runtime Compiler" + PURPOSE "Used by volk_gnsssdr." + TYPE OPTIONAL + ) add_library(volk_gnsssdr UNKNOWN IMPORTED) set_property(TARGET volk_gnsssdr PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/lib/libvolk_gnsssdr${CMAKE_STATIC_LIBRARY_SUFFIX}) @@ -926,9 +1039,25 @@ if(NOT VOLKGNSSSDR_FOUND) add_custom_command(TARGET volk_gnsssdr_module POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/bin/volk_gnsssdr-config-info ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr-config-info) + + set_package_properties(VOLKGNSSSDR PROPERTIES + PURPOSE "Provides an abstraction of optimized math routines targeting several SIMD processors. It will be built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + ) +else() + set_package_properties(VOLKGNSSSDR PROPERTIES + PURPOSE "Provides an abstraction of optimized math routines targeting several SIMD processors." + ) endif() - - +set_package_properties(VOLKGNSSSDR PROPERTIES + DESCRIPTION "Vector-Optimized Library of Kernels for GNSS-SDR" + TYPE REQUIRED +) +set_package_properties(Git PROPERTIES + URL "https://git-scm.com" + DESCRIPTION "A free and open source distributed version control system" + PURPOSE "Manage version control, get MINOR_VERSION name for version number." + TYPE REQUIRED +) ################################################################################ # gflags - https://github.com/gflags/gflags @@ -938,7 +1067,7 @@ find_package(GFLAGS) if(NOT GFLAGS_FOUND) message(STATUS " gflags library has not been found.") message(STATUS " gflags v${GNSSSDR_GFLAGS_LOCAL_VERSION} will be downloaded and built automatically ") - message(STATUS " when doing 'make'. ") + message(STATUS " when doing 'make'.") if(CMAKE_VERSION VERSION_LESS 3.2) ExternalProject_Add(gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION} @@ -991,8 +1120,19 @@ if(NOT GFLAGS_FOUND) endif() set(LOCAL_GFLAGS true CACHE STRING "GFlags downloaded and built automatically" FORCE) + set_package_properties(GFLAGS PROPERTIES + PURPOSE "Used for commandline flags management. Gflags v${GNSSSDR_GFLAGS_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + ) +else() + set_package_properties(GFLAGS PROPERTIES + PURPOSE "Used for commandline flags management." + ) endif() - +set_package_properties(GFLAGS PROPERTIES + URL "https://github.com/gflags/gflags" + DESCRIPTION "C++ library that implements commandline flags processing" + TYPE REQUIRED +) ################################################################################ @@ -1011,7 +1151,7 @@ if(NOT GLOG_FOUND OR ${LOCAL_GFLAGS}) message(STATUS " or it is likely not linked to gflags.") endif() message(STATUS " glog v${GNSSSDR_GLOG_LOCAL_VERSION} will be downloaded and built automatically ") - message(STATUS " when doing 'make'. ") + message(STATUS " when doing 'make'.") if(NOT ${LOCAL_GFLAGS}) add_library(gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION} UNKNOWN IMPORTED) set_property(TARGET gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION} PROPERTY IMPORTED_LOCATION "${GFlags_LIBS}") @@ -1150,12 +1290,26 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/c endif() set(LOCAL_GLOG true CACHE STRING "Glog downloaded and built automatically" FORCE) + + set_package_properties(GLOG PROPERTIES + PURPOSE "Used for runtime internal logging. Glog v${GNSSSDR_GLOG_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + ) +else() + set_package_properties(GLOG PROPERTIES + PURPOSE "Used for runtime internal logging." + ) endif() if(NOT ENABLE_LOG) message(STATUS "Logging is not enabled") endif() +set_package_properties(GLOG PROPERTIES + URL "https://github.com/google/glog" + DESCRIPTION "C++ implementation of the Google logging module" + TYPE REQUIRED +) + ############################################################################# @@ -1212,13 +1366,16 @@ if(ARMADILLO_FOUND) INTERFACE_INCLUDE_DIRECTORIES "${ARMADILLO_INCLUDE_DIRS}" INTERFACE_LINK_LIBRARIES "${ARMADILLO_LIBRARIES}" ) + set_package_properties(Armadillo PROPERTIES + PURPOSE "Used for matrix computations." + ) endif() endif() if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO) message(STATUS " Armadillo has not been found.") message(STATUS " Armadillo ${GNSSSDR_ARMADILLO_LOCAL_VERSION} will be downloaded and built automatically") - message(STATUS " when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'. ") + message(STATUS " when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'.") set(armadillo_BRANCH ${GNSSSDR_ARMADILLO_LOCAL_VERSION}) set(armadillo_RELEASE ${armadillo_BRANCH}) @@ -1239,6 +1396,12 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO) endif() message(FATAL_ERROR "gfortran is required to build gnss-sdr") endif() + set_package_properties(GFORTRAN PROPERTIES + URL "http://gcc.gnu.org/wiki/GFortran" + DESCRIPTION "GNU Fortran project" + PURPOSE "Required by Armadillo." + TYPE REQUIRED + ) endif() ############################################# @@ -1289,8 +1452,15 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO) INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}/include" INTERFACE_LINK_LIBRARIES "${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}" ) + set_package_properties(Armadillo PROPERTIES + PURPOSE "Used for matrix computations. Armadillo ${GNSSSDR_ARMADILLO_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + ) endif() - +set_package_properties(Armadillo PROPERTIES + URL "http://arma.sourceforge.net/" + DESCRIPTION "C++ library for linear algebra and scientific computing" + TYPE REQUIRED +) ################################################################################ @@ -1328,6 +1498,12 @@ find_library(GNUTLS_OPENSSL_LIBRARY NAMES gnutls-openssl libgnutls-openssl.so.27 /usr/lib/x86_64-linux-gnux32 /usr/lib/sh4-linux-gnu ) +set_package_properties(GnuTLS PROPERTIES + URL "https://www.gnutls.org/" + DESCRIPTION "The GnuTLS Transport Layer Security Library" + PURPOSE "Used GnuTLS library with openssl compatibility for the SUPL protocol implementation." + TYPE OPTIONAL +) if(NOT GNUTLS_OPENSSL_LIBRARY) message(STATUS "Looking for OpenSSL instead...") @@ -1351,6 +1527,12 @@ if(NOT GNUTLS_OPENSSL_LIBRARY) endif() message(FATAL_ERROR "GnuTLS libraries with openssl compatibility are required to build gnss-sdr") endif() + set_package_properties(OpenSSL PROPERTIES + URL "https://www.openssl.org" + DESCRIPTION "Cryptography and SSL/TLS Toolkit" + PURPOSE "Used for the SUPL protocol implementation." + TYPE REQUIRED + ) endif() @@ -1364,8 +1546,14 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS message(STATUS " Matio installed version (${MATIO_VERSION_STRING}) is too old (>= ${GNSSSDR_MATIO_MIN_VERSION} is required).") endif() message(STATUS " Matio v${GNSSSDR_MATIO_LOCAL_VERSION} will be downloaded and built automatically") - message(STATUS " when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'. ") + message(STATUS " when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'.") find_package(ZLIB) + set_package_properties(ZLIB PROPERTIES + URL "https://www.zlib.net/" + DESCRIPTION "A Massively Spiffy Yet Delicately Unobtrusive Compression Library" + PURPOSE "Required to build Matio." + TYPE REQUIRED + ) if(ZLIB_FOUND) get_filename_component(ZLIB_BASE_DIR ${ZLIB_INCLUDE_DIRS} DIRECTORY) if(OS_IS_LINUX) @@ -1403,6 +1591,12 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS endif() endif() find_package(HDF5) + set_package_properties(HDF5 PROPERTIES + URL "https://support.hdfgroup.org/HDF5/" + DESCRIPTION "A versatile data model, a portable file format and a software library" + PURPOSE "Required to build Matio." + TYPE REQUIRED + ) if(HDF5_FOUND) list(GET HDF5_LIBRARIES 0 HDF5_FIRST_DIR) get_filename_component(HDF5_BASE_DIR2 ${HDF5_FIRST_DIR} DIRECTORY) @@ -1424,7 +1618,7 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/matio/matio-${GNSSSDR_MATIO_LOCAL_VERSION} UPDATE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/matio/matio-${GNSSSDR_MATIO_LOCAL_VERSION}/autogen.sh CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/matio/matio-${GNSSSDR_MATIO_LOCAL_VERSION}/configure --with-hdf5=${HDF5_BASE_DIR} --with-zlib=${ZLIB_BASE_DIR} --with-default-file-ver=7.3 --enable-mat73=yes --prefix= - BUILD_COMMAND $(MAKE) + BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} ) else() ExternalProject_Add(matio-${GNSSSDR_MATIO_LOCAL_VERSION} @@ -1467,18 +1661,32 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS else() message(FATAL_ERROR "*** The zlib library is required to build gnss-sdr") endif() + set_package_properties(MATIO PROPERTIES + PURPOSE "Used to store processing block's results in MAT files readable from MATLAB/Octave. Matio v${GNSSSDR_MATIO_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + ) +else() + set_package_properties(MATIO PROPERTIES + PURPOSE "Used to store processing block's results in MAT files readable from MATLAB/Octave." + ) endif() +set_package_properties(MATIO PROPERTIES + URL "https://github.com/tbeu/matio" + DESCRIPTION "MATLAB MAT File I/O Library" + TYPE REQUIRED +) ################################################################################ # PugiXML - https://pugixml.org/ ################################################################################ -find_package(PUGIXML QUIET) +find_package(PUGIXML) if(PUGIXML_FOUND) - message(STATUS "PugiXML has been found.") + set_package_properties(PUGIXML PROPERTIES + PURPOSE "Used to handle Galileo almanac XML files published by the European GNSS Service Centre." + ) else() - message(STATUS " PugiXML v${GNSSSDR_PUGIXML_LOCAL_VERSION} will be downloaded and built automatically when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'.") + message(STATUS " PugiXML v${GNSSSDR_PUGIXML_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'.") set(PUGIXML_COMPILER -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}) set(TOOLCHAIN_ARG "") if(EXISTS $ENV{OECORE_TARGET_SYSROOT}) @@ -1523,14 +1731,23 @@ else() INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/${CMAKE_FIND_LIBRARY_PREFIXES}pugixml${CMAKE_STATIC_LIBRARY_SUFFIX}" ) endif() -endif() + set_package_properties(PUGIXML PROPERTIES + PURPOSE "Used to handle Galileo almanac XML files published by the European GNSS Service Centre. PugiXML v${GNSSSDR_PUGIXML_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + ) +endif() +set_package_properties(PUGIXML PROPERTIES + URL "https://pugixml.org/" + DESCRIPTION "Light-weight, simple and fast XML parser for C++" + TYPE REQUIRED +) ################################################################################ -# Doxygen - http://www.stack.nl/~dimitri/doxygen/index.html (OPTIONAL, used if found) +# Doxygen - http://www.doxygen.nl (OPTIONAL, used if found) ################################################################################ find_package(Doxygen) +find_package(LATEX) if(DOXYGEN_FOUND) message(STATUS "Doxygen found.") message(STATUS " You can build the documentation with '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc'.") @@ -1538,7 +1755,6 @@ if(DOXYGEN_FOUND) set(HAVE_DOT ${DOXYGEN_DOT_FOUND}) file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} top_srcdir) file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} top_builddir) - find_package(LATEX) if(PDFLATEX_COMPILER) set(GENERATE_PDF_DOCUMENTATION "YES") set(GNSSSDR_USE_MATHJAX "NO") @@ -1553,9 +1769,9 @@ if(DOXYGEN_FOUND) add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/docs/doxygen/Doxyfile WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - COMMENT "Generating API documentation with Doxygen." VERBATIM + COMMENT "Generating source code documentation with Doxygen." VERBATIM ) - if(LATEX_COMPILER) + if(PDFLATEX_COMPILER) message(STATUS " '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} pdfmanual' will generate a manual at ${CMAKE_BINARY_DIR}/docs/GNSS-SDR_manual.pdf") add_custom_target(pdfmanual COMMAND ${CMAKE_MAKE_PROGRAM} @@ -1588,12 +1804,25 @@ else() message(STATUS " or simply by doing 'sudo port install doxygen +latex'.") endif() endif() +set_package_properties(Doxygen PROPERTIES + URL "http://www.doxygen.nl" + DESCRIPTION "Generates documentation from annotated C++ sources" + PURPOSE "Used to generate code documentation by doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc'" + TYPE OPTIONAL +) +set_package_properties(LATEX PROPERTIES + URL "https://www.latex-project.org" + DESCRIPTION "High-quality typesetting system" + PURPOSE "Used to generate a PDF manual by doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} pdfmanual'" + TYPE OPTIONAL +) ############################################################################### # OpenCL (OPTIONAL) ############################################################################### +find_package(OPENCL QUIET) if(ENABLE_OPENCL) find_package(OPENCL) if($ENV{DISABLE_OPENCL}) @@ -1617,7 +1846,12 @@ if(ENABLE_OPENCL) else() set(OPENCL_FOUND FALSE) endif() - +set_package_properties(OPENCL PROPERTIES + URL "https://www.khronos.org/opencl/" + DESCRIPTION "Library for parallel programming" + PURPOSE "Used in some processing block implementations." + TYPE OPTIONAL +) ############################################################################### @@ -1632,6 +1866,12 @@ if(ENABLE_CUDA) find_package(CUDA REQUIRED) message(STATUS "NVIDIA CUDA GPU Acceleration will be enabled.") message(STATUS " You can disable it with 'cmake -DENABLE_CUDA=OFF ..'") + set_package_properties(CUDA PROPERTIES + URL "https://developer.nvidia.com/cuda-downloads" + DESCRIPTION "Library for parallel programming in Nvidia GPUs" + PURPOSE "Used in some processing block implementations." + TYPE REQUIRED + ) else() message(STATUS "NVIDIA CUDA GPU Acceleration will be not enabled.") message(STATUS " Enable it with 'cmake -DENABLE_CUDA=ON ..' to add support for GPU-based acceleration using CUDA.") @@ -1642,14 +1882,20 @@ endif() ############################################################################### # CUSTOM UDP PACKET SOURCE (OPTIONAL) ############################################################################### +find_package(PCAP) if(ENABLE_RAW_UDP) message(STATUS "High-optimized custom UDP IP packet source is enabled.") message(STATUS " You can disable it with 'cmake -DENABLE_RAW_UDP=OFF ..'") - find_package(PCAP) if(NOT PCAP_FOUND) message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (with ENABLE_RAW_UDP=ON)") endif() endif() +set_package_properties(PCAP PROPERTIES + URL "https://www.tcpdump.org" + DESCRIPTION "A portable C/C++ library for network traffic capture" + PURPOSE "Used for the custom UDP IP packet source." + TYPE OPTIONAL +) @@ -1673,29 +1919,12 @@ endif() ######################################## # USRP Hardware Driver (UHD) - OPTIONAL ######################################## -if(ENABLE_UHD) - find_package(UHD) - if(NOT UHD_FOUND) - set(ENABLE_UHD OFF) - message(STATUS " The USRP Hardware Driver (UHD) signal source will not be built,") - message(STATUS " so all USRP-based front-ends will not be usable.") - message(STATUS " Please check https://files.ettus.com/manual/") - else() - set(GR_REQUIRED_COMPONENTS UHD) - find_package(Gnuradio) - if(NOT TARGET Gnuradio::uhd) - add_library(Gnuradio::uhd SHARED IMPORTED) - list(GET GNURADIO_UHD_LIBRARIES 0 FIRST_DIR) - get_filename_component(GNURADIO_UHD_DIR ${FIRST_DIR} ABSOLUTE) - set_target_properties(Gnuradio::uhd PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" - IMPORTED_LOCATION "${GNURADIO_UHD_DIR}" - INTERFACE_INCLUDE_DIRECTORIES "${GNURADIO_UHD_INCLUDE_DIRS}" - INTERFACE_LINK_LIBRARIES "${GNURADIO_UHD_LIBRARIES}" - ) - endif() - endif() -endif() +set_package_properties(UHD PROPERTIES + URL "https://www.ettus.com/sdr-software/detail/usrp-hardware-driver" + DESCRIPTION "USRP Hardware Driver" + PURPOSE "Used for communication with front-ends of the USRP family." + TYPE OPTIONAL +) ########################################## @@ -1707,8 +1936,8 @@ if($ENV{RTLSDR_DRIVER}) set(ENABLE_OSMOSDR ON) endif() +find_package(GROSMOSDR) if(ENABLE_OSMOSDR) - find_package(GROSMOSDR) if(GROSMOSDR_FOUND) message(STATUS "The driver for OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based dongles, etc.) will be compiled.") message(STATUS " You can disable it with 'cmake -DENABLE_OSMOSDR=OFF ..'") @@ -1723,6 +1952,12 @@ else() message(STATUS "The (optional) driver for OsmoSDR and related front-ends is not enabled.") message(STATUS " Enable it with 'cmake -DENABLE_OSMOSDR=ON ..' to add support for OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based USB dongles, etc.)") endif() +set_package_properties(GROSMOSDR PROPERTIES + URL "https://osmocom.org/projects/gr-osmosdr/wiki" + DESCRIPTION "osmocom GNU Radio blocks" + PURPOSE "Used for communication with OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based dongles, etc.)." + TYPE OPTIONAL +) ############################################## @@ -1730,10 +1965,13 @@ endif() # IIO blocks for GNU Radio # https://github.com/analogdevicesinc/gr-iio ############################################## -if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2) - find_package(GRIIO) - find_package(LIBIIO) -endif() +find_package(GRIIO) +set_package_properties(GRIIO PROPERTIES + URL "https://github.com/analogdevicesinc/gr-iio" + DESCRIPTION "IIO blocks for GNU Radio" + PURPOSE "Used for communication with PlutoSDR and FMCOMMS devices." + TYPE OPTIONAL +) ################################################################################### @@ -1741,9 +1979,13 @@ endif() # A cross platform library for interfacing with local and remote Linux IIO devices # https://github.com/analogdevicesinc/libiio ################################################################################### -if(ENABLE_AD9361) - find_package(LIBIIO) -endif() +find_package(LIBIIO) +set_package_properties(LIBIIO PROPERTIES + URL "https://github.com/analogdevicesinc/libiio" + DESCRIPTION "A library for interfacing with Linux IIO devices" + PURPOSE "Used for communication with the AD9361 chipset." + TYPE OPTIONAL +) ############################################## @@ -1765,12 +2007,18 @@ else() message(STATUS "The (optional) Teleorbit Flexiband front-end driver adapter is not enabled.") message(STATUS " Enable it with 'cmake -DENABLE_FLEXIBAND=ON ..' to add support for the Teleorbit Flexiband front-end.") endif() +find_package(TELEORBIT) if(ENABLE_FLEXIBAND) - find_package(TELEORBIT) if(NOT TELEORBIT_FOUND) message(FATAL_ERROR "Teleorbit Flexiband GNU Radio driver required to build gnss-sdr with the optional FLEXIBAND adapter") endif() endif() +set_package_properties(TELEORBIT PROPERTIES + DESCRIPTION "The Teleorbit's Flexiband GNU Radio block." + PURPOSE "Used for communication with the Flexiband front-end." + TYPE OPTIONAL +) + ############################################## @@ -1783,14 +2031,21 @@ endif() if(GN3S_DRIVER) set(ENABLE_GN3S ON) endif() +find_package(GRGN3S QUIET) if(ENABLE_GN3S) message(STATUS "The GN3S driver will be compiled.") message(STATUS " You can disable it with 'cmake -DENABLE_GN3S=OFF ..'") - find_package(GRGN3S QUIET) else() message(STATUS "The (optional and experimental) GN3S driver is not enabled.") message(STATUS " Enable it with 'cmake -DENABLE_GN3S=ON ..' to add support for the GN3S dongle.") endif() +set_package_properties(GRGN3S PROPERTIES + URL "https://github.com/gnss-sdr/gr-gn3s" + DESCRIPTION "The GN3S v2 front-end GNU Radio block." + PURPOSE "Used for communication with the GN3S v2 front-end." + TYPE OPTIONAL +) + ####################################################### @@ -1805,22 +2060,27 @@ if(RAW_ARRAY_DRIVER) set(ENABLE_ARRAY ON) endif() +find_package(GRDBFCTTC QUIET) if(ENABLE_ARRAY) message(STATUS "CTTC's Antenna Array front-end driver will be compiled.") message(STATUS " You can disable it with 'cmake -DENABLE_ARRAY=OFF ..'") - find_package(GRDBFCTTC QUIET) else() message(STATUS "The (optional) CTTC's Antenna Array front-end driver is not enabled.") message(STATUS " Enable it with 'cmake -DENABLE_ARRAY=ON ..' to add support for the CTTC experimental array front-end.") endif() - +set_package_properties(GRDBFCTTC PROPERTIES + URL "https://github.com/gnss-sdr/gr-dbfcttcs" + DESCRIPTION "CTTC's array prototype GNU Radio block." + PURPOSE "Used for communication with CTTC's antenna array." + TYPE OPTIONAL +) ################################################################################ # GPerftools - https://github.com/gperftools/gperftools - OPTIONAL) ################################################################################ +find_package(GPERFTOOLS) if(ENABLE_GPERFTOOLS) - find_package(GPERFTOOLS) if(NOT GPERFTOOLS_FOUND) message(STATUS "Although ENABLE_GPERFTOOLS has been set to ON, GPerftools has not been found.") message(STATUS " Binaries will be compiled without 'tcmalloc' and 'profiler' libraries.") @@ -1829,8 +2089,6 @@ if(ENABLE_GPERFTOOLS) message(STATUS "GPerftools libraries found.") message(STATUS " Binaries will be compiled with 'tcmalloc' and 'profiler' libraries.") endif() -endif() -if(ENABLE_GPERFTOOLS) # Set GPerftools related flags if it is available # See https://github.com/gperftools/gperftools/blob/master/README if(GPERFTOOLS_FOUND) @@ -1842,6 +2100,12 @@ if(ENABLE_GPERFTOOLS) endif() endif() endif() +set_package_properties(GPERFTOOLS PROPERTIES + URL "https://github.com/gperftools/gperftools" + DESCRIPTION "Collection of performance analysis tools" + PURPOSE "Used for performance analysis." + TYPE OPTIONAL +) @@ -1942,6 +2206,26 @@ add_custom_target(uninstall ######################################################################## -# Add subdirectories (in order of deps) +# Add subdirectories ######################################################################## add_subdirectory(src) + + + +######################################################################## +# Print summary +######################################################################## +if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) + message(STATUS "") + message(STATUS "***************************************") + message(STATUS "* SUMMARY REPORT *") + message(STATUS "***************************************") + message(STATUS "") + if(CMAKE_VERSION VERSION_LESS 3.4) + feature_summary(WHAT ALL) + feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT ALL) + else() + feature_summary(WHAT REQUIRED_PACKAGES_FOUND REQUIRED_PACKAGES_NOT_FOUND OPTIONAL_PACKAGES_FOUND OPTIONAL_PACKAGES_NOT_FOUND ENABLED_FEATURES DISABLED_FEATURES) + feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT REQUIRED_PACKAGES_FOUND REQUIRED_PACKAGES_NOT_FOUND OPTIONAL_PACKAGES_FOUND OPTIONAL_PACKAGES_NOT_FOUND ENABLED_FEATURES DISABLED_FEATURES) + endif() +endif() diff --git a/cmake/Modules/FindGNURADIO.cmake b/cmake/Modules/FindGNURADIO.cmake index 7f5deb3ab..f56223662 100644 --- a/cmake/Modules/FindGNURADIO.cmake +++ b/cmake/Modules/FindGNURADIO.cmake @@ -43,6 +43,9 @@ macro(LIST_CONTAINS var value) endforeach() endmacro() +# Trick for feature_summary +set(GNURADIO_FOUND TRUE) + function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE) list_contains(REQUIRED_MODULE ${EXTVAR} ${GR_REQUIRED_COMPONENTS}) if(NOT REQUIRED_MODULE) @@ -140,6 +143,7 @@ function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE) # generate an error if the module is missing if(NOT GNURADIO_${EXTVAR}_FOUND) message(STATUS "Required GNU Radio Component: ${EXTVAR} missing!") + set(GNURADIO_FOUND FALSE) # Trick for feature_summary endif() mark_as_advanced(GNURADIO_${EXTVAR}_LIBRARIES GNURADIO_${EXTVAR}_INCLUDE_DIRS) @@ -200,3 +204,6 @@ if(NOT PC_GNURADIO_RUNTIME_VERSION) set(PC_GNURADIO_RUNTIME_VERSION "3.8.0+") endif() endif() + +# Trick for feature_summary +set(GNURADIO_FOUND TRUE) diff --git a/cmake/Modules/FindGOOGLETEST.cmake b/cmake/Modules/FindGOOGLETEST.cmake new file mode 100644 index 000000000..4544f5127 --- /dev/null +++ b/cmake/Modules/FindGOOGLETEST.cmake @@ -0,0 +1,51 @@ +# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# GNSS-SDR is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# GNSS-SDR is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNSS-SDR. If not, see . + + +# - Try to find Googletest source code +# +# The following environment variable is optionally searched for: +# GTEST_DIR: Base directory where Googletest source code is found. +# +# The following are set after configuration is done: +# GOOGLETEST_FOUND +# LIBGTEST_DEV_DIR +# GTEST_INCLUDE_DIRS + + +find_path(LIBGTEST_DEV_DIR + NAMES src/gtest-all.cc + PATHS + ${GTEST_DIR} + ${GTEST_DIR}/googletest + /usr/src/googletest/googletest + /usr/src/gtest + /usr/include/gtest + /opt/local/src/gtest-1.7.0 +) + +find_path(GTEST_INCLUDE_DIRS + NAMES gtest/gtest.h + PATHS + ${GTEST_DIR}/googletest/include + /usr/include + /opt/local/src/gtest-1.7.0/include +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(GOOGLETEST DEFAULT_MSG LIBGTEST_DEV_DIR GTEST_INCLUDE_DIRS) +mark_as_advanced(LIBGTEST_DEV_DIR GTEST_INCLUDE_DIRS) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index d7763d66c..f9f07b097 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -184,6 +184,12 @@ find_package(Gnuplot) if(GNUPLOT_FOUND) add_definitions(-DGNUPLOT_EXECUTABLE="${GNUPLOT_EXECUTABLE}") endif() +set_package_properties(Gnuplot PROPERTIES + URL "http://www.gnuplot.info" + DESCRIPTION "A portable command-line driven graphing utility" + PURPOSE "Used to generate plots in some tests." + TYPE OPTIONAL +) if(ENABLE_UNIT_TESTING_MINIMAL) add_definitions(-DUNIT_TESTING_MINIMAL=1) @@ -194,6 +200,15 @@ endif() # Optional generator ################################################################################ option(ENABLE_GNSS_SIM_INSTALL "Enable the installation of gnss_sim on the fly" ON) +add_feature_info(ENABLE_GNSS_SIM_INSTALL ENABLE_GNSS_SIM_INSTALL "Enables downloading and building of gnss-sim.") + +find_package(GPSTK) +set_package_properties(GPSTK PROPERTIES + URL "http://www.gpstk.org" + DESCRIPTION "Library and suite of applications for satellite navigation" + PURPOSE "Used in some Extra Tests." + TYPE OPTIONAL +) if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA) if(ENABLE_FPGA) set(CROSS_INSTALL_DIR "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}") @@ -239,7 +254,6 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA) ################################################################################ # Local installation of GPSTk http://www.gpstk.org/ ################################################################################ - find_package(GPSTK) if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK) message(STATUS " GPSTk v${GNSSSDR_GPSTK_LOCAL_VERSION} will be automatically downloaded and built when doing 'make'.") if("${TOOLCHAIN_ARG}" STREQUAL "") From c87a9ddc9a7ca5009c942f95e39636b17e7d7d5e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 9 Mar 2019 09:26:32 +0100 Subject: [PATCH 2/9] Remove character so it does not break LaTeX compilation --- src/core/system_parameters/GLONASS_L1_L2_CA.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/system_parameters/GLONASS_L1_L2_CA.h b/src/core/system_parameters/GLONASS_L1_L2_CA.h index b8c796b4f..585ab48d0 100644 --- a/src/core/system_parameters/GLONASS_L1_L2_CA.h +++ b/src/core/system_parameters/GLONASS_L1_L2_CA.h @@ -52,7 +52,7 @@ const double GLONASS_F_M_A = 0.35e9; //!< Gravitationa const double GLONASS_SEMI_MAJOR_AXIS = 6378136; //!< Semi-major axis of Earth [m] const double GLONASS_FLATTENING = 1 / 29825784; //!< Flattening parameter const double GLONASS_GRAVITY = 97803284; //!< Equatorial acceleration of gravity [mGal] -const double GLONASS_GRAVITY_CORRECTION = 0.87; //!< Correction to acceleration of gravity at sea-level due to Atmosphere[мGal] +const double GLONASS_GRAVITY_CORRECTION = 0.87; //!< Correction to acceleration of gravity at sea-level due to Atmosphere[uGal] const double GLONASS_J2 = 1082625.75e-9; //!< Second zonal harmonic of the geopotential const double GLONASS_J4 = -2370.89e-9; //!< Fourth zonal harmonic of the geopotential const double GLONASS_J6 = 6.08e-9; //!< Sixth zonal harmonic of the geopotential @@ -74,7 +74,7 @@ const double GLONASS_MOON_SEMI_MAJOR_AXIS = 3.84385243e5; //!< Semi-major ax const double GLONASS_MOON_ECCENTRICITY = 0.054900489; //!< Eccentricity of lunar orbit const double GLONASS_MOON_INCLINATION = 0.000089803977407e3; //!< Inclination of lunar orbit to ecliptic plane (5 deg 08 min 43.4 sec) [rad] -const double GLONASS_SUN_OMEGA = 0.004908229466869e3; //!< TODO What is this operation in the seconds with T?(281 deg 13 min 15.0 + 6189.03*Т sec) [rad] +const double GLONASS_SUN_OMEGA = 0.004908229466869e3; //!< TODO What is this operation in the seconds with T?(281 deg 13 min 15.0 + 6189.03 x T sec) [rad] const double GLONASS_SUN_Q0 = 0.006256583774423e3; //!< (358 deg 28 min 33.04 sec) [rad] const double GLONASS_SUN_Q1 = 0e3; //!< TODO Why is the value greater than 60?(129596579.10 sec) [rad] const double GLONASS_SUN_GM = 0.1325263e12; //!< Solar gravitational constant [km^3/s^2] From 75a22271559dcc6dab71b93e60d91b67b31a91b0 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 9 Mar 2019 09:27:38 +0100 Subject: [PATCH 3/9] Fix variant in doxygen port --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f8f48bfd2..020b9907e 100644 --- a/README.md +++ b/README.md @@ -542,7 +542,7 @@ In a terminal, type: ~~~~~~ $ sudo port selfupdate $ sudo port upgrade outdated -$ sudo port install doxygen +latex +$ sudo port install doxygen +docs $ sudo port install gnuradio $ sudo port install armadillo $ sudo port install gnutls From 9ec3a1a1d8d6ad67724f2d0c8dbace850b59629d Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 9 Mar 2019 19:26:32 +0100 Subject: [PATCH 4/9] Remove PythonLib package, not needed --- cmake/Modules/SetupPython.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/cmake/Modules/SetupPython.cmake b/cmake/Modules/SetupPython.cmake index f3d59c900..5c3a0a75a 100644 --- a/cmake/Modules/SetupPython.cmake +++ b/cmake/Modules/SetupPython.cmake @@ -82,7 +82,6 @@ if(CMAKE_VERSION VERSION_LESS 3.12) gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND) gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND) endif() - find_package(PythonLibs ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} EXACT) else() find_package(Python3 COMPONENTS Interpreter) if(Python3_FOUND) From af490868519054463f87323b2206f660d46364a1 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 9 Mar 2019 19:45:24 +0100 Subject: [PATCH 5/9] Document Python packages for summary --- CMakeLists.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ca0e123e..0e5dcc6bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -930,6 +930,27 @@ if(NOT VOLKGNSSSDR_FOUND) message(FATAL_ERROR "six - python 2 and 3 compatibility library required to build VOLK_GNSSSDR") endif() + set_package_properties(Python3 PROPERTIES + URL "https://www.python.org/" + DESCRIPTION "An interpreted, high-level, general-purpose programming language" + PURPOSE "Required to build volk_gnsssdr." + TYPE REQUIRED + ) + + set_package_properties(Python2 PROPERTIES + URL "https://www.python.org/" + DESCRIPTION "An interpreted, high-level, general-purpose programming language" + PURPOSE "Required to build volk_gnsssdr." + TYPE REQUIRED + ) + + set_package_properties(PythonInterp PROPERTIES + URL "https://www.python.org/" + DESCRIPTION "An interpreted, high-level, general-purpose programming language" + PURPOSE "RRequired to build volk_gnsssdr." + TYPE REQUIRED + ) + set(READ_ENVIRO "") if(ENABLE_PACKAGING) if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32) From 88507c6af01ee478e8c340dcfa2806ee12bf37ba Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 9 Mar 2019 23:48:32 +0100 Subject: [PATCH 6/9] Remove unused conditional --- CMakeLists.txt | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e5dcc6bd..7ad211f43 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2236,17 +2236,15 @@ add_subdirectory(src) ######################################################################## # Print summary ######################################################################## -if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) - message(STATUS "") - message(STATUS "***************************************") - message(STATUS "* SUMMARY REPORT *") - message(STATUS "***************************************") - message(STATUS "") - if(CMAKE_VERSION VERSION_LESS 3.4) - feature_summary(WHAT ALL) - feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT ALL) - else() - feature_summary(WHAT REQUIRED_PACKAGES_FOUND REQUIRED_PACKAGES_NOT_FOUND OPTIONAL_PACKAGES_FOUND OPTIONAL_PACKAGES_NOT_FOUND ENABLED_FEATURES DISABLED_FEATURES) - feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT REQUIRED_PACKAGES_FOUND REQUIRED_PACKAGES_NOT_FOUND OPTIONAL_PACKAGES_FOUND OPTIONAL_PACKAGES_NOT_FOUND ENABLED_FEATURES DISABLED_FEATURES) - endif() +message(STATUS "") +message(STATUS "***************************************") +message(STATUS "* SUMMARY REPORT *") +message(STATUS "***************************************") +message(STATUS "") +if(CMAKE_VERSION VERSION_LESS 3.4) + feature_summary(WHAT ALL) + feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT ALL) +else() + feature_summary(WHAT REQUIRED_PACKAGES_FOUND REQUIRED_PACKAGES_NOT_FOUND OPTIONAL_PACKAGES_FOUND OPTIONAL_PACKAGES_NOT_FOUND ENABLED_FEATURES DISABLED_FEATURES) + feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT REQUIRED_PACKAGES_FOUND REQUIRED_PACKAGES_NOT_FOUND OPTIONAL_PACKAGES_FOUND OPTIONAL_PACKAGES_NOT_FOUND ENABLED_FEATURES DISABLED_FEATURES) endif() From f66a2fa3d195cbb10786d326591598cd7462c72b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 10 Mar 2019 05:24:08 +0100 Subject: [PATCH 7/9] Update changelog --- docs/changelog | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/changelog b/docs/changelog index b1c6e6397..42942beff 100644 --- a/docs/changelog +++ b/docs/changelog @@ -8,19 +8,22 @@ ### Improvements in Efficiency - Improved preamble detection implementation in the decoding of navigation messages (acceleration by x1.6 on average). -- Applied clang-tidy checks and fixes related to performance. +- Applied clang-tidy checks and fixes related to performance: performance-faster-string-find, performance-inefficient-algorithm, performance-move-const-arg, performance-type-promotion-in-math-fn, performance-unnecessary-copy-initialization, performance-unnecessary-value-param, readability-string-compare. ### Improvements in Interoperability: - Added the BeiDou B1I receiver chain. - Fix bug in GLONASS dual frequency receiver. +- Added a custom UDP/IP output for PVT data streaming. +- Improved Monitor block with UDP/IP output for internal receiver's data streaming. ### Improvements in Maintainability: - Usage of clang-tidy integrated into CMake scripts. New option -DENABLE_CLANG_TIDY=ON executes clang-tidy along with compilation. Requires clang compiler. -- Applied clang-tidy checks and fixes related to readability. +- Applied clang-tidy checks and fixes related to readability: readability-container-size-empty, readability-identifier-naming, readability-inconsistent-declaration-parameter-name, readability-named-parameter, readability-non-const-parameter, readability-string-compare. +- Improved includes selection following suggestions by include-what-you-use (see https://include-what-you-use.org/), allowing faster compiles, fewer recompiles and making refactoring easier. ### Improvements in Portability: @@ -31,13 +34,14 @@ ### Improvements in Reliability -- Applied clang-tidy checks and fixes related to High Integrity C++. +- Applied clang-tidy checks and fixes related to High Integrity C++: performance-move-const-arg, modernize-use-auto, modernize-use-equals-default, modernize-use-equals-delete, modernize-use-noexcept, modernize-use-nullptr, cert-dcl21-cpp, misc-new-delete-overloads, cert-dcl58-cpp, cert-err52-cpp, cert-err60-cpp. ### Improvements in Usability - The receiver now admits FPGA off-loading, allowing for real time operation at high sampling rates and higher number of signals and channels. - Fixed program termination (avoiding hangs and segfaults in some platforms/configurations). +- CMake now generates a summary of enabled/disabled features. This info is also stored in a file called features.log in the building directory. - Improved information provided to the user in case of failure. From 3e3887742b23acf41af0b4c7ec0b6be270fc571e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 10 Mar 2019 05:36:09 +0100 Subject: [PATCH 8/9] Clean file from unused variables, reordering --- CMakeLists.txt | 592 ++++++++++++++++++++++++------------------------- 1 file changed, 293 insertions(+), 299 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ad211f43..704316026 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,33 +16,22 @@ # along with GNSS-SDR. If not, see . # -######################################################################## +################################################################################ # Project setup -######################################################################## +################################################################################ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) - message(WARNING "In-tree build is bad practice. Try 'cd build && cmake ../' ") + message(WARNING "In-tree build is bad practice. Try 'cd build && cmake ..'") endif() cmake_minimum_required(VERSION 2.8.12) project(gnss-sdr CXX C) list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) -file(RELATIVE_PATH RELATIVE_CMAKE_CALL ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) - -if(NOT CMAKE_PREFIX_PATH) - if(DEFINED ENV{PYBOMBS_PREFIX}) - set(CMAKE_PREFIX_PATH $ENV{PYBOMBS_PREFIX}) - endif() - if(DEFINED ENV{SNAP}) - set(CMAKE_PREFIX_PATH $ENV{SNAP}) - endif() -endif() - -######################################################################## +################################################################################ # Determine optional blocks/libraries to be built (default: not built) # Enable them at the command line by doing 'cmake -DENABLE_XXX=ON ..' -######################################################################## +################################################################################ include(FeatureSummary) # Support of optional RF front-ends option(ENABLE_UHD "Enable the use of UHD (driver for all USRP devices)" ON) @@ -51,27 +40,27 @@ add_feature_info(ENABLE_UHD ENABLE_UHD "Enables UHD_Signal_Source for using RF f option(ENABLE_OSMOSDR "Enable the use of OsmoSDR and other front-ends (RTL-based dongles, HackRF, bladeRF, etc.) as signal source" OFF) add_feature_info(ENABLE_OSMOSDR ENABLE_OSMOSDR "Enables Osmosdr_Signal_Source and RtlTcp_Signal_Source for using RF front-ends compatible with the OsmoSDR driver. Requires gr-osmosdr.") -option(ENABLE_FLEXIBAND "Enable the use of the signal source adater for the Teleorbit Flexiband GNU Radio driver" OFF) -add_feature_info(ENABLE_FLEXIBAND ENABLE_FLEXIBAND "Enables Flexiband_Signal_Source for using Teleorbit's Flexiband RF front-end. Requires gr-teleorbit.") - -option(ENABLE_ARRAY "Enable the use of CTTC's antenna array front-end as signal source (experimental)" OFF) -add_feature_info(ENABLE_ARRAY ENABLE_ARRAY "Enables Raw_Array_Signal_Source and Array_Signal_Conditioner for using CTTC's antenna array. Requires gr-dbfcttc.") - -option(ENABLE_GN3S "Enable the use of the GN3S dongle as signal source (experimental)" OFF) -add_feature_info(ENABLE_GN3S ENABLE_GN3S "Enables Gn3s_Signal_Source for using the GN3S v2 dongle. Requires gr-gn3s.") +option(ENABLE_FMCOMMS2 "Enable the use of FMCOMMS4-EBZ + ZedBoard hardware, requires gr-iio" OFF) +add_feature_info(ENABLE_FMCOMMS2 ENABLE_FMCOMMS2 "Enables Fmcomms2_Signal_Source for FMCOMMS2/3/4 devices. Requires gr-iio.") option(ENABLE_PLUTOSDR "Enable the use of ADALM-PLUTO Evaluation Boards (Analog Devices Inc.), requires gr-iio" OFF) add_feature_info(ENABLE_PLUTOSDR ENABLE_PLUTOSDR "Enables Plutosdr_Signal_Source for using ADALM-PLUTO boards. Requires gr-iio.") -option(ENABLE_FMCOMMS2 "Enable the use of FMCOMMS4-EBZ + ZedBoard hardware, requires gr-iio" OFF) -add_feature_info(ENABLE_FMCOMMS2 ENABLE_FMCOMMS2 "Enables Fmcomms2_Signal_Source for FMCOMMS2/3/4 devices. Requires gr-iio.") - option(ENABLE_AD9361 "Enable the use of AD9361 direct to FPGA hardware, requires libiio" OFF) add_feature_info(ENABLE_AD9361 ENABLE_AD9361 "Enables Ad9361_Fpga_Signal_Source for devices with the AD9361 chipset. Requires libiio.") option(ENABLE_RAW_UDP "Enable the use of high-optimized custom UDP packet sample source, requires libpcap" OFF) add_feature_info(ENABLE_RAW_UDP ENABLE_RAW_UDP "Enables Custom_UDP_Signal_Source for custom UDP packet sample source. Requires libpcap.") +option(ENABLE_FLEXIBAND "Enable the use of the signal source adater for the Teleorbit Flexiband GNU Radio driver" OFF) +add_feature_info(ENABLE_FLEXIBAND ENABLE_FLEXIBAND "Enables Flexiband_Signal_Source for using Teleorbit's Flexiband RF front-end. Requires gr-teleorbit.") + +option(ENABLE_GN3S "Enable the use of the GN3S dongle as signal source (experimental)" OFF) +add_feature_info(ENABLE_GN3S ENABLE_GN3S "Enables Gn3s_Signal_Source for using the GN3S v2 dongle. Requires gr-gn3s.") + +option(ENABLE_ARRAY "Enable the use of CTTC's antenna array front-end as signal source (experimental)" OFF) +add_feature_info(ENABLE_ARRAY ENABLE_ARRAY "Enables Raw_Array_Signal_Source and Array_Signal_Conditioner for using CTTC's antenna array. Requires gr-dbfcttc.") + # Performance analysis tools option(ENABLE_GPERFTOOLS "Enable linking to Gperftools libraries (tcmalloc and profiler)" OFF) add_feature_info(ENABLE_GPERFTOOLS ENABLE_GPERFTOOLS "Enables performance analysis. Requires Gperftools.") @@ -144,25 +133,42 @@ endif() -############################### +################################################################################ # GNSS-SDR version information -############################### +################################################################################ set(THIS_IS_A_RELEASE OFF) # only related to version name, no further implications. if(NOT ${THIS_IS_A_RELEASE}) - # Get the current working branch - execute_process( - COMMAND git rev-parse --abbrev-ref HEAD - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - OUTPUT_VARIABLE GIT_BRANCH - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - # Get the latest abbreviated commit hash of the working branch - execute_process( - COMMAND git log -1 --format=%h - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - OUTPUT_VARIABLE GIT_COMMIT_HASH - OUTPUT_STRIP_TRAILING_WHITESPACE + find_package(Git) + set_package_properties(Git PROPERTIES + URL "https://git-scm.com" + DESCRIPTION "A free and open source distributed version control system" + PURPOSE "Manage version control, get MINOR_VERSION name for version number." + TYPE REQUIRED ) + if(Git_FOUND) + # was this info set in the CMake commandline? + if(NOT GIT_BRANCH) + # no: try to find it + execute_process( + COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE GIT_BRANCH + OUTPUT_STRIP_TRAILING_WHITESPACE + OUTPUT_QUIET ERROR_QUIET + ) + endif(NOT GIT_BRANCH) + # was this info set in the CMake commandline? + if(NOT GIT_COMMIT_HASH) + # Get the latest abbreviated commit hash of the working branch + execute_process( + COMMAND ${GIT_EXECUTABLE} log -1 --format=%h + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE GIT_COMMIT_HASH + OUTPUT_STRIP_TRAILING_WHITESPACE + OUTPUT_QUIET ERROR_QUIET + ) + endif(NOT GIT_COMMIT_HASH) + endif() endif() set(VERSION_INFO_MAJOR_VERSION 0) @@ -177,9 +183,9 @@ set(VERSION ${VERSION_INFO_MAJOR_VERSION}.${VERSION_INFO_API_COMPAT}.${VERSION_I -######################################################################## +################################################################################ # Environment setup -######################################################################## +################################################################################ include(ExternalProject) # Detect 64-bits machine @@ -187,8 +193,15 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(ARCH_64BITS TRUE) endif() -set(OS_IS_MACOSX "") -set(OS_IS_LINUX "") +# Set prefix path for PyBOMBS and Snaps, if defined in environment variables +if(NOT CMAKE_PREFIX_PATH) + if(DEFINED ENV{PYBOMBS_PREFIX}) + set(CMAKE_PREFIX_PATH $ENV{PYBOMBS_PREFIX}) + endif() + if(DEFINED ENV{SNAP}) + set(CMAKE_PREFIX_PATH $ENV{SNAP}) + endif() +endif() # Detect Linux Distribution if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") @@ -375,10 +388,10 @@ endif() add_feature_info(ENABLE_INSTALL_TESTS ENABLE_INSTALL_TESTS "Install test binaries when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} install'.") + ################################################################################ # Minimum required versions ################################################################################ -set(GNSSSDR_CMAKE_MIN_VERSION "2.8.12") set(GNSSSDR_GCC_MIN_VERSION "4.7.2") set(GNSSSDR_CLANG_MIN_VERSION "3.4.0") set(GNSSSDR_APPLECLANG_MIN_VERSION "500") @@ -410,16 +423,6 @@ endif() -################################################################################ -# Check CMake version -################################################################################ -if(CMAKE_VERSION VERSION_LESS ${GNSSSDR_CMAKE_MIN_VERSION}) - message(STATUS "Your CMake version is too old and does not support some features required by GNSS-SDR. CMake version must be at least ${GNSSSDR_CMAKE_MIN_VERSION}.") - message(FATAL_ERROR "Fatal error: CMake >= ${GNSSSDR_CMAKE_MIN_VERSION} required.") -endif() - - - ################################################################################ # Check compiler version ################################################################################ @@ -556,6 +559,7 @@ set_package_properties(Threads PROPERTIES URL "https://computing.llnl.gov/tutorials/pthreads/" DESCRIPTION "Implements the POSIX Threads execution model" PURPOSE "Used to implement parallelism." + TYPE REQUIRED ) @@ -572,27 +576,19 @@ if(ENABLE_UNIT_TESTING OR ENABLE_SYSTEM_TESTING) endif() find_package(GOOGLETEST) - -if(GTEST_DIR) - if(NOT GOOGLETEST_FOUND) - message(FATAL_ERROR " Googletest source code has not been found at ${GTEST_DIR}.") - endif() -endif() - set_package_properties(GOOGLETEST PROPERTIES URL "https://github.com/google/googletest" DESCRIPTION "Source code of Google's Testing Framework" + PURPOSE "Used for Unit and System Tests." TYPE REQUIRED ) - -if(GOOGLETEST_FOUND) +if(NOT GOOGLETEST_FOUND) set_package_properties(GOOGLETEST PROPERTIES - PURPOSE "Used for QA code." - ) -else() - set_package_properties(GOOGLETEST PROPERTIES - PURPOSE "Used for QA code. Googletest v${GNSSSDR_GTEST_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + PURPOSE "Googletest v${GNSSSDR_GTEST_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." ) + if(GTEST_DIR) + message(FATAL_ERROR " Googletest source code has not been found at ${GTEST_DIR}.") + endif() endif() @@ -615,6 +611,12 @@ set(Boost_ADDITIONAL_VERSIONS set(Boost_USE_MULTITHREAD ON) set(Boost_USE_STATIC_LIBS OFF) find_package(Boost ${GNSSSDR_BOOST_MIN_VERSION} COMPONENTS atomic chrono date_time filesystem serialization system thread REQUIRED) +set_package_properties(Boost PROPERTIES + URL "https://www.boost.org" + DESCRIPTION "Portable C++ source libraries" + PURPOSE "Used widely across the source code." + TYPE REQUIRED +) if(NOT Boost_FOUND) message(FATAL_ERROR "Fatal error: Boost (version >=${GNSSSDR_BOOST_MIN_VERSION}) required.") endif() @@ -686,17 +688,12 @@ if(CMAKE_VERSION VERSION_LESS 3.5) set_property(TARGET Boost::atomic PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR}) set_property(TARGET Boost::atomic PROPERTY - INTERFACE_LINK_LIBRARIES ${Boost_ATOMIC_LIBRARIES}) + INTERFACE_LINK_LIBRARIES ${Boost_ATOMIC_LIBRARIES}) set_property(TARGET Boost::atomic PROPERTY IMPORTED_LOCATION ${Boost_ATOMIC_LIBRARIES}) endif() endif() -set_package_properties(Boost PROPERTIES - URL "https://www.boost.org" - DESCRIPTION "Portable C++ source libraries" - PURPOSE "Used widely across the source code." - TYPE REQUIRED -) + ################################################################################ @@ -705,6 +702,12 @@ set_package_properties(Boost PROPERTIES set(GR_REQUIRED_COMPONENTS RUNTIME ANALOG BLOCKS FFT FILTER PMT) find_package(UHD) +set_package_properties(UHD PROPERTIES + URL "https://www.ettus.com/sdr-software/detail/usrp-hardware-driver" + DESCRIPTION "USRP Hardware Driver" + PURPOSE "Used for communication with front-ends of the USRP family." + TYPE OPTIONAL +) if(ENABLE_UHD) if(NOT UHD_FOUND) set(ENABLE_UHD OFF) @@ -714,9 +717,15 @@ if(ENABLE_UHD) endif() find_package(GNURADIO) +set_package_properties(GNURADIO PROPERTIES + URL "https://www.gnuradio.org/" + DESCRIPTION "The free and open software radio ecosystem" + PURPOSE "Implements flowgraph scheduler, provides some processing blocks and classes to create new ones." + TYPE REQUIRED +) if(PC_GNURADIO_RUNTIME_VERSION) if(PC_GNURADIO_RUNTIME_VERSION VERSION_LESS ${GNSSSDR_GNURADIO_MIN_VERSION}) - set(GNURADIO_RUNTIME_FOUND) + unset(GNURADIO_RUNTIME_FOUND) message(STATUS "The GNU Radio version installed in your system is too old.") endif() endif() @@ -841,12 +850,6 @@ if(ENABLE_UHD AND UHD_FOUND AND GNURADIO_UHD_FOUND) ) endif() endif() -set_package_properties(GNURADIO PROPERTIES - URL "https://www.gnuradio.org/" - DESCRIPTION "The free and open software radio ecosystem" - PURPOSE "Implements flowgraph scheduler, provides some processing blocks and classes to create new ones." - TYPE REQUIRED -) @@ -854,15 +857,15 @@ set_package_properties(GNURADIO PROPERTIES # VOLK - Vector-Optimized Library of Kernels ################################################################################ find_package(VOLK) -if(NOT VOLK_FOUND) - message(FATAL_ERROR "*** VOLK is required to build gnss-sdr") -endif() set_package_properties(VOLK PROPERTIES URL "http://libvolk.org" DESCRIPTION "Vector-Optimized Library of Kernels" PURPOSE "Provides an abstraction of optimized math routines targeting several SIMD processors." TYPE REQUIRED ) +if(NOT VOLK_FOUND) + message(FATAL_ERROR "*** VOLK is required to build gnss-sdr") +endif() @@ -870,21 +873,27 @@ set_package_properties(VOLK PROPERTIES # Log4cpp - http://log4cpp.sourceforge.net/ ################################################################################ find_package(LOG4CPP) -if(NOT LOG4CPP_FOUND) - message(FATAL_ERROR "*** Log4cpp is required to build gnss-sdr") -endif() set_package_properties(LOG4CPP PROPERTIES URL "http://log4cpp.sourceforge.net/" DESCRIPTION "Library of C++ classes for flexible logging to files" PURPOSE "Required by GNU Radio." TYPE REQUIRED ) +if(NOT LOG4CPP_FOUND) + message(FATAL_ERROR "*** Log4cpp is required to build gnss-sdr") +endif() + ################################################################################ # volk_gnsssdr module - GNSS-SDR's own VOLK library ################################################################################ find_package(VOLKGNSSSDR) +set_package_properties(VOLKGNSSSDR PROPERTIES + DESCRIPTION "Vector-Optimized Library of Kernels for GNSS-SDR." + PURPOSE "Accelerates math routines targeting several SIMD processors." + TYPE REQUIRED +) if(NOT VOLKGNSSSDR_FOUND) message(STATUS " volk_gnsssdr will be built along with gnss-sdr when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'.") ############################### @@ -907,11 +916,11 @@ if(NOT VOLKGNSSSDR_FOUND) message(STATUS "Mako template library not found. See http://www.makotemplates.org/ ") message(STATUS " You can try to install it by typing:") if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") - message(STATUS " sudo yum install ${PYTHON_NAME}-mako") + message(STATUS " sudo yum install ${PYTHON_NAME}-mako") elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE") - message(STATUS " sudo zypper install ${PYTHON_NAME}-Mako") + message(STATUS " sudo zypper install ${PYTHON_NAME}-Mako") else() - message(STATUS " sudo apt-get install ${PYTHON_NAME}-mako") + message(STATUS " sudo apt-get install ${PYTHON_NAME}-mako") endif() message(FATAL_ERROR "Mako templates required to build VOLK_GNSSSDR") endif() @@ -921,11 +930,11 @@ if(NOT VOLKGNSSSDR_FOUND) message(STATUS "python-six not found. See https://pythonhosted.org/six/ ") message(STATUS " You can try to install it by typing:") if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat") - message(STATUS " sudo yum install ${PYTHON_NAME}-six") + message(STATUS " sudo yum install ${PYTHON_NAME}-six") elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE") - message(STATUS " sudo zypper install ${PYTHON_NAME}-six") + message(STATUS " sudo zypper install ${PYTHON_NAME}-six") else() - message(STATUS " sudo apt-get install ${PYTHON_NAME}-six") + message(STATUS " sudo apt-get install ${PYTHON_NAME}-six") endif() message(FATAL_ERROR "six - python 2 and 3 compatibility library required to build VOLK_GNSSSDR") endif() @@ -983,11 +992,13 @@ if(NOT VOLKGNSSSDR_FOUND) -DCMAKE_INCLUDE_PATH=${Boost_INCLUDE_DIR} -DENABLE_ORC=OFF ${STRIP_VOLK_GNSSSDR_PROFILE} - ${USE_THIS_PYTHON}) + ${USE_THIS_PYTHON} + ) if(EXISTS $ENV{OECORE_TARGET_SYSROOT}) set(VOLK_GNSSSDR_CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/Toolchains/oe-sdk_cross.cmake - -DCROSSCOMPILE_MULTILIB=TRUE) + -DCROSSCOMPILE_MULTILIB=TRUE + ) endif() if(CMAKE_VERSION VERSION_LESS 3.2) ExternalProject_Add(volk_gnsssdr_module @@ -1017,16 +1028,16 @@ if(NOT VOLKGNSSSDR_FOUND) ) endif() find_package(ORC) - if(NOT ORC_FOUND) - set(ORC_LIBRARIES "") - set(ORC_INCLUDE_DIRS "") - endif() set_package_properties(ORC PROPERTIES URL "https://gstreamer.freedesktop.org/modules/orc.html" DESCRIPTION "The Optimized Inner Loops Runtime Compiler" PURPOSE "Used by volk_gnsssdr." TYPE OPTIONAL ) + if(NOT ORC_FOUND) + set(ORC_LIBRARIES "") + set(ORC_INCLUDE_DIRS "") + endif() add_library(volk_gnsssdr UNKNOWN IMPORTED) set_property(TARGET volk_gnsssdr PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/lib/libvolk_gnsssdr${CMAKE_STATIC_LIBRARY_SUFFIX}) @@ -1049,42 +1060,39 @@ if(NOT VOLKGNSSSDR_FOUND) if(CMAKE_VERSION VERSION_LESS 3.2) add_custom_command(TARGET volk_gnsssdr_module POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/bin/volk_gnsssdr_profile - ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr_profile) + ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr_profile + ) else() add_custom_command(TARGET volk_gnsssdr_module POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/bin/volk_gnsssdr_profile ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr_profile - BYPRODUCTS ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr_profile) + BYPRODUCTS ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr_profile + ) endif() add_custom_command(TARGET volk_gnsssdr_module POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install/bin/volk_gnsssdr-config-info - ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr-config-info) + ${CMAKE_SOURCE_DIR}/install/volk_gnsssdr-config-info + ) set_package_properties(VOLKGNSSSDR PROPERTIES - PURPOSE "Provides an abstraction of optimized math routines targeting several SIMD processors. It will be built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." - ) -else() - set_package_properties(VOLKGNSSSDR PROPERTIES - PURPOSE "Provides an abstraction of optimized math routines targeting several SIMD processors." + PURPOSE "volk_gnsssdr will be built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." ) endif() -set_package_properties(VOLKGNSSSDR PROPERTIES - DESCRIPTION "Vector-Optimized Library of Kernels for GNSS-SDR" - TYPE REQUIRED -) -set_package_properties(Git PROPERTIES - URL "https://git-scm.com" - DESCRIPTION "A free and open source distributed version control system" - PURPOSE "Manage version control, get MINOR_VERSION name for version number." - TYPE REQUIRED -) + + ################################################################################ # gflags - https://github.com/gflags/gflags ################################################################################ set(LOCAL_GFLAGS false) find_package(GFLAGS) +set_package_properties(GFLAGS PROPERTIES + URL "https://github.com/gflags/gflags" + DESCRIPTION "C++ library that implements commandline flags processing" + PURPOSE "Used for commandline flags management." + TYPE REQUIRED +) if(NOT GFLAGS_FOUND) message(STATUS " gflags library has not been found.") message(STATUS " gflags v${GNSSSDR_GFLAGS_LOCAL_VERSION} will be downloaded and built automatically ") @@ -1142,18 +1150,10 @@ if(NOT GFLAGS_FOUND) set(LOCAL_GFLAGS true CACHE STRING "GFlags downloaded and built automatically" FORCE) set_package_properties(GFLAGS PROPERTIES - PURPOSE "Used for commandline flags management. Gflags v${GNSSSDR_GFLAGS_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." - ) -else() - set_package_properties(GFLAGS PROPERTIES - PURPOSE "Used for commandline flags management." + PURPOSE "Gflags v${GNSSSDR_GFLAGS_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." ) endif() -set_package_properties(GFLAGS PROPERTIES - URL "https://github.com/gflags/gflags" - DESCRIPTION "C++ library that implements commandline flags processing" - TYPE REQUIRED -) + ################################################################################ @@ -1165,7 +1165,12 @@ if(NOT ${ENABLE_OWN_GLOG}) set(GLOG_FOUND ON) endif() endif() -set(glog_RELEASE ${GNSSSDR_GLOG_LOCAL_VERSION}) +set_package_properties(GLOG PROPERTIES + URL "https://github.com/google/glog" + DESCRIPTION "C++ implementation of the Google logging module" + PURPOSE "Used for runtime internal logging." + TYPE REQUIRED +) if(NOT GLOG_FOUND OR ${LOCAL_GFLAGS}) message(STATUS " glog library has not been found") if(NOT GFLAGS_FOUND) @@ -1313,11 +1318,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/c set(LOCAL_GLOG true CACHE STRING "Glog downloaded and built automatically" FORCE) set_package_properties(GLOG PROPERTIES - PURPOSE "Used for runtime internal logging. Glog v${GNSSSDR_GLOG_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." - ) -else() - set_package_properties(GLOG PROPERTIES - PURPOSE "Used for runtime internal logging." + PURPOSE "Glog v${GNSSSDR_GLOG_LOCAL_VERSION} will be downloaded and built when doing 'make'." ) endif() @@ -1325,18 +1326,12 @@ if(NOT ENABLE_LOG) message(STATUS "Logging is not enabled") endif() -set_package_properties(GLOG PROPERTIES - URL "https://github.com/google/glog" - DESCRIPTION "C++ implementation of the Google logging module" - TYPE REQUIRED -) - -############################################################################# +################################################################################ # Check that BLAS (Basic Linear Algebra Subprograms) is found in the system # See http://www.netlib.org/blas/ -############################################################################# +################################################################################ find_library(BLAS blas) if(NOT BLAS) message(" The BLAS library has not been found.") @@ -1351,10 +1346,10 @@ endif() -############################################################################# +################################################################################ # Check that LAPACK (Linear Algebra PACKage) is found in the system # See http://www.netlib.org/lapack/ -############################################################################# +################################################################################ find_library(LAPACK lapack) if(NOT LAPACK) message(" The LAPACK library has not been found.") @@ -1375,6 +1370,12 @@ endif() # Armadillo - http://arma.sourceforge.net/ ################################################################################ find_package(Armadillo) +set_package_properties(Armadillo PROPERTIES + URL "http://arma.sourceforge.net/" + DESCRIPTION "C++ library for linear algebra and scientific computing" + PURPOSE "Used for matrix computations." + TYPE REQUIRED +) if(ARMADILLO_FOUND) if(${ARMADILLO_VERSION_STRING} VERSION_LESS ${GNSSSDR_ARMADILLO_MIN_VERSION}) set(ARMADILLO_FOUND false) @@ -1387,9 +1388,6 @@ if(ARMADILLO_FOUND) INTERFACE_INCLUDE_DIRECTORIES "${ARMADILLO_INCLUDE_DIRS}" INTERFACE_LINK_LIBRARIES "${ARMADILLO_LIBRARIES}" ) - set_package_properties(Armadillo PROPERTIES - PURPOSE "Used for matrix computations." - ) endif() endif() @@ -1405,6 +1403,12 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO) ############################################# if(NOT OS_IS_MACOSX) find_package(GFORTRAN) + set_package_properties(GFORTRAN PROPERTIES + URL "http://gcc.gnu.org/wiki/GFortran" + DESCRIPTION "GNU Fortran project" + PURPOSE "Required by Armadillo." + TYPE REQUIRED + ) if(NOT GFORTRAN) message(STATUS "The gfortran library has not been found.") message(STATUS " You can try to install it by typing:") @@ -1417,12 +1421,6 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO) endif() message(FATAL_ERROR "gfortran is required to build gnss-sdr") endif() - set_package_properties(GFORTRAN PROPERTIES - URL "http://gcc.gnu.org/wiki/GFortran" - DESCRIPTION "GNU Fortran project" - PURPOSE "Required by Armadillo." - TYPE REQUIRED - ) endif() ############################################# @@ -1455,9 +1453,8 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO) ) endif() - # Set up variables + # Create imported target ExternalProject_Get_Property(armadillo-${armadillo_RELEASE} binary_dir) - #set(ARMADILLO_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}/include) if(NOT GFORTRAN) set(GFORTRAN "") endif() @@ -1474,20 +1471,22 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO) INTERFACE_LINK_LIBRARIES "${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}" ) set_package_properties(Armadillo PROPERTIES - PURPOSE "Used for matrix computations. Armadillo ${GNSSSDR_ARMADILLO_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + PURPOSE "Armadillo ${GNSSSDR_ARMADILLO_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." ) endif() -set_package_properties(Armadillo PROPERTIES - URL "http://arma.sourceforge.net/" - DESCRIPTION "C++ library for linear algebra and scientific computing" - TYPE REQUIRED -) + ################################################################################ # GnuTLS - https://www.gnutls.org/ ################################################################################ find_package(GnuTLS) +set_package_properties(GnuTLS PROPERTIES + URL "https://www.gnutls.org/" + DESCRIPTION "Transport Layer Security Library" + PURPOSE "Used for the SUPL protocol implementation." + TYPE REQUIRED +) find_library(GNUTLS_OPENSSL_LIBRARY NAMES gnutls-openssl libgnutls-openssl.so.27 HINTS /usr/lib /usr/lib64 @@ -1519,17 +1518,19 @@ find_library(GNUTLS_OPENSSL_LIBRARY NAMES gnutls-openssl libgnutls-openssl.so.27 /usr/lib/x86_64-linux-gnux32 /usr/lib/sh4-linux-gnu ) -set_package_properties(GnuTLS PROPERTIES - URL "https://www.gnutls.org/" - DESCRIPTION "The GnuTLS Transport Layer Security Library" - PURPOSE "Used GnuTLS library with openssl compatibility for the SUPL protocol implementation." - TYPE OPTIONAL -) - if(NOT GNUTLS_OPENSSL_LIBRARY) message(STATUS "Looking for OpenSSL instead...") find_package(OpenSSL) + set_package_properties(OpenSSL PROPERTIES + URL "https://www.openssl.org" + DESCRIPTION "Cryptography and SSL/TLS Toolkit" + PURPOSE "Used for the SUPL protocol implementation." + TYPE REQUIRED + ) if(OPENSSL_FOUND) + set_package_properties(GnuTLS PROPERTIES + PURPOSE "Not found, but OpenSSL can replace it." + ) set(GNUTLS_INCLUDE_DIR ${OPENSSL_INCLUDE_DIR}) set(GNUTLS_LIBRARIES "") set(GNUTLS_OPENSSL_LIBRARY ${OPENSSL_SSL_LIBRARY}) @@ -1548,20 +1549,20 @@ if(NOT GNUTLS_OPENSSL_LIBRARY) endif() message(FATAL_ERROR "GnuTLS libraries with openssl compatibility are required to build gnss-sdr") endif() - set_package_properties(OpenSSL PROPERTIES - URL "https://www.openssl.org" - DESCRIPTION "Cryptography and SSL/TLS Toolkit" - PURPOSE "Used for the SUPL protocol implementation." - TYPE REQUIRED - ) endif() -######################################################################## +################################################################################ # Matio - https://github.com/tbeu/matio -######################################################################## +################################################################################ find_package(MATIO) +set_package_properties(MATIO PROPERTIES + URL "https://github.com/tbeu/matio" + DESCRIPTION "MATLAB MAT File I/O Library" + PURPOSE "Used to store processing block's results in MAT files readable from MATLAB/Octave." + TYPE REQUIRED +) if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERSION}) if(MATIO_FOUND) message(STATUS " Matio installed version (${MATIO_VERSION_STRING}) is too old (>= ${GNSSSDR_MATIO_MIN_VERSION} is required).") @@ -1660,10 +1661,10 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS add_library(Matio::matio SHARED IMPORTED) add_dependencies(Matio::matio matio-${GNSSSDR_MATIO_LOCAL_VERSION}) set_target_properties(Matio::matio PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" - IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/matio/lib/${CMAKE_FIND_LIBRARY_PREFIXES}matio${CMAKE_SHARED_LIBRARY_SUFFIX}" - INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/matio/include" - INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/matio/lib/${CMAKE_FIND_LIBRARY_PREFIXES}matio${CMAKE_SHARED_LIBRARY_SUFFIX}" + IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" + IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/matio/lib/${CMAKE_FIND_LIBRARY_PREFIXES}matio${CMAKE_SHARED_LIBRARY_SUFFIX}" + INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/matio/include" + INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/matio/lib/${CMAKE_FIND_LIBRARY_PREFIXES}matio${CMAKE_SHARED_LIBRARY_SUFFIX}" ) endif() else() @@ -1683,18 +1684,9 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS message(FATAL_ERROR "*** The zlib library is required to build gnss-sdr") endif() set_package_properties(MATIO PROPERTIES - PURPOSE "Used to store processing block's results in MAT files readable from MATLAB/Octave. Matio v${GNSSSDR_MATIO_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." - ) -else() - set_package_properties(MATIO PROPERTIES - PURPOSE "Used to store processing block's results in MAT files readable from MATLAB/Octave." + PURPOSE "Matio v${GNSSSDR_MATIO_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." ) endif() -set_package_properties(MATIO PROPERTIES - URL "https://github.com/tbeu/matio" - DESCRIPTION "MATLAB MAT File I/O Library" - TYPE REQUIRED -) @@ -1702,11 +1694,13 @@ set_package_properties(MATIO PROPERTIES # PugiXML - https://pugixml.org/ ################################################################################ find_package(PUGIXML) -if(PUGIXML_FOUND) - set_package_properties(PUGIXML PROPERTIES - PURPOSE "Used to handle Galileo almanac XML files published by the European GNSS Service Centre." - ) -else() +set_package_properties(PUGIXML PROPERTIES + URL "https://pugixml.org/" + DESCRIPTION "Light-weight, simple and fast XML parser for C++" + PURPOSE "Used to handle Galileo almanac XML files published by the European GNSS Service Centre." + TYPE REQUIRED +) +if(NOT PUGIXML_FOUND) message(STATUS " PugiXML v${GNSSSDR_PUGIXML_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'.") set(PUGIXML_COMPILER -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}) set(TOOLCHAIN_ARG "") @@ -1754,21 +1748,29 @@ else() endif() set_package_properties(PUGIXML PROPERTIES - PURPOSE "Used to handle Galileo almanac XML files published by the European GNSS Service Centre. PugiXML v${GNSSSDR_PUGIXML_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." + PURPOSE "PugiXML v${GNSSSDR_PUGIXML_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'." ) endif() -set_package_properties(PUGIXML PROPERTIES - URL "https://pugixml.org/" - DESCRIPTION "Light-weight, simple and fast XML parser for C++" - TYPE REQUIRED -) + ################################################################################ # Doxygen - http://www.doxygen.nl (OPTIONAL, used if found) ################################################################################ find_package(Doxygen) +set_package_properties(Doxygen PROPERTIES + URL "http://www.doxygen.nl" + DESCRIPTION "Generates documentation from annotated C++ sources" + PURPOSE "Used to generate code documentation by doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc'" + TYPE OPTIONAL +) find_package(LATEX) +set_package_properties(LATEX PROPERTIES + URL "https://www.latex-project.org" + DESCRIPTION "High-quality typesetting system" + PURPOSE "Used to generate a PDF manual by doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} pdfmanual'" + TYPE OPTIONAL +) if(DOXYGEN_FOUND) message(STATUS "Doxygen found.") message(STATUS " You can build the documentation with '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc'.") @@ -1825,25 +1827,19 @@ else() message(STATUS " or simply by doing 'sudo port install doxygen +latex'.") endif() endif() -set_package_properties(Doxygen PROPERTIES - URL "http://www.doxygen.nl" - DESCRIPTION "Generates documentation from annotated C++ sources" - PURPOSE "Used to generate code documentation by doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc'" - TYPE OPTIONAL -) -set_package_properties(LATEX PROPERTIES - URL "https://www.latex-project.org" - DESCRIPTION "High-quality typesetting system" - PURPOSE "Used to generate a PDF manual by doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} pdfmanual'" - TYPE OPTIONAL -) -############################################################################### +################################################################################ # OpenCL (OPTIONAL) -############################################################################### +################################################################################ find_package(OPENCL QUIET) +set_package_properties(OPENCL PROPERTIES + URL "https://www.khronos.org/opencl/" + DESCRIPTION "Library for parallel programming" + PURPOSE "Used in some processing block implementations." + TYPE OPTIONAL +) if(ENABLE_OPENCL) find_package(OPENCL) if($ENV{DISABLE_OPENCL}) @@ -1867,17 +1863,12 @@ if(ENABLE_OPENCL) else() set(OPENCL_FOUND FALSE) endif() -set_package_properties(OPENCL PROPERTIES - URL "https://www.khronos.org/opencl/" - DESCRIPTION "Library for parallel programming" - PURPOSE "Used in some processing block implementations." - TYPE OPTIONAL -) -############################################################################### + +################################################################################ # CUDA (OPTIONAL) -############################################################################### +################################################################################ if($ENV{CUDA_GPU_ACCEL}) message(STATUS "CUDA_GPU_ACCEL environment variable found.") set(ENABLE_CUDA ON) @@ -1885,14 +1876,14 @@ endif() if(ENABLE_CUDA) find_package(CUDA REQUIRED) - message(STATUS "NVIDIA CUDA GPU Acceleration will be enabled.") - message(STATUS " You can disable it with 'cmake -DENABLE_CUDA=OFF ..'") set_package_properties(CUDA PROPERTIES URL "https://developer.nvidia.com/cuda-downloads" DESCRIPTION "Library for parallel programming in Nvidia GPUs" PURPOSE "Used in some processing block implementations." TYPE REQUIRED ) + message(STATUS "NVIDIA CUDA GPU Acceleration will be enabled.") + message(STATUS " You can disable it with 'cmake -DENABLE_CUDA=OFF ..'") else() message(STATUS "NVIDIA CUDA GPU Acceleration will be not enabled.") message(STATUS " Enable it with 'cmake -DENABLE_CUDA=ON ..' to add support for GPU-based acceleration using CUDA.") @@ -1900,10 +1891,16 @@ endif() -############################################################################### +################################################################################ # CUSTOM UDP PACKET SOURCE (OPTIONAL) -############################################################################### +################################################################################ find_package(PCAP) +set_package_properties(PCAP PROPERTIES + URL "https://www.tcpdump.org" + DESCRIPTION "A portable C/C++ library for network traffic capture" + PURPOSE "Used for the custom UDP IP packet source." + TYPE OPTIONAL +) if(ENABLE_RAW_UDP) message(STATUS "High-optimized custom UDP IP packet source is enabled.") message(STATUS " You can disable it with 'cmake -DENABLE_RAW_UDP=OFF ..'") @@ -1911,18 +1908,12 @@ if(ENABLE_RAW_UDP) message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (with ENABLE_RAW_UDP=ON)") endif() endif() -set_package_properties(PCAP PROPERTIES - URL "https://www.tcpdump.org" - DESCRIPTION "A portable C/C++ library for network traffic capture" - PURPOSE "Used for the custom UDP IP packet source." - TYPE OPTIONAL -) -############################################################################### +################################################################################ # FPGA (OPTIONAL) -############################################################################### +################################################################################ if(ENABLE_FPGA) message(STATUS "FPGA Acceleration will be enabled.") message(STATUS " You can disable it with 'cmake -DENABLE_FPGA=OFF ..'") @@ -1937,17 +1928,6 @@ endif() # Setup of optional drivers ################################################################################ -######################################## -# USRP Hardware Driver (UHD) - OPTIONAL -######################################## -set_package_properties(UHD PROPERTIES - URL "https://www.ettus.com/sdr-software/detail/usrp-hardware-driver" - DESCRIPTION "USRP Hardware Driver" - PURPOSE "Used for communication with front-ends of the USRP family." - TYPE OPTIONAL -) - - ########################################## # gr-osmosdr - OPTIONAL # https://github.com/osmocom/gr-osmosdr @@ -1958,6 +1938,12 @@ if($ENV{RTLSDR_DRIVER}) endif() find_package(GROSMOSDR) +set_package_properties(GROSMOSDR PROPERTIES + URL "https://osmocom.org/projects/gr-osmosdr/wiki" + DESCRIPTION "osmocom GNU Radio blocks" + PURPOSE "Used for communication with OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based dongles, etc.)." + TYPE OPTIONAL +) if(ENABLE_OSMOSDR) if(GROSMOSDR_FOUND) message(STATUS "The driver for OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based dongles, etc.) will be compiled.") @@ -1973,12 +1959,6 @@ else() message(STATUS "The (optional) driver for OsmoSDR and related front-ends is not enabled.") message(STATUS " Enable it with 'cmake -DENABLE_OSMOSDR=ON ..' to add support for OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based USB dongles, etc.)") endif() -set_package_properties(GROSMOSDR PROPERTIES - URL "https://osmocom.org/projects/gr-osmosdr/wiki" - DESCRIPTION "osmocom GNU Radio blocks" - PURPOSE "Used for communication with OsmoSDR and other front-ends (HackRF, bladeRF, Realtek's RTL2832U-based dongles, etc.)." - TYPE OPTIONAL -) ############################################## @@ -1995,11 +1975,11 @@ set_package_properties(GRIIO PROPERTIES ) -################################################################################### +##################################################################### # libiio - OPTIONAL -# A cross platform library for interfacing with local and remote Linux IIO devices +# A library for interfacing with local and remote Linux IIO devices # https://github.com/analogdevicesinc/libiio -################################################################################### +##################################################################### find_package(LIBIIO) set_package_properties(LIBIIO PROPERTIES URL "https://github.com/analogdevicesinc/libiio" @@ -2029,22 +2009,21 @@ else() message(STATUS " Enable it with 'cmake -DENABLE_FLEXIBAND=ON ..' to add support for the Teleorbit Flexiband front-end.") endif() find_package(TELEORBIT) -if(ENABLE_FLEXIBAND) - if(NOT TELEORBIT_FOUND) - message(FATAL_ERROR "Teleorbit Flexiband GNU Radio driver required to build gnss-sdr with the optional FLEXIBAND adapter") - endif() -endif() set_package_properties(TELEORBIT PROPERTIES DESCRIPTION "The Teleorbit's Flexiband GNU Radio block." PURPOSE "Used for communication with the Flexiband front-end." TYPE OPTIONAL ) +if(ENABLE_FLEXIBAND) + if(NOT TELEORBIT_FOUND) + message(FATAL_ERROR "Teleorbit Flexiband GNU Radio driver required to build gnss-sdr with the optional FLEXIBAND adapter") + endif() +endif() - -############################################## +###################### # GN3S - OPTIONAL -############################################## +###################### if($ENV{GN3S_DRIVER}) message(STATUS "GN3S_DRIVER environment variable found.") set(ENABLE_GN3S ON) @@ -2053,6 +2032,12 @@ if(GN3S_DRIVER) set(ENABLE_GN3S ON) endif() find_package(GRGN3S QUIET) +set_package_properties(GRGN3S PROPERTIES + URL "https://github.com/gnss-sdr/gr-gn3s" + DESCRIPTION "The GN3S v2 front-end GNU Radio block." + PURPOSE "Used for communication with the GN3S v2 front-end." + TYPE OPTIONAL +) if(ENABLE_GN3S) message(STATUS "The GN3S driver will be compiled.") message(STATUS " You can disable it with 'cmake -DENABLE_GN3S=OFF ..'") @@ -2060,13 +2045,6 @@ else() message(STATUS "The (optional and experimental) GN3S driver is not enabled.") message(STATUS " Enable it with 'cmake -DENABLE_GN3S=ON ..' to add support for the GN3S dongle.") endif() -set_package_properties(GRGN3S PROPERTIES - URL "https://github.com/gnss-sdr/gr-gn3s" - DESCRIPTION "The GN3S v2 front-end GNU Radio block." - PURPOSE "Used for communication with the GN3S v2 front-end." - TYPE OPTIONAL -) - ####################################################### @@ -2082,6 +2060,12 @@ if(RAW_ARRAY_DRIVER) endif() find_package(GRDBFCTTC QUIET) +set_package_properties(GRDBFCTTC PROPERTIES + URL "https://github.com/gnss-sdr/gr-dbfcttcs" + DESCRIPTION "CTTC's array prototype GNU Radio block." + PURPOSE "Used for communication with CTTC's antenna array." + TYPE OPTIONAL +) if(ENABLE_ARRAY) message(STATUS "CTTC's Antenna Array front-end driver will be compiled.") message(STATUS " You can disable it with 'cmake -DENABLE_ARRAY=OFF ..'") @@ -2089,18 +2073,19 @@ else() message(STATUS "The (optional) CTTC's Antenna Array front-end driver is not enabled.") message(STATUS " Enable it with 'cmake -DENABLE_ARRAY=ON ..' to add support for the CTTC experimental array front-end.") endif() -set_package_properties(GRDBFCTTC PROPERTIES - URL "https://github.com/gnss-sdr/gr-dbfcttcs" - DESCRIPTION "CTTC's array prototype GNU Radio block." - PURPOSE "Used for communication with CTTC's antenna array." - TYPE OPTIONAL -) + ################################################################################ # GPerftools - https://github.com/gperftools/gperftools - OPTIONAL) ################################################################################ find_package(GPERFTOOLS) +set_package_properties(GPERFTOOLS PROPERTIES + URL "https://github.com/gperftools/gperftools" + DESCRIPTION "Collection of performance analysis tools" + PURPOSE "Used for performance analysis." + TYPE OPTIONAL +) if(ENABLE_GPERFTOOLS) if(NOT GPERFTOOLS_FOUND) message(STATUS "Although ENABLE_GPERFTOOLS has been set to ON, GPerftools has not been found.") @@ -2121,18 +2106,12 @@ if(ENABLE_GPERFTOOLS) endif() endif() endif() -set_package_properties(GPERFTOOLS PROPERTIES - URL "https://github.com/gperftools/gperftools" - DESCRIPTION "Collection of performance analysis tools" - PURPOSE "Used for performance analysis." - TYPE OPTIONAL -) -######################################################################## +################################################################################ # GNU gprof (OPTIONAL) - https://sourceware.org/binutils/docs/gprof/ -######################################################################## +################################################################################ if(ENABLE_GPROF) add_compile_options(-pg) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") @@ -2140,9 +2119,10 @@ if(ENABLE_GPROF) endif() -######################################################################## + +################################################################################ # Set compiler flags -######################################################################## +################################################################################ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32) # Add warning flags # For "-Wall" see https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html @@ -2187,9 +2167,9 @@ endif() -######################################################################## +################################################################################ # clang-tidy https://clang.llvm.org/extra/clang-tidy/index.html -######################################################################## +################################################################################ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") if(NOT (CMAKE_VERSION VERSION_LESS "3.6")) find_program( @@ -2213,9 +2193,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") endif() -######################################################################## + +################################################################################ # Create uninstall target -######################################################################## +################################################################################ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake @@ -2226,16 +2207,16 @@ add_custom_target(uninstall -######################################################################## +################################################################################ # Add subdirectories -######################################################################## +################################################################################ add_subdirectory(src) -######################################################################## +################################################################################ # Print summary -######################################################################## +################################################################################ message(STATUS "") message(STATUS "***************************************") message(STATUS "* SUMMARY REPORT *") @@ -2245,6 +2226,19 @@ if(CMAKE_VERSION VERSION_LESS 3.4) feature_summary(WHAT ALL) feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT ALL) else() - feature_summary(WHAT REQUIRED_PACKAGES_FOUND REQUIRED_PACKAGES_NOT_FOUND OPTIONAL_PACKAGES_FOUND OPTIONAL_PACKAGES_NOT_FOUND ENABLED_FEATURES DISABLED_FEATURES) - feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT REQUIRED_PACKAGES_FOUND REQUIRED_PACKAGES_NOT_FOUND OPTIONAL_PACKAGES_FOUND OPTIONAL_PACKAGES_NOT_FOUND ENABLED_FEATURES DISABLED_FEATURES) + feature_summary(WHAT + REQUIRED_PACKAGES_FOUND + REQUIRED_PACKAGES_NOT_FOUND + OPTIONAL_PACKAGES_FOUND + OPTIONAL_PACKAGES_NOT_FOUND + ENABLED_FEATURES DISABLED_FEATURES + ) + feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT + REQUIRED_PACKAGES_FOUND + REQUIRED_PACKAGES_NOT_FOUND + OPTIONAL_PACKAGES_FOUND + OPTIONAL_PACKAGES_NOT_FOUND + ENABLED_FEATURES DISABLED_FEATURES + ) endif() +message(STATUS "GNSS-SDR is ready to be built.") From 540fd194d51c25c02c5d554f60fcb6c70276e876 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 10 Mar 2019 05:46:07 +0100 Subject: [PATCH 9/9] Fix typo --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 704316026..94548314a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -956,7 +956,7 @@ if(NOT VOLKGNSSSDR_FOUND) set_package_properties(PythonInterp PROPERTIES URL "https://www.python.org/" DESCRIPTION "An interpreted, high-level, general-purpose programming language" - PURPOSE "RRequired to build volk_gnsssdr." + PURPOSE "Required to build volk_gnsssdr." TYPE REQUIRED )