mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-12 02:10:34 +00:00
Merge branch 'orc' into next
This commit is contained in:
commit
e981b1ea89
@ -1129,15 +1129,15 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||
include(GNUInstallDirs)
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH FALSE)
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(AMD64|amd64)|(^i.86$)")
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)")
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
set(SUPPORTED_CPU_FEATURES_ARCH TRUE)
|
||||
endif()
|
||||
if(${CMAKE_INSTALL_LIBDIR} MATCHES lib64)
|
||||
set(VOLK_GNSSSDR_LIB_SUFFIX 64)
|
||||
@ -1193,15 +1193,15 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT ORC_FOUND)
|
||||
set(ORC_LIBRARIES "")
|
||||
if(NOT ORC_LIBRARIES_STATIC)
|
||||
set(ORC_LIBRARIES_STATIC "")
|
||||
set(ORC_INCLUDE_DIRS "")
|
||||
endif()
|
||||
|
||||
add_library(volk_gnsssdr UNKNOWN IMPORTED)
|
||||
set_property(TARGET volk_gnsssdr PROPERTY IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/lib${VOLK_GNSSSDR_LIB_SUFFIX}/libvolk_gnsssdr${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
set(VOLK_GNSSSDR_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/volk_gnsssdr_module/build/include/;${CMAKE_SOURCE_DIR}/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/include;${ORC_INCLUDE_DIRS}")
|
||||
set(VOLK_GNSSSDR_LIBRARIES volk_gnsssdr ${ORC_LIBRARIES})
|
||||
set(VOLK_GNSSSDR_LIBRARIES volk_gnsssdr ${ORC_LIBRARIES_STATIC})
|
||||
|
||||
if(NOT TARGET Volkgnsssdr::volkgnsssdr)
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/build/include)
|
||||
|
@ -6,6 +6,11 @@
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
if(DEFINED __INCLUDED_GNSSSDR_CMAKE_FIND_ORC)
|
||||
return()
|
||||
endif()
|
||||
set(__INCLUDED_GNSSSDR_CMAKE_FIND_ORC TRUE)
|
||||
|
||||
if(NOT COMMAND feature_summary)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
@ -60,6 +65,8 @@ find_path(ORC_LIBRARY_DIR
|
||||
HINTS ${PC_ORC_LIBDIR}
|
||||
PATHS ${ORC_ROOT_USER_PROVIDED}/lib
|
||||
${ORC_ROOT_USER_PROVIDED}/lib64
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
@ -84,6 +91,54 @@ find_library(ORC_LIB orc-0.4
|
||||
HINTS ${PC_ORC_LIBRARY_DIRS}
|
||||
PATHS ${ORC_ROOT_USER_PROVIDED}/lib
|
||||
${ORC_ROOT_USER_PROVIDED}/lib64
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
find_library(ORC_LIBRARY_STATIC ${CMAKE_STATIC_LIBRARY_PREFIX}orc-0.4${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
HINTS ${PC_ORC_LIBRARY_DIRS}
|
||||
PATHS ${ORC_ROOT}/lib
|
||||
${ORC_ROOT}/lib64
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
${ORC_ROOT_USER_PROVIDED}/lib
|
||||
${ORC_ROOT_USER_PROVIDED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
if(PC_ORC_VERSION)
|
||||
@ -95,6 +150,7 @@ list(APPEND ORC_LIBRARY ${ORC_LIB})
|
||||
set(ORC_INCLUDE_DIRS ${ORC_INCLUDE_DIR})
|
||||
set(ORC_LIBRARIES ${ORC_LIBRARY})
|
||||
set(ORC_LIBRARY_DIRS ${ORC_LIBRARY_DIR})
|
||||
set(ORC_LIBRARIES_STATIC ${ORC_LIBRARY_STATIC})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(ORC "orc files" ORC_LIBRARY ORC_INCLUDE_DIR ORCC_EXECUTABLE)
|
||||
|
@ -128,12 +128,22 @@ endif()
|
||||
|
||||
mark_as_advanced(VOLK_LIBRARIES VOLK_INCLUDE_DIRS VOLK_VERSION)
|
||||
|
||||
if(NOT ORC_FOUND)
|
||||
find_package(ORC QUIET)
|
||||
endif()
|
||||
if(ORC_LIBRARIES_STATIC)
|
||||
set(VOLK_LINK_LIBRARIES ${VOLK_LIBRARIES} ${ORC_LIBRARIES_STATIC})
|
||||
set(VOLK_INCLUDE_DIRS ${VOLK_INCLUDE_DIRS} ${ORC_INCLUDE_DIRS})
|
||||
else()
|
||||
set(VOLK_LINK_LIBRARIES ${VOLK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(VOLK_FOUND AND NOT TARGET Volk::volk)
|
||||
add_library(Volk::volk SHARED IMPORTED)
|
||||
set_target_properties(Volk::volk PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${VOLK_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${VOLK_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${VOLK_LIBRARIES}"
|
||||
INTERFACE_LINK_LIBRARIES "${VOLK_LINK_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
|
@ -88,12 +88,22 @@ else()
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT ORC_FOUND)
|
||||
find_package(ORC QUIET)
|
||||
endif()
|
||||
if(ORC_FOUND)
|
||||
set(VOLK_GNSSSDR_LINK_LIBRARIES ${VOLK_GNSSSDR_LIBRARIES} ${ORC_LIBRARIES})
|
||||
set(VOLK_GNSSSDR_INCLUDE_DIRS ${VOLK_GNSSSDR_INCLUDE_DIRS} ${ORC_INCLUDE_DIRS})
|
||||
else()
|
||||
set(VOLK_GNSSSDR_LINK_LIBRARIES ${VOLK_GNSSSDR_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(VOLKGNSSSDR_FOUND AND NOT TARGET Volkgnsssdr::volkgnsssdr)
|
||||
add_library(Volkgnsssdr::volkgnsssdr SHARED IMPORTED)
|
||||
set_target_properties(Volkgnsssdr::volkgnsssdr PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${VOLK_GNSSSDR_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${VOLK_GNSSSDR_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${VOLK_GNSSSDR_LIBRARIES}"
|
||||
INTERFACE_LINK_LIBRARIES "${VOLK_GNSSSDR_LINK_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
|
@ -59,7 +59,8 @@ SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades <carles.fernandez@cttc
|
||||
everything is managed by the CMake scripts.
|
||||
- The `volk_gnsssdr` library can be built on Microsoft Windows and can execute
|
||||
SIMD instructions on that OS.
|
||||
- Fix building with `-DENABLE_CUDA=ON` for blocks implemented with CUDA.
|
||||
- Fixed building with `-DENABLE_CUDA=ON` for blocks implemented with CUDA.
|
||||
- Fixed linking against the ORC library if it is present in the system.
|
||||
|
||||
### Improvements in Usability:
|
||||
|
||||
|
@ -112,7 +112,7 @@ target_link_libraries(algorithms_libs
|
||||
Gnuradio::blocks
|
||||
PRIVATE
|
||||
core_system_parameters
|
||||
Volk::volk ${ORC_LIBRARIES}
|
||||
Volk::volk
|
||||
Volkgnsssdr::volkgnsssdr
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
|
@ -11,7 +11,7 @@
|
||||
########################################################################
|
||||
# Project setup
|
||||
########################################################################
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
cmake_minimum_required(VERSION 2.8.12...3.19)
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Release")
|
||||
endif()
|
||||
|
@ -56,6 +56,8 @@ find_path(ORC_LIBRARY_DIR
|
||||
HINTS ${PC_ORC_LIBDIR}
|
||||
PATHS ${ORC_ROOT_USER_PROVIDED}/lib
|
||||
${ORC_ROOT_USER_PROVIDED}/lib64
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
@ -80,6 +82,54 @@ find_library(ORC_LIB orc-0.4
|
||||
HINTS ${PC_ORC_LIBRARY_DIRS}
|
||||
PATHS ${ORC_ROOT_USER_PROVIDED}/lib
|
||||
${ORC_ROOT_USER_PROVIDED}/lib64
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
find_library(ORC_LIBRARY_STATIC ${CMAKE_STATIC_LIBRARY_PREFIX}orc-0.4${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
HINTS ${PC_ORC_LIBRARY_DIRS}
|
||||
PATHS ${ORC_ROOT}/lib
|
||||
${ORC_ROOT}/lib64
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
${ORC_ROOT_USER_PROVIDED}/lib
|
||||
${ORC_ROOT_USER_PROVIDED}/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/usr/lib/x86_64-linux-gnu
|
||||
/usr/lib/i386-linux-gnu
|
||||
/usr/lib/arm-linux-gnueabihf
|
||||
/usr/lib/arm-linux-gnueabi
|
||||
/usr/lib/aarch64-linux-gnu
|
||||
/usr/lib/mipsel-linux-gnu
|
||||
/usr/lib/mips-linux-gnu
|
||||
/usr/lib/mips64el-linux-gnuabi64
|
||||
/usr/lib/powerpc-linux-gnu
|
||||
/usr/lib/powerpc64-linux-gnu
|
||||
/usr/lib/powerpc64le-linux-gnu
|
||||
/usr/lib/hppa-linux-gnu
|
||||
/usr/lib/s390x-linux-gnu
|
||||
/usr/local/lib
|
||||
/usr/local/lib64
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
if(PC_ORC_VERSION)
|
||||
@ -91,8 +141,12 @@ list(APPEND ORC_LIBRARY ${ORC_LIB})
|
||||
set(ORC_INCLUDE_DIRS ${ORC_INCLUDE_DIR})
|
||||
set(ORC_LIBRARIES ${ORC_LIBRARY})
|
||||
set(ORC_LIBRARY_DIRS ${ORC_LIBRARY_DIR})
|
||||
set(ORC_LIBRARIES_STATIC ${ORC_LIBRARY_STATIC})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(ORC "orc files" ORC_LIBRARY ORC_INCLUDE_DIR ORCC_EXECUTABLE)
|
||||
|
||||
mark_as_advanced(ORC_INCLUDE_DIR ORC_LIBRARY ORCC_EXECUTABLE)
|
||||
if(ENABLE_STATIC_LIBS)
|
||||
find_package_handle_standard_args(ORC "orc files" ORC_LIBRARY ORC_INCLUDE_DIR ORCC_EXECUTABLE ORC_LIBRARY_STATIC)
|
||||
else()
|
||||
find_package_handle_standard_args(ORC "orc files" ORC_LIBRARY ORC_INCLUDE_DIR ORCC_EXECUTABLE)
|
||||
endif()
|
||||
mark_as_advanced(ORC_INCLUDE_DIR ORC_LIBRARY ORCC_EXECUTABLE ORC_LIBRARY_STATIC)
|
||||
|
@ -576,6 +576,9 @@ if(USE_CPU_FEATURES)
|
||||
)
|
||||
endif()
|
||||
# Configure target properties
|
||||
if(ORC_FOUND)
|
||||
target_link_libraries(volk_gnsssdr PRIVATE ${ORC_LIBRARIES})
|
||||
endif()
|
||||
if(NOT MSVC)
|
||||
target_link_libraries(volk_gnsssdr PUBLIC m)
|
||||
endif()
|
||||
@ -597,12 +600,16 @@ if(ENABLE_STATIC_LIBS)
|
||||
else()
|
||||
add_library(volk_gnsssdr_static STATIC $<TARGET_OBJECTS:volk_gnsssdr_obj>)
|
||||
endif()
|
||||
target_link_libraries(volk_gnsssdr_static PUBLIC ${volk_gnsssdr_libraries})
|
||||
if(USE_CPU_FEATURES)
|
||||
target_link_libraries(volk_gnsssdr_static
|
||||
PRIVATE cpu_features
|
||||
)
|
||||
endif()
|
||||
target_link_libraries(volk_gnsssdr_static PUBLIC ${volk_gnsssdr_libraries} pthread)
|
||||
if(ORC_FOUND)
|
||||
target_link_libraries(volk_gnsssdr_static PUBLIC ${ORC_LIBRARIES_STATIC})
|
||||
endif()
|
||||
target_link_libraries(volk_gnsssdr_static PRIVATE pthread)
|
||||
if(NOT MSVC)
|
||||
target_link_libraries(volk_gnsssdr_static PUBLIC m)
|
||||
endif()
|
||||
@ -630,12 +637,19 @@ if(ENABLE_TESTING)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/.unittest)
|
||||
|
||||
include(VolkAddTest)
|
||||
volk_gen_test(volk_gnsssdr_test_all
|
||||
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/testqa.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/qa_utils.cc
|
||||
TARGET_DEPS volk_gnsssdr
|
||||
)
|
||||
|
||||
if(ENABLE_STATIC_LIBS)
|
||||
volk_gen_test(volk_gnsssdr_test_all
|
||||
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/testqa.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/qa_utils.cc
|
||||
TARGET_DEPS volk_gnsssdr_static
|
||||
)
|
||||
else()
|
||||
volk_gen_test(volk_gnsssdr_test_all
|
||||
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/testqa.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/qa_utils.cc
|
||||
TARGET_DEPS volk_gnsssdr
|
||||
)
|
||||
endif()
|
||||
foreach(kernel ${h_files})
|
||||
get_filename_component(kernel ${kernel} NAME)
|
||||
string(REPLACE ".h" "" kernel ${kernel})
|
||||
|
Loading…
Reference in New Issue
Block a user