mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-18 21:23:02 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
commit
b23487fb43
284
CMakeLists.txt
284
CMakeLists.txt
@ -282,7 +282,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION})
|
||||
if(${DARWIN_VERSION} MATCHES "19")
|
||||
set(MACOS_CATALINA TRUE)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++14")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++17")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
|
||||
message(STATUS "Configuring GNSS-SDR v${VERSION} to be built on macOS Catalina 10.15")
|
||||
endif()
|
||||
@ -373,6 +373,9 @@ endif()
|
||||
if(CMAKE_MAKE_PROGRAM MATCHES "ninja")
|
||||
set(CMAKE_MAKE_PROGRAM_PRETTY_NAME "ninja")
|
||||
endif()
|
||||
if(CMAKE_MAKE_PROGRAM MATCHES "xcodebuild")
|
||||
set(CMAKE_MAKE_PROGRAM_PRETTY_NAME "xcodebuild")
|
||||
endif()
|
||||
if(NOT CMAKE_MAKE_PROGRAM_PRETTY_NAME)
|
||||
set(CMAKE_MAKE_PROGRAM_PRETTY_NAME "${CMAKE_MAKE_PROGRAM}")
|
||||
endif()
|
||||
@ -957,7 +960,7 @@ if(NOT VOLKGNSSSDR_FOUND)
|
||||
endif()
|
||||
if(OS_IS_MACOSX)
|
||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
set(VOLK_GNSSSDR_BUILD_COMMAND "xcodebuild" "-configuration" "Debug" "-target")
|
||||
set(VOLK_GNSSSDR_BUILD_COMMAND "xcodebuild" "-configuration" "${CMAKE_BUILD_TYPE}" "-target")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -1079,7 +1082,11 @@ set_package_properties(GFLAGS PROPERTIES
|
||||
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 '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'.")
|
||||
set(GFLAGS_BUILD_COMMAND ${CMAKE_MAKE_PROGRAM})
|
||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
set(GFLAGS_BUILD_COMMAND "xcodebuild" "-configuration" "${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||
ExternalProject_Add(gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}
|
||||
@ -1088,8 +1095,8 @@ if(NOT GFLAGS_FOUND)
|
||||
GIT_TAG v${GNSSSDR_GFLAGS_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}
|
||||
CMAKE_ARGS -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_nothreads_LIB=OFF -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
BUILD_COMMAND ${CMAKE_MAKE_PROGRAM}
|
||||
CMAKE_ARGS -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_nothreads_LIB=OFF -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
BUILD_COMMAND ${GFLAGS_BUILD_COMMAND}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
@ -1101,8 +1108,8 @@ if(NOT GFLAGS_FOUND)
|
||||
GIT_TAG v${GNSSSDR_GFLAGS_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}
|
||||
CMAKE_ARGS -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_nothreads_LIB=OFF -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
BUILD_COMMAND ${CMAKE_MAKE_PROGRAM}
|
||||
CMAKE_ARGS -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_nothreads_LIB=OFF -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
BUILD_COMMAND ${GFLAGS_BUILD_COMMAND}
|
||||
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
@ -1113,21 +1120,28 @@ if(NOT GFLAGS_FOUND)
|
||||
set(GFlags_INCLUDE_DIRS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/include CACHE PATH "Local Gflags headers"
|
||||
)
|
||||
|
||||
file(GLOB GFlags_SHARED_LIBS
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_SHARED_LIBRARY_SUFFIX}*"
|
||||
if((CMAKE_BUILD_TYPE MATCHES Debug) AND (CMAKE_VERSION VERSION_GREATER "3.0.2"))
|
||||
set(GFLAGS_DEBUG_POSTFIX "_debug")
|
||||
endif()
|
||||
set(GFlags_LIBS
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${GFLAGS_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
)
|
||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
set(GFlags_LIBS
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_BUILD_TYPE}/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${GFLAGS_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT TARGET Gflags::gflags)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/include)
|
||||
file(MAKE_DIRECTORY ${GFlags_INCLUDE_DIRS})
|
||||
add_library(Gflags::gflags STATIC IMPORTED)
|
||||
add_dependencies(Gflags::gflags gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION})
|
||||
set_target_properties(Gflags::gflags PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/include"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/include"
|
||||
INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
IMPORTED_LOCATION "${GFlags_LIBS}"
|
||||
INCLUDE_DIRECTORIES "${GFlags_INCLUDE_DIRS}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GFlags_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GFlags_LIBS}"
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -1142,11 +1156,8 @@ endif()
|
||||
################################################################################
|
||||
# glog - https://github.com/google/glog
|
||||
################################################################################
|
||||
if(NOT ${ENABLE_OWN_GLOG})
|
||||
if(NOT ENABLE_OWN_GLOG AND NOT ${LOCAL_GFLAGS})
|
||||
find_package(GLOG)
|
||||
if(GLOG_INCLUDE_DIRS)
|
||||
set(GLOG_FOUND ON)
|
||||
endif()
|
||||
endif()
|
||||
set_package_properties(GLOG PROPERTIES
|
||||
PURPOSE "Used for runtime internal logging."
|
||||
@ -1158,29 +1169,44 @@ 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 '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'.")
|
||||
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}")
|
||||
string(REPLACE /include "" GFLAGS_PREFIX_PATH ${GFlags_INCLUDE_DIRS})
|
||||
else()
|
||||
set(GFLAGS_PREFIX_PATH ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION})
|
||||
endif()
|
||||
set(TARGET_GFLAGS gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION})
|
||||
if(${LOCAL_GFLAGS})
|
||||
set(GFLAGS_LIBRARIES_TO_LINK ${GFlags_SHARED_LIBS})
|
||||
set(GFLAGS_LIBRARY_DIR_TO_LINK ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib)
|
||||
else()
|
||||
set(GFLAGS_LIBRARIES_TO_LINK ${GFlags_LIBS})
|
||||
set(GFLAGS_LIBRARY_DIR_TO_LINK ${GFlags_LIBRARY_DIRS})
|
||||
set(GLOG_MAKE_PROGRAM ${CMAKE_MAKE_PROGRAM})
|
||||
set(GLOG_BUILD_BYPRODUCTS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/${CMAKE_FIND_LIBRARY_PREFIXES}glog${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
set(GLOG_MAKE_PROGRAM "xcodebuild" "-configuration" "${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
if(OS_IS_MACOSX)
|
||||
set(GFLAGS_LIBRARIES_TO_LINK "${GFLAGS_LIBRARIES_TO_LINK} -lc++")
|
||||
set(GLOG_EXPORT_CXX_LIBRARIES "export CXXFLAGS=\"-stdlib=libc++\"")
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(GLOG_EXPORT_C_COMPILER "export CC=clang")
|
||||
set(GLOG_EXPORT_CXX_COMPILER "export CXX=clang++")
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set(GLOG_DEBUG_POSTFIX "d")
|
||||
endif()
|
||||
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/tmp/configure_with_gflags
|
||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.0)
|
||||
if(${LOCAL_GFLAGS})
|
||||
set(GFLAGS_LIBRARIES_TO_LINK ${GFlags_SHARED_LIBS})
|
||||
set(GFLAGS_LIBRARY_DIR_TO_LINK ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib)
|
||||
else()
|
||||
set(GFLAGS_LIBRARIES_TO_LINK ${GFlags_LIBS})
|
||||
set(GFLAGS_LIBRARY_DIR_TO_LINK ${GFlags_LIBRARY_DIRS})
|
||||
endif()
|
||||
if(OS_IS_MACOSX)
|
||||
set(GFLAGS_LIBRARIES_TO_LINK "${GFLAGS_LIBRARIES_TO_LINK} -lc++")
|
||||
set(GLOG_EXPORT_CXX_LIBRARIES "export CXXFLAGS=\"-stdlib=libc++\"")
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(GLOG_EXPORT_C_COMPILER "export CC=clang")
|
||||
set(GLOG_EXPORT_CXX_COMPILER "export CXX=clang++")
|
||||
endif()
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/tmp/configure_with_gflags
|
||||
"#!/bin/sh
|
||||
export CPPFLAGS=-I${GFlags_INCLUDE_DIRS}
|
||||
export LDFLAGS=-L${GFLAGS_LIBRARY_DIR_TO_LINK}
|
||||
@ -1194,67 +1220,108 @@ automake --add-missing
|
||||
autoreconf -vfi
|
||||
cd ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/configure"
|
||||
)
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/tmp/configure_with_gflags
|
||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
|
||||
GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
||||
)
|
||||
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/tmp/configure_with_gflags
|
||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
|
||||
GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
||||
)
|
||||
|
||||
set(GLOG_CONFIGURE ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/configure_with_gflags)
|
||||
set(GLOG_CONFIGURE ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/configure_with_gflags)
|
||||
|
||||
# Ensure that aclocal and libtool are present
|
||||
if(OS_IS_LINUX)
|
||||
if(EXISTS "/usr/bin/libtoolize")
|
||||
if(EXISTS "/usr/bin/aclocal" OR
|
||||
EXISTS "/usr/bin/aclocal-1.16" OR
|
||||
EXISTS "/usr/bin/aclocal-1.15" OR
|
||||
EXISTS "/usr/bin/aclocal-1.14" OR
|
||||
EXISTS "/usr/bin/aclocal-1.13" OR
|
||||
EXISTS "/usr/bin/aclocal-1.11" OR
|
||||
EXISTS "/usr/bin/aclocal-1.10")
|
||||
# Everything ok, we can move on
|
||||
else()
|
||||
message(" aclocal has not been found.")
|
||||
message(" You can try to install it by typing:")
|
||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(" sudo yum groupinstall 'Development Tools'")
|
||||
elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE")
|
||||
message(" sudo zypper install automake")
|
||||
# Ensure that aclocal and libtool are present
|
||||
if(OS_IS_LINUX)
|
||||
if(EXISTS "/usr/bin/libtoolize")
|
||||
if(EXISTS "/usr/bin/aclocal" OR
|
||||
EXISTS "/usr/bin/aclocal-1.16" OR
|
||||
EXISTS "/usr/bin/aclocal-1.15" OR
|
||||
EXISTS "/usr/bin/aclocal-1.14" OR
|
||||
EXISTS "/usr/bin/aclocal-1.13" OR
|
||||
EXISTS "/usr/bin/aclocal-1.11" OR
|
||||
EXISTS "/usr/bin/aclocal-1.10")
|
||||
# Everything ok, we can move on
|
||||
else()
|
||||
message(" aclocal has not been found.")
|
||||
message(" You can try to install it by typing:")
|
||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(" sudo yum groupinstall 'Development Tools'")
|
||||
elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE")
|
||||
message(" sudo zypper install automake")
|
||||
else()
|
||||
message(" sudo apt-get install automake")
|
||||
endif()
|
||||
message(FATAL_ERROR "aclocal is required to build glog from source")
|
||||
endif()
|
||||
else()
|
||||
message(" sudo apt-get install automake")
|
||||
message(" libtool has not been found.")
|
||||
message(" You can try to install it by typing:")
|
||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(" sudo yum groupinstall 'Development Tools'")
|
||||
elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE")
|
||||
message(" sudo zypper install libtoool")
|
||||
else()
|
||||
message(" sudo apt-get install libtool")
|
||||
endif()
|
||||
message(FATAL_ERROR "libtool is required to build glog from source")
|
||||
endif()
|
||||
message(FATAL_ERROR "aclocal is required to build glog from source")
|
||||
endif()
|
||||
else()
|
||||
message(" libtool has not been found.")
|
||||
message(" You can try to install it by typing:")
|
||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(" sudo yum groupinstall 'Development Tools'")
|
||||
elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE")
|
||||
message(" sudo zypper install libtoool")
|
||||
else()
|
||||
message(" sudo apt-get install libtool")
|
||||
|
||||
if(GLOG_MAKE_PROGRAM MATCHES "ninja")
|
||||
find_program(GLOG_MAKE_EXECUTABLE make
|
||||
PATHS
|
||||
/usr/bin
|
||||
/usr/local/bin
|
||||
)
|
||||
if(NOT GLOG_MAKE_EXECUTABLE)
|
||||
message(FATAL_ERROR "make is required to build Glog from source.")
|
||||
endif()
|
||||
set(GLOG_MAKE_PROGRAM ${GLOG_MAKE_EXECUTABLE})
|
||||
endif()
|
||||
message(FATAL_ERROR "libtool is required to build glog from source")
|
||||
ExternalProject_Add(glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
DEPENDS ${TARGET_GFLAGS}
|
||||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
GIT_REPOSITORY https://github.com/google/glog/
|
||||
GIT_TAG v${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
CONFIGURE_COMMAND ${GLOG_CONFIGURE} --prefix=<INSTALL_DIR>
|
||||
BUILD_COMMAND "${GLOG_MAKE_PROGRAM}"
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
set(GLOG_LIBRARIES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/.libs/${CMAKE_FIND_LIBRARY_PREFIXES}glog${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
set(GLOG_INCLUDE_DIRS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/src
|
||||
)
|
||||
else() # CMake > 3.0 but < 3.2
|
||||
ExternalProject_Add(glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
DEPENDS ${TARGET_GFLAGS}
|
||||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
GIT_REPOSITORY https://github.com/google/glog/
|
||||
GIT_TAG v${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_PREFIX_PATH=${GFLAGS_PREFIX_PATH}
|
||||
BUILD_COMMAND "${GLOG_MAKE_PROGRAM}"
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
set(GLOG_LIBRARIES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/${CMAKE_FIND_LIBRARY_PREFIXES}glog${GLOG_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
set(GLOG_INCLUDE_DIRS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
${GFlags_INCLUDE_DIRS}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(GLOG_MAKE_PROGRAM ${CMAKE_MAKE_PROGRAM})
|
||||
if(GLOG_MAKE_PROGRAM MATCHES "ninja")
|
||||
find_program(GLOG_MAKE_EXECUTABLE make
|
||||
PATHS
|
||||
/usr/bin
|
||||
/usr/local/bin
|
||||
)
|
||||
if(NOT GLOG_MAKE_EXECUTABLE)
|
||||
message(FATAL_ERROR "make is required to build Glog from source.")
|
||||
endif()
|
||||
set(GLOG_MAKE_PROGRAM ${GLOG_MAKE_EXECUTABLE})
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||
else() # CMake > 3.2
|
||||
ExternalProject_Add(glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
DEPENDS ${TARGET_GFLAGS}
|
||||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
@ -1262,51 +1329,42 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/c
|
||||
GIT_TAG v${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
CONFIGURE_COMMAND ${GLOG_CONFIGURE} --prefix=<INSTALL_DIR>
|
||||
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_PREFIX_PATH=${GFLAGS_PREFIX_PATH}
|
||||
BUILD_COMMAND "${GLOG_MAKE_PROGRAM}"
|
||||
BUILD_BYPRODUCTS ${GLOG_BUILD_BYPRODUCTS}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
else()
|
||||
ExternalProject_Add(glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
DEPENDS ${TARGET_GFLAGS}
|
||||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
GIT_REPOSITORY https://github.com/google/glog/
|
||||
GIT_TAG v${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
CONFIGURE_COMMAND ${GLOG_CONFIGURE} --prefix=<INSTALL_DIR>
|
||||
BUILD_COMMAND "${GLOG_MAKE_PROGRAM}"
|
||||
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/.libs/${CMAKE_FIND_LIBRARY_PREFIXES}glog${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
set(GLOG_LIBRARIES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/${CMAKE_FIND_LIBRARY_PREFIXES}glog${GLOG_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
set(GLOG_INCLUDE_DIRS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
${GFlags_INCLUDE_DIRS}
|
||||
)
|
||||
endif()
|
||||
add_dependencies(glog-${GNSSSDR_GLOG_LOCAL_VERSION} Gflags::gflags)
|
||||
|
||||
# Set up variables
|
||||
set(GLOG_INCLUDE_DIRS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/src/
|
||||
${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/src
|
||||
)
|
||||
set(GLOG_LIBRARIES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/.libs/${CMAKE_FIND_LIBRARY_PREFIXES}glog${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
set(GLOG_LIBRARIES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/${CMAKE_BUILD_TYPE}/${CMAKE_FIND_LIBRARY_PREFIXES}glog${GLOG_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
endif()
|
||||
|
||||
# Create Glog::glog target
|
||||
if(NOT TARGET Glog::glog)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/src)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/src)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION})
|
||||
add_library(Glog::glog STATIC IMPORTED)
|
||||
add_dependencies(Glog::glog glog-${GNSSSDR_GLOG_LOCAL_VERSION})
|
||||
set_target_properties(Glog::glog PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/.libs/${CMAKE_FIND_LIBRARY_PREFIXES}glog${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
IMPORTED_LOCATION "${GLOG_LIBRARIES}"
|
||||
INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIRS}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/.libs/${CMAKE_FIND_LIBRARY_PREFIXES}glog${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
INTERFACE_LINK_LIBRARIES "${GLOG_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
### Improvements in Flexibility:
|
||||
|
||||
- New Tracking parameters allow the configuration of the C/N0 and lock detector smoothers, as well as the activation of the FLL in pull-in and steady state stages.
|
||||
- New PVT parameter enable_rx_clock_correction parameter allows to enable or disable the application of the Time solution correction to the computation of Observables.
|
||||
- New PVT parameter enable_rx_clock_correction allows to enable or disable the application of the Time solution correction to the computation of Observables.
|
||||
- Fixed L5 and E5a receiver chains when tracking the data component.
|
||||
|
||||
|
||||
@ -42,6 +42,7 @@
|
||||
- Enable AVX2 kernels of the volk_gnsssdr library when using the Clang compiler.
|
||||
- Fixed building in some ARM-based devices. Now Clang and ARMClang can be used for native building.
|
||||
- Added toolchain files for building gnss-sdr and the volk_gnsssdr library in several ARM processor architectures, including those in Raspberry Pi 3 and 4.
|
||||
- The software can now be built using Xcode (passing -GXcode to CMake) without previous manual installation of volk_gnsssdr.
|
||||
|
||||
|
||||
### Improvements in Reliability:
|
||||
@ -65,6 +66,8 @@
|
||||
- Improved DLL-PLL binary dump MATLAB/Octave plot script. Old versions removed.
|
||||
- Simplified RTKLIB error log.
|
||||
- Added a Python 3 plotting script to show relative performance of generic volk_gnsssdr kernels wrt SIMD fastest versions.
|
||||
- Added reporting of velocity in the terminal.
|
||||
- Added reporting of user clock drift estimation, in ppm, in the Pvt_Monitor and in internal logging (debug mode).
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,6 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "rtklib_pvt_gs.h"
|
||||
#include "MATH_CONSTANTS.h"
|
||||
#include "beidou_dnav_almanac.h"
|
||||
#include "beidou_dnav_ephemeris.h"
|
||||
@ -61,6 +60,7 @@
|
||||
#include "pvt_conf.h"
|
||||
#include "rinex_printer.h"
|
||||
#include "rtcm_printer.h"
|
||||
#include "rtklib_pvt_gs.h"
|
||||
#include "rtklib_solver.h"
|
||||
#include <boost/any.hpp> // for any_cast, any
|
||||
#include <boost/archive/xml_iarchive.hpp> // for xml_iarchive
|
||||
@ -1813,37 +1813,37 @@ void rtklib_pvt_gs::apply_rx_clock_offset(std::map<int, Gnss_Synchro>& observabl
|
||||
switch (mapStringValues_[observables_iter->second.Signal])
|
||||
{
|
||||
case evGPS_1C:
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ1;
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ1 * PI_2;
|
||||
break;
|
||||
case evGPS_L5:
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ5;
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ5 * PI_2;
|
||||
break;
|
||||
case evSBAS_1C:
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ1;
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ1 * PI_2;
|
||||
break;
|
||||
case evGAL_1B:
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ1;
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ1 * PI_2;
|
||||
break;
|
||||
case evGAL_5X:
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ5;
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ5 * PI_2;
|
||||
break;
|
||||
case evGPS_2S:
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ2;
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ2 * PI_2;
|
||||
break;
|
||||
case evBDS_B3:
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ3_BDS;
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ3_BDS * PI_2;
|
||||
break;
|
||||
case evGLO_1G:
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ1_GLO;
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ1_GLO * PI_2;
|
||||
break;
|
||||
case evGLO_2G:
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ2_GLO;
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ2_GLO * PI_2;
|
||||
break;
|
||||
case evBDS_B1:
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ1_BDS;
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ1_BDS * PI_2;
|
||||
break;
|
||||
case evBDS_B2:
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ2_BDS;
|
||||
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ2_BDS * PI_2;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -426,7 +426,9 @@ foreach(machine_name ${available_machines})
|
||||
--mode "machine_flags" --machine "${machine_name}" --compiler "${COMPILER_NAME}"
|
||||
OUTPUT_VARIABLE ${machine_name}_flags OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
message(STATUS "BUILD INFO ::: ${machine_name} ::: ${COMPILER_NAME} ::: ${CMAKE_C_FLAGS_${CBTU}} ${CMAKE_C_FLAGS} ${${machine_name}_flags}")
|
||||
if(NOT (CMAKE_GENERATOR STREQUAL Xcode))
|
||||
message(STATUS "BUILD INFO ::: ${machine_name} ::: ${COMPILER_NAME} ::: ${CMAKE_C_FLAGS_${CBTU}} ${CMAKE_C_FLAGS} ${${machine_name}_flags}")
|
||||
endif()
|
||||
set(COMPILER_INFO "${COMPILER_INFO}${machine_name}:::${COMPILER_NAME}:::${CMAKE_C_FLAGS_${CBTU}} ${CMAKE_C_FLAGS} ${${machine_name}_flags}\n")
|
||||
if(${machine_name}_flags AND NOT MSVC)
|
||||
set_source_files_properties(${machine_source} PROPERTIES COMPILE_FLAGS "${${machine_name}_flags}")
|
||||
@ -573,18 +575,24 @@ if(MSVC)
|
||||
endif()
|
||||
|
||||
#Create a volk_gnsssdr object library
|
||||
add_library(volk_gnsssdr_obj OBJECT ${volk_gnsssdr_sources})
|
||||
target_include_directories(volk_gnsssdr_obj
|
||||
PUBLIC $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
|
||||
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
||||
PUBLIC $<INSTALL_INTERFACE:include>
|
||||
PRIVATE ${PROJECT_SOURCE_DIR}/kernels
|
||||
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
if(NOT (CMAKE_GENERATOR STREQUAL Xcode))
|
||||
add_library(volk_gnsssdr_obj OBJECT ${volk_gnsssdr_sources})
|
||||
target_include_directories(volk_gnsssdr_obj
|
||||
PUBLIC $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
|
||||
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
||||
PUBLIC $<INSTALL_INTERFACE:include>
|
||||
PRIVATE ${PROJECT_SOURCE_DIR}/kernels
|
||||
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
#Add dynamic library
|
||||
add_library(volk_gnsssdr SHARED $<TARGET_OBJECTS:volk_gnsssdr_obj>)
|
||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
add_library(volk_gnsssdr SHARED ${volk_gnsssdr_sources})
|
||||
else()
|
||||
add_library(volk_gnsssdr SHARED $<TARGET_OBJECTS:volk_gnsssdr_obj>)
|
||||
endif()
|
||||
target_link_libraries(volk_gnsssdr ${volk_gnsssdr_libraries})
|
||||
target_include_directories(volk_gnsssdr
|
||||
PUBLIC $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
|
||||
@ -597,7 +605,9 @@ target_include_directories(volk_gnsssdr
|
||||
|
||||
#Configure target properties
|
||||
if(NOT MSVC)
|
||||
set_target_properties(volk_gnsssdr_obj PROPERTIES COMPILE_FLAGS "-fPIC")
|
||||
if(NOT (CMAKE_GENERATOR STREQUAL Xcode))
|
||||
set_target_properties(volk_gnsssdr_obj PROPERTIES COMPILE_FLAGS "-fPIC")
|
||||
endif()
|
||||
target_link_libraries(volk_gnsssdr m)
|
||||
endif()
|
||||
set_target_properties(volk_gnsssdr PROPERTIES SOVERSION ${LIBVER})
|
||||
@ -613,7 +623,11 @@ install(TARGETS volk_gnsssdr
|
||||
|
||||
#Configure static library
|
||||
if(ENABLE_STATIC_LIBS)
|
||||
add_library(volk_gnsssdr_static STATIC $<TARGET_OBJECTS:volk_gnsssdr_obj>)
|
||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
add_library(volk_gnsssdr_static STATIC ${volk_gnsssdr_sources})
|
||||
else()
|
||||
add_library(volk_gnsssdr_static STATIC $<TARGET_OBJECTS:volk_gnsssdr_obj>)
|
||||
endif()
|
||||
target_link_libraries(volk_gnsssdr_static ${volk_gnsssdr_libraries} pthread)
|
||||
if(NOT MSVC)
|
||||
target_link_libraries(volk_gnsssdr_static m)
|
||||
|
@ -41,11 +41,10 @@ if(NOT GOOGLETEST_FOUND)
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set(DEBUG_POSTFIX "d")
|
||||
endif()
|
||||
if(OS_IS_MACOSX)
|
||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
set(DEBUG_PREFIX "Debug/")
|
||||
set(DEBUG_POSTFIX "d")
|
||||
endif()
|
||||
set(GTEST_BUILD_COMMAND "${CMAKE_MAKE_PROGRAM}")
|
||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
set(XCODE_PREFIX "${CMAKE_BUILD_TYPE}/")
|
||||
set(GTEST_BUILD_COMMAND "xcodebuild" "-configuration" "${CMAKE_BUILD_TYPE}" "-target" "gtest_main")
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||
@ -55,6 +54,7 @@ if(NOT GOOGLETEST_FOUND)
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
CMAKE_ARGS ${GTEST_COMPILER} -DINSTALL_GTEST=OFF -DBUILD_GMOCK=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -Dgtest_hide_internal_symbols=ON ${TOOLCHAIN_ARG}
|
||||
BUILD_COMMAND ${GTEST_BUILD_COMMAND}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
@ -66,6 +66,7 @@ if(NOT GOOGLETEST_FOUND)
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
CMAKE_ARGS ${GTEST_COMPILER} -DINSTALL_GTEST=OFF -DBUILD_GMOCK=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -Dgtest_hide_internal_symbols=ON ${TOOLCHAIN_ARG}
|
||||
BUILD_COMMAND ${GTEST_BUILD_COMMAND}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
@ -81,9 +82,9 @@ if(NOT GOOGLETEST_FOUND)
|
||||
add_dependencies(GTest::GTest gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
||||
set_target_properties(GTest::GTest PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${binary_dir}/lib/${DEBUG_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${DEBUG_POSTFIX}${CMAKE_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
IMPORTED_LOCATION "${binary_dir}/lib/${XCODE_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${DEBUG_POSTFIX}${CMAKE_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest/include"
|
||||
INTERFACE_LINK_LIBRARIES "${binary_dir}/lib/${DEBUG_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${DEBUG_POSTFIX}${CMAKE_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
INTERFACE_LINK_LIBRARIES "${binary_dir}/lib/${XCODE_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${DEBUG_POSTFIX}${CMAKE_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
)
|
||||
set_target_properties(GTest::GTest PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES Threads::Threads
|
||||
@ -94,9 +95,9 @@ if(NOT GOOGLETEST_FOUND)
|
||||
add_dependencies(GTest::Main gtest-${GNSSSDR_GTEST_LOCAL_VERSION})
|
||||
set_target_properties(GTest::Main PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${binary_dir}/lib/${DEBUG_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
IMPORTED_LOCATION "${binary_dir}/lib/${XCODE_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gtest/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/googletest/include"
|
||||
INTERFACE_LINK_LIBRARIES "${binary_dir}/lib/${DEBUG_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
INTERFACE_LINK_LIBRARIES "${binary_dir}/lib/${XCODE_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
@ -118,8 +119,8 @@ else()
|
||||
set_target_properties(GTest::GTest PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GTEST_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/${DEBUG_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/${DEBUG_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/${XCODE_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/${XCODE_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
)
|
||||
set_target_properties(GTest::GTest PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES Threads::Threads
|
||||
@ -131,8 +132,8 @@ else()
|
||||
set_target_properties(GTest::Main PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GTEST_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/${DEBUG_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/${DEBUG_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/${XCODE_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/${XCODE_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
@ -212,12 +213,17 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||
add_definitions(-DDEFAULT_RINEX_NAV="${CMAKE_INSTALL_PREFIX}/share/gnss-sim/brdc3540.14n")
|
||||
add_definitions(-DDEFAULT_POSITION_FILE="${CMAKE_INSTALL_PREFIX}/share/gnss-sim/circle.csv")
|
||||
else()
|
||||
set(GNSS_SIM_BUILD_COMMAND "${CMAKE_MAKE_PROGRAM}")
|
||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
set(GNSS_SIM_BUILD_COMMAND "xcodebuild" "-configuration" "${CMAKE_BUILD_TYPE}" "-target" "gnss_sim")
|
||||
endif()
|
||||
ExternalProject_Add(gnss-sim
|
||||
GIT_REPOSITORY https://bitbucket.org/jarribas/gnss-simulator
|
||||
GIT_TAG ${GNSSSDR_GNSS_SIM_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gnss-sim
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gnss-sim
|
||||
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} ${CROSS_INSTALL_DIR}
|
||||
BUILD_COMMAND ${GNSS_SIM_BUILD_COMMAND}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
@ -232,6 +238,9 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||
add_definitions(-DDEFAULT_POSITION_FILE="${CMAKE_INSTALL_PREFIX}/share/gnss-sim/circle.csv")
|
||||
else()
|
||||
set(SW_GENERATOR_BIN ${CMAKE_CURRENT_BINARY_DIR}/../../gnss-sim/gnss_sim)
|
||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
set(SW_GENERATOR_BIN ${CMAKE_CURRENT_BINARY_DIR}/../../gnss-sim/${CMAKE_BUILD_TYPE}/gnss_sim)
|
||||
endif()
|
||||
add_definitions(-DSW_GENERATOR_BIN="${SW_GENERATOR_BIN}")
|
||||
add_definitions(-DDEFAULT_RINEX_NAV="${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/brdc3540.14n")
|
||||
add_definitions(-DDEFAULT_POSITION_FILE="${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/circle.csv")
|
||||
@ -254,6 +263,10 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||
set(TOOLCHAIN_ARG "-DCMAKE_CXX_FLAGS=-Wno-deprecated")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
|
||||
endif()
|
||||
set(GPSTK_BUILD_COMMAND "${CMAKE_MAKE_PROGRAM}")
|
||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
set(GPSTK_BUILD_COMMAND "xcodebuild" "-configuration" "${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
include(GNUInstallDirs)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||
ExternalProject_Add(gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
@ -261,7 +274,8 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||
GIT_TAG v${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} -DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install -DBUILD_EXT=OFF -DBUILD_PYTHON=OFF
|
||||
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} -DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install -DBUILD_EXT=OFF -DBUILD_PYTHON=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
BUILD_COMMAND ${GPSTK_BUILD_COMMAND}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
)
|
||||
@ -271,7 +285,8 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||
GIT_TAG v${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}
|
||||
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} -DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install -DBUILD_EXT=OFF -DBUILD_PYTHON=OFF
|
||||
CMAKE_ARGS ${GTEST_COMPILER} ${TOOLCHAIN_ARG} -DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install -DBUILD_EXT=OFF -DBUILD_PYTHON=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
BUILD_COMMAND ${GPSTK_BUILD_COMMAND}
|
||||
BUILD_BYPRODUCTS ${CMAKE_SOURCE_DIR}/thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
@ -577,6 +592,9 @@ if(ENABLE_SYSTEM_TESTING)
|
||||
system_testing_lib signal_processing_testing_lib
|
||||
)
|
||||
add_system_test(position_test)
|
||||
if(NOT GNSSSIMULATOR_FOUND OR ENABLE_GNSS_SIM_INSTALL)
|
||||
add_dependencies(position_test gnss-sim)
|
||||
endif()
|
||||
else()
|
||||
# Avoid working with old executables if they were switched ON and then OFF
|
||||
if(EXISTS ${CMAKE_SOURCE_DIR}/install/position_test)
|
||||
|
@ -65,6 +65,7 @@ if(Boost_FOUND)
|
||||
Boost::serialization
|
||||
${GPSTK_LIBRARY}
|
||||
Gflags::gflags
|
||||
Threads::Threads
|
||||
algorithms_libs
|
||||
core_receiver
|
||||
core_system_parameters
|
||||
|
Loading…
Reference in New Issue
Block a user