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/mmajoral/gnss-sdr into fix_fpga_unit_tests
This commit is contained in:
commit
c9ac1c10db
126
.github/workflows/main.yml
vendored
Normal file
126
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,126 @@
|
||||
name: Simple CI
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build-ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: install-dependencies
|
||||
run: sudo apt-get update && sudo apt-get install ninja-build libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev libmatio-dev googletest protobuf-compiler libprotobuf-dev python3-mako python3-six
|
||||
- name: configure
|
||||
run: cd build && cmake -GNinja ..
|
||||
- name: build
|
||||
run: cd build && ninja
|
||||
- name: check
|
||||
run: cd build && ninja check && ../install/volk_gnsssdr_profile && ../install/run_tests
|
||||
- name: default position_test
|
||||
run: cd build && cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON .. && ninja && ../install/position_test
|
||||
|
||||
|
||||
build-macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: install-dependencies
|
||||
run: brew install ninja pkg-config hdf5 armadillo lapack gflags glog gnuradio libmatio log4cpp pugixml protobuf && pip3 install mako && pip3 install six
|
||||
- name: configure
|
||||
run: cd build && cmake -GNinja ..
|
||||
- name: build
|
||||
run: cd build && ninja
|
||||
- name: check
|
||||
run: cd build && ninja check && ../install/volk_gnsssdr_profile && ../install/run_tests
|
||||
- name: default position_test
|
||||
run: cd build && cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON .. && ninja && ../install/position_test
|
||||
|
||||
|
||||
clang-format:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: install-dependencies
|
||||
run: brew install llvm && ln -s /usr/local/opt/llvm/bin/clang-format /usr/local/bin
|
||||
- name: run clang-format
|
||||
run: find . -iname \*.h -o -iname \*.c -o -iname \*.cpp -o -iname \*.hpp | xargs clang-format -style=file -i
|
||||
- name: check
|
||||
run: git diff > clang_format.patch && echo -e "if \n [ -s clang_format.patch ] \nthen \n echo "clang-format not applied:"; echo ""; more clang_format.patch; exit 1 \nfi \n" > detect && chmod +x ./detect && ./detect
|
||||
|
||||
|
||||
clang-tidy:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: install-dependencies
|
||||
run: brew install llvm pkg-config hdf5 armadillo lapack gflags glog gnuradio libmatio log4cpp pugixml protobuf && ln -s /usr/local/opt/llvm/bin/clang-tidy /usr/local/bin && ln -s /usr/local/Cellar/llvm/9.*/bin/clang-apply-replacements /usr/local/bin && cp /usr/local/Cellar/llvm/9.*/share/clang/run-clang-tidy.py /usr/local/bin && pip3 install mako && pip3 install six
|
||||
- name: Prepare run
|
||||
run: cd build && cmake .. && make volk_gnsssdr_module gtest-1.10.0 core_monitor pvt_libs
|
||||
- name: run clang-tidy
|
||||
run: cd build && run-clang-tidy.py -fix
|
||||
- name: check
|
||||
run: git diff > clang_tidy.patch && echo -e "if \n [ -s clang_tidy.patch ] \nthen \n echo "clang_tidy not applied:"; echo ""; more clang_tidy.patch; exit 1 \nfi \n" > detect && chmod +x ./detect && ./detect
|
||||
|
||||
|
||||
volk-gnsssdr-windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-python@v1
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install mako six
|
||||
- name: configure
|
||||
shell: powershell
|
||||
run: cd build; cmake -G "Visual Studio 16 2019" ..\src\algorithms\libs\volk_gnsssdr_module\volk_gnsssdr
|
||||
- name: build
|
||||
run: cmake --build build --config Release
|
||||
- name: test
|
||||
shell: powershell
|
||||
run: cd build; ctest -C Release
|
||||
|
||||
|
||||
volk-gnsssdr-ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: install-dependencies
|
||||
run: sudo apt-get install build-essential python3-mako python3-six cmake
|
||||
- name: configure
|
||||
run: cd build && cmake ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
|
||||
- name: build
|
||||
run: cd build && make -j2
|
||||
- name: install
|
||||
run: cd build && sudo make install && sudo ldconfig
|
||||
- name: test
|
||||
run: volk_gnsssdr_profile
|
||||
|
||||
|
||||
volk-gnsssdr-macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: install-dependencies
|
||||
run: pip3 install mako && pip3 install six
|
||||
- name: configure
|
||||
run: cd build && cmake ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
|
||||
- name: build
|
||||
run: cd build && make -j2 && sudo make install
|
||||
- name: test
|
||||
run: cd build && ctest -C Release --exclude-regex volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc
|
||||
|
||||
|
||||
volk-gnsssdr-macos-xcode:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: install-dependencies
|
||||
run: pip3 install mako && pip3 install six
|
||||
- name: configure
|
||||
run: cd build && cmake -GXcode ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
|
||||
- name: build
|
||||
run: cd build && xcodebuild -configuration Release
|
||||
- name: install
|
||||
run: cd build && sudo xcodebuild -configuration Release -target install
|
||||
- name: test
|
||||
run: cd build && ctest -C Release --exclude-regex volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -14,3 +14,6 @@ cmake-build-debug/
|
||||
/install
|
||||
.DS_Store
|
||||
.pydevproject
|
||||
.vscode/
|
||||
.vs/
|
||||
Testing/
|
||||
|
251
CMakeLists.txt
251
CMakeLists.txt
@ -23,7 +23,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
message(FATAL_ERROR "Prevented in-tree build, it is bad practice.\nTry 'cd build && cmake ..' instead.")
|
||||
endif()
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.12...3.15)
|
||||
cmake_minimum_required(VERSION 2.8.12...3.16)
|
||||
project(gnss-sdr CXX C)
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
||||
|
||||
@ -410,7 +410,7 @@ set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
|
||||
set(GNSSSDR_GPSTK_LOCAL_VERSION "2.12")
|
||||
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.17")
|
||||
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.10")
|
||||
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "3.10.1")
|
||||
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "3.11.1")
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS "3.0.2")
|
||||
set(GNSSSDR_GFLAGS_LOCAL_VERSION "2.2.1") # Fix for CentOS 7
|
||||
@ -645,7 +645,7 @@ if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND LOG4CPP_READY_FOR_CXX17)
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
if(${FILESYSTEM_FOUND})
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.13)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
else()
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
@ -1092,9 +1092,17 @@ 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 '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'.")
|
||||
set(GFLAGS_BUILD_COMMAND ${CMAKE_MAKE_PROGRAM})
|
||||
set(GFLAGS_BUILD_COMMAND ${CMAKE_COMMAND} "--build" "${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}" "--config" "${CMAKE_BUILD_TYPE}")
|
||||
if((CMAKE_GENERATOR STREQUAL Xcode) OR MSVC)
|
||||
set(GFLAGS_BUILD_COMMAND ${CMAKE_COMMAND} "--build" "${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}" "--config" $<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>)
|
||||
else()
|
||||
set(GFLAGS_BUILD_CONFIG -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
|
||||
endif()
|
||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
set(GFLAGS_BUILD_COMMAND "xcodebuild" "-configuration" "${CMAKE_BUILD_TYPE}")
|
||||
set(GFLAGS_BUILD_COMMAND "xcodebuild" "-configuration" $<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>)
|
||||
endif()
|
||||
if(CMAKE_TOOLCHAIN_FILE)
|
||||
set(GFLAGS_TOOLCHAIN_FILE -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE})
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||
@ -1104,40 +1112,43 @@ 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} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
CMAKE_ARGS -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_LIB=ON -DBUILD_gflags_nothreads_LIB=OFF -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} ${GFLAGS_BUILD_CONFIG} ${GFLAGS_TOOLCHAIN_FILE}
|
||||
BUILD_COMMAND ${GFLAGS_BUILD_COMMAND}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
else()
|
||||
set(GFLAGS_BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug) # Workaround for Ninja generator
|
||||
set(GFLAGS_BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags_debug${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
endif()
|
||||
if((CMAKE_VERSION VERSION_GREATER 3.12.0) AND NOT (CMAKE_GENERATOR STREQUAL Xcode))
|
||||
set(PARALLEL_BUILD "--parallel 2")
|
||||
endif()
|
||||
ExternalProject_Add(gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}
|
||||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}
|
||||
GIT_REPOSITORY git://github.com/gflags/gflags.git
|
||||
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} -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}
|
||||
CMAKE_ARGS -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_gflags_LIB=ON -DBUILD_gflags_nothreads_LIB=ON -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} ${GFLAGS_BUILD_CONFIG} ${GFLAGS_TOOLCHAIN_FILE}
|
||||
BUILD_COMMAND ${GFLAGS_BUILD_COMMAND} ${PARALLEL_BUILD}
|
||||
BUILD_BYPRODUCTS ${GFLAGS_BUILD_BYPRODUCTS}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
endif()
|
||||
# Note: -DBUILD_gflags_nothreads_LIB=ON is required as a workaround to a bug in gflags 2.2.2. This is fixed in gflags master branch
|
||||
|
||||
set(GFlags_INCLUDE_DIRS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/include CACHE PATH "Local Gflags headers"
|
||||
)
|
||||
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)
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS "3.0.2")
|
||||
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}"
|
||||
${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -1147,11 +1158,30 @@ if(NOT GFLAGS_FOUND)
|
||||
add_dependencies(Gflags::gflags gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION})
|
||||
set_target_properties(Gflags::gflags PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GFlags_LIBS}"
|
||||
INCLUDE_DIRECTORIES "${GFlags_INCLUDE_DIRS}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GFlags_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GFlags_LIBS}"
|
||||
IMPORTED_CONFIGURATIONS "Debug;Release;RelWithDebInfo;MinSizeRel"
|
||||
IMPORTED_LOCATION_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags_debug${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELWITHDEBINFO ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_MINSIZEREL ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${GFlags_INCLUDE_DIRS}
|
||||
INTERFACE_LINK_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gflags$<$<CONFIG:Debug>:_debug>${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
if((CMAKE_GENERATOR STREQUAL Xcode) OR MSVC)
|
||||
if(MSVC)
|
||||
set(MSVC_POSTFIX _static)
|
||||
endif()
|
||||
set_target_properties(Gflags::gflags PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/Debug/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${MSVC_POSTFIX}_debug${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/Release/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${MSVC_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELWITHDEBINFO ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/RelWithDebInfo/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${MSVC_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_MINSIZEREL ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/MinSizeRel/${CMAKE_FIND_LIBRARY_PREFIXES}gflags${MSVC_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
INTERFACE_LINK_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib/$<$<CONFIG:Debug>:Debug/>$<$<CONFIG:Release>:Release/>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo/>$<$<CONFIG:MinSizeRel>:MinSizeRel/>${CMAKE_FIND_LIBRARY_PREFIXES}gflags${MSVC_POSTFIX}$<$<CONFIG:Debug>:_debug>${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
target_link_libraries(Gflags::gflags INTERFACE shlwapi.lib)
|
||||
endif()
|
||||
|
||||
set(LOCAL_GFLAGS TRUE CACHE STRING "GFlags downloaded and built automatically" FORCE)
|
||||
@ -1187,19 +1217,22 @@ if(NOT GLOG_FOUND OR ${LOCAL_GFLAGS})
|
||||
set(GFLAGS_PREFIX_PATH ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION})
|
||||
endif()
|
||||
set(TARGET_GFLAGS gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION})
|
||||
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}")
|
||||
set(GLOG_MAKE_PROGRAM ${CMAKE_COMMAND} "--build" "${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}" "--config" "${CMAKE_BUILD_TYPE}")
|
||||
if((CMAKE_GENERATOR STREQUAL Xcode) OR MSVC)
|
||||
set(GLOG_MAKE_PROGRAM ${CMAKE_COMMAND} "--build" "${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}" "--config" $<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>)
|
||||
else()
|
||||
set(GLOG_BUILD_CONFIG -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
|
||||
endif()
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set(GLOG_DEBUG_POSTFIX "d")
|
||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
set(GLOG_MAKE_PROGRAM "xcodebuild" "-configuration" $<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>)
|
||||
endif()
|
||||
if(CMAKE_TOOLCHAIN_FILE)
|
||||
set(GLOG_TOOLCHAIN_FILE -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE})
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.0)
|
||||
set(GLOG_MAKE_PROGRAM ${CMAKE_MAKE_PROGRAM})
|
||||
set(GFLAGS_LIBRARIES_TO_LINK ${GFlags_LIBS})
|
||||
if(${LOCAL_GFLAGS})
|
||||
set(GFLAGS_LIBRARY_DIR_TO_LINK ${CMAKE_CURRENT_BINARY_DIR}/gflags-${GNSSSDR_GFLAGS_LOCAL_VERSION}/lib)
|
||||
@ -1227,7 +1260,7 @@ aclocal
|
||||
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"
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/configure --enable-shared=no"
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/tmp/configure_with_gflags
|
||||
@ -1314,15 +1347,12 @@ ${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}
|
||||
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}"
|
||||
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_PREFIX_PATH=${GFLAGS_PREFIX_PATH} ${GLOG_BUILD_CONFIG} ${GLOG_TOOLCHAIN_FILE}
|
||||
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}
|
||||
@ -1330,6 +1360,17 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/c
|
||||
)
|
||||
endif()
|
||||
else() # CMake > 3.2
|
||||
set(GLOG_BUILD_BYPRODUCTS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/${CMAKE_FIND_LIBRARY_PREFIXES}glog${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug) # Workaround for Ninja generator
|
||||
set(GLOG_BUILD_BYPRODUCTS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/${CMAKE_FIND_LIBRARY_PREFIXES}glogd${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
endif()
|
||||
if((CMAKE_VERSION VERSION_GREATER 3.12.0) AND NOT (CMAKE_GENERATOR STREQUAL Xcode))
|
||||
set(PARALLEL_BUILD "--parallel 2")
|
||||
endif()
|
||||
ExternalProject_Add(glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
DEPENDS ${TARGET_GFLAGS}
|
||||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}
|
||||
@ -1337,29 +1378,21 @@ ${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}
|
||||
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}"
|
||||
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_PREFIX_PATH=${GFLAGS_PREFIX_PATH} ${GLOG_BUILD_CONFIG} ${GLOG_TOOLCHAIN_FILE}
|
||||
BUILD_COMMAND ${GLOG_MAKE_PROGRAM} ${PARALLEL_BUILD}
|
||||
BUILD_BYPRODUCTS ${GLOG_BUILD_BYPRODUCTS}
|
||||
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)
|
||||
|
||||
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()
|
||||
add_dependencies(glog-${GNSSSDR_GLOG_LOCAL_VERSION} Gflags::gflags)
|
||||
|
||||
# Create Glog::glog target
|
||||
if(NOT TARGET Glog::glog)
|
||||
@ -1367,13 +1400,35 @@ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/glog/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/c
|
||||
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 "${GLOG_LIBRARIES}"
|
||||
INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIRS}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GLOG_LIBRARIES}"
|
||||
)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.0)
|
||||
set_target_properties(Glog::glog PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${GLOG_LIBRARIES}"
|
||||
INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIRS}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${GLOG_LIBRARIES}"
|
||||
)
|
||||
else()
|
||||
set_target_properties(Glog::glog PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_CONFIGURATIONS "Debug;Release;RelWithDebInfo;MinSizeRel"
|
||||
IMPORTED_LOCATION_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/${CMAKE_FIND_LIBRARY_PREFIXES}glogd${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/${CMAKE_FIND_LIBRARY_PREFIXES}glog${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELWITHDEBINFO ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/${CMAKE_FIND_LIBRARY_PREFIXES}glog${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_MINSIZEREL ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/${CMAKE_FIND_LIBRARY_PREFIXES}glog${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/${CMAKE_FIND_LIBRARY_PREFIXES}glog$<$<CONFIG:Debug>:d>${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
if((CMAKE_GENERATOR STREQUAL Xcode) OR MSVC)
|
||||
set_target_properties(Glog::glog PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/Debug/${CMAKE_FIND_LIBRARY_PREFIXES}glogd${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/Release/${CMAKE_FIND_LIBRARY_PREFIXES}glog${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELWITHDEBINFO ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/RelWithDebInfo/${CMAKE_FIND_LIBRARY_PREFIXES}glog${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_MINSIZEREL ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/MinSizeRel/${CMAKE_FIND_LIBRARY_PREFIXES}glog${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
INTERFACE_LINK_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/glog-${GNSSSDR_GLOG_LOCAL_VERSION}/$<$<CONFIG:Debug>:Debug/>$<$<CONFIG:Release>:Release/>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo/>$<$<CONFIG:MinSizeRel>:MinSizeRel/>${CMAKE_FIND_LIBRARY_PREFIXES}glog$<$<CONFIG:Debug>:d>${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(LOCAL_GLOG TRUE CACHE STRING "Glog downloaded and built automatically" FORCE)
|
||||
@ -1470,7 +1525,7 @@ if(ARMADILLO_FOUND)
|
||||
if(${ARMADILLO_VERSION_STRING} VERSION_LESS ${GNSSSDR_ARMADILLO_MIN_VERSION})
|
||||
set(ARMADILLO_FOUND FALSE)
|
||||
set(ENABLE_OWN_ARMADILLO ON)
|
||||
message(STATUS " Armadillo > v${GNSSSDR_ARMADILLO_MIN_VERSION} has not been found.")
|
||||
message(STATUS " Armadillo >= v${GNSSSDR_ARMADILLO_MIN_VERSION} has not been found.")
|
||||
else()
|
||||
if(NOT ENABLE_OWN_ARMADILLO)
|
||||
add_library(Armadillo::armadillo SHARED IMPORTED)
|
||||
@ -1495,7 +1550,7 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
|
||||
#############################################
|
||||
# Check if GFORTRAN is found in the system
|
||||
#############################################
|
||||
if(NOT OS_IS_MACOSX)
|
||||
if(NOT OS_IS_MACOSX AND NOT MSVC)
|
||||
find_package(GFORTRAN)
|
||||
set_package_properties(GFORTRAN PROPERTIES
|
||||
PURPOSE "Required by Armadillo."
|
||||
@ -1518,6 +1573,16 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
|
||||
#############################################
|
||||
# Download and build Armadillo
|
||||
#############################################
|
||||
if((CMAKE_GENERATOR STREQUAL Xcode) OR MSVC)
|
||||
set(ARMADILLO_BUILD_COMMAND ${CMAKE_COMMAND} "--build" "${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}" "--config" $<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>)
|
||||
else()
|
||||
set(ARMADILLO_BUILD_COMMAND ${CMAKE_COMMAND} "--build" "${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}" "--config" "${CMAKE_BUILD_TYPE}")
|
||||
set(ARMADILLO_BUILD_CONFIG -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
|
||||
endif()
|
||||
if(CMAKE_TOOLCHAIN_FILE)
|
||||
set(ARMADILLO_TOOLCHAIN_FILE -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE})
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||
ExternalProject_Add(armadillo-${armadillo_RELEASE}
|
||||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}
|
||||
@ -1525,20 +1590,23 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
|
||||
GIT_TAG ${armadillo_BRANCH}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}
|
||||
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS=-std=c++11
|
||||
BUILD_COMMAND ${CMAKE_MAKE_PROGRAM}
|
||||
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS=-std=c++11 ${ARMADILLO_BUILD_CONFIG} ${ARMADILLO_TOOLCHAIN_FILE}
|
||||
BUILD_COMMAND ${ARMADILLO_BUILD_COMMAND}
|
||||
UPDATE_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
else()
|
||||
if(CMAKE_VERSION VERSION_GREATER 3.12.0)
|
||||
set(PARALLEL_BUILD "--parallel 2")
|
||||
endif()
|
||||
ExternalProject_Add(armadillo-${armadillo_RELEASE}
|
||||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}
|
||||
GIT_REPOSITORY https://gitlab.com/conradsnicta/armadillo-code.git
|
||||
GIT_TAG ${armadillo_BRANCH}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}
|
||||
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS=-std=c++11
|
||||
BUILD_COMMAND ${CMAKE_MAKE_PROGRAM}
|
||||
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS=-std=c++11 ${ARMADILLO_BUILD_CONFIG} ${ARMADILLO_TOOLCHAIN_FILE}
|
||||
BUILD_COMMAND ${ARMADILLO_BUILD_COMMAND} ${PARALLEL_BUILD}
|
||||
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/armadillo-${armadillo_RELEASE}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
UPDATE_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
@ -1550,7 +1618,7 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
|
||||
if(NOT GFORTRAN)
|
||||
set(GFORTRAN "")
|
||||
endif()
|
||||
set(ARMADILLO_LIBRARIES ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES} ${GFORTRAN} ${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
set(ARMADILLO_STATIC_LIBRARY ${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
set(LOCAL_ARMADILLO TRUE CACHE STRING "Armadillo downloaded and built automatically" FORCE)
|
||||
set(ARMADILLO_VERSION_STRING ${armadillo_RELEASE})
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}/include)
|
||||
@ -1558,10 +1626,23 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
|
||||
add_dependencies(Armadillo::armadillo armadillo-${armadillo_RELEASE})
|
||||
set_target_properties(Armadillo::armadillo PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
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}"
|
||||
IMPORTED_CONFIGURATIONS "Debug;Release;RelWithDebInfo;MinSizeRel"
|
||||
IMPORTED_LOCATION_DEBUG ${ARMADILLO_STATIC_LIBRARY}
|
||||
IMPORTED_LOCATION_RELEASE ${ARMADILLO_STATIC_LIBRARY}
|
||||
IMPORTED_LOCATION_RELWITHDEBINFO ${ARMADILLO_STATIC_LIBRARY}
|
||||
IMPORTED_LOCATION_MINSIZEREL ${ARMADILLO_STATIC_LIBRARY}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/armadillo/armadillo-${armadillo_RELEASE}/include
|
||||
INTERFACE_LINK_LIBRARIES ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES} ${GFORTRAN} ${ARMADILLO_STATIC_LIBRARY}
|
||||
)
|
||||
if((CMAKE_GENERATOR STREQUAL Xcode) OR MSVC)
|
||||
set_target_properties(Armadillo::armadillo PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG ${binary_dir}/Debug/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELEASE ${binary_dir}/Release/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELWITHDEBINFO ${binary_dir}/RelWithDebInfo/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_MINSIZEREL ${binary_dir}/MinSizeRel/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
INTERFACE_LINK_LIBRARIES ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES} ${GFORTRAN} ${binary_dir}/${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}/$<$<CONFIG:Debug>:Debug/>$<$<CONFIG:Release>:Release/>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo/>$<$<CONFIG:MinSizeRel>:MinSizeRel/>${CMAKE_FIND_LIBRARY_PREFIXES}armadillo${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
endif()
|
||||
set_package_properties(Armadillo PROPERTIES
|
||||
DESCRIPTION "C++ library for linear algebra and scientific computing"
|
||||
PURPOSE "Armadillo ${GNSSSDR_ARMADILLO_LOCAL_VERSION} will be downloaded and built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'."
|
||||
@ -1838,16 +1919,22 @@ set_package_properties(PUGIXML PROPERTIES
|
||||
)
|
||||
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 "")
|
||||
set(PUGIXML_COMPILER -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER})
|
||||
set(PUGIXML_CMAKE_FLAGS "")
|
||||
if(DEFINED ENV{OECORE_TARGET_SYSROOT})
|
||||
set(PUGIXML_COMPILER "")
|
||||
set(TOOLCHAIN_ARG "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/Toolchains/oe-sdk_cross.cmake")
|
||||
set(PUGIXML_CMAKE_FLAGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/Toolchains/oe-sdk_cross.cmake")
|
||||
else()
|
||||
if(CMAKE_TOOLCHAIN_FILE)
|
||||
set(TOOLCHAIN_ARG "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
|
||||
set(PUGIXML_CMAKE_FLAGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
|
||||
endif()
|
||||
endif()
|
||||
if((CMAKE_GENERATOR STREQUAL Xcode) OR MSVC)
|
||||
set(PUGIXML_BUILD_COMMAND ${CMAKE_COMMAND} "--build" "${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}" "--config" $<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>)
|
||||
else()
|
||||
set(PUGIXML_BUILD_COMMAND ${CMAKE_COMMAND} "--build" "${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}" "--config" "${CMAKE_BUILD_TYPE}")
|
||||
set(PUGIXML_BUILD_CONFIG -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
|
||||
endif()
|
||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||
ExternalProject_Add(pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}
|
||||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}
|
||||
@ -1855,36 +1942,56 @@ if(NOT PUGIXML_FOUND)
|
||||
GIT_TAG v${GNSSSDR_PUGIXML_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pugixml/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}
|
||||
CMAKE_ARGS ${PUGIXML_COMPILER} ${TOOLCHAIN_ARG}
|
||||
CMAKE_ARGS ${PUGIXML_COMPILER} ${PUGIXML_CMAKE_FLAGS} ${PUGIXML_BUILD_CONFIG}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
BUILD_COMMAND ${PUGIXML_BUILD_COMMAND}
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
else()
|
||||
if(CMAKE_VERSION VERSION_GREATER 3.12.0)
|
||||
set(PARALLEL_BUILD "--parallel 2")
|
||||
endif()
|
||||
ExternalProject_Add(pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}
|
||||
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}
|
||||
GIT_REPOSITORY https://github.com/zeux/pugixml
|
||||
GIT_TAG v${GNSSSDR_PUGIXML_LOCAL_VERSION}
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pugixml/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}
|
||||
CMAKE_ARGS ${PUGIXML_COMPILER} ${TOOLCHAIN_ARG}
|
||||
CMAKE_ARGS ${PUGIXML_COMPILER} ${PUGIXML_CMAKE_FLAGS} ${PUGIXML_BUILD_CONFIG}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
BUILD_COMMAND ${PUGIXML_BUILD_COMMAND} ${PARALLEL_BUILD}
|
||||
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/${CMAKE_FIND_LIBRARY_PREFIXES}pugixml${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
endif()
|
||||
|
||||
set(PUGIXML_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/${CMAKE_FIND_LIBRARY_PREFIXES}pugixml${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
|
||||
if(NOT TARGET Pugixml::pugixml)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pugixml/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/src)
|
||||
add_library(Pugixml::pugixml STATIC IMPORTED)
|
||||
add_dependencies(Pugixml::pugixml pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION})
|
||||
set_target_properties(Pugixml::pugixml PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/${CMAKE_FIND_LIBRARY_PREFIXES}pugixml${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pugixml/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/src"
|
||||
INTERFACE_LINK_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/${CMAKE_FIND_LIBRARY_PREFIXES}pugixml${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
IMPORTED_CONFIGURATIONS "Debug;Release;RelWithDebInfo;MinSizeRel"
|
||||
IMPORTED_LOCATION_DEBUG ${PUGIXML_LIBRARIES}
|
||||
IMPORTED_LOCATION_RELEASE ${PUGIXML_LIBRARIES}
|
||||
IMPORTED_LOCATION_RELWITHDEBINFO ${PUGIXML_LIBRARIES}
|
||||
IMPORTED_LOCATION_MINSIZEREL ${PUGIXML_LIBRARIES}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/pugixml/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/src
|
||||
INTERFACE_LINK_LIBRARIES ${PUGIXML_LIBRARIES}
|
||||
)
|
||||
if((CMAKE_GENERATOR STREQUAL Xcode) OR MSVC)
|
||||
set_target_properties(Pugixml::pugixml PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/Debug/${CMAKE_FIND_LIBRARY_PREFIXES}pugixml${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/Release/${CMAKE_FIND_LIBRARY_PREFIXES}pugixml${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELWITHDEBINFO ${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/RelWithDebInfo/${CMAKE_FIND_LIBRARY_PREFIXES}pugixml${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_MINSIZEREL ${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/MinSizeRel/${CMAKE_FIND_LIBRARY_PREFIXES}pugixml${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
INTERFACE_LINK_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/pugixml-${GNSSSDR_PUGIXML_LOCAL_VERSION}/$<$<CONFIG:Debug>:Debug/>$<$<CONFIG:Release>:Release/>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo/>$<$<CONFIG:MinSizeRel>:MinSizeRel/>${CMAKE_FIND_LIBRARY_PREFIXES}pugixml${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_package_properties(PUGIXML PROPERTIES
|
||||
|
31
README.md
31
README.md
@ -67,14 +67,16 @@ $ sudo apt-get install build-essential cmake git pkg-config libboost-dev libboos
|
||||
libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev \
|
||||
libboost-serialization-dev liblog4cpp5-dev libuhd-dev gnuradio-dev gr-osmosdr \
|
||||
libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev \
|
||||
libgnutls-openssl-dev libpcap-dev python-mako python-six libmatio-dev libpugixml-dev \
|
||||
libgtest-dev libprotobuf-dev protobuf-compiler
|
||||
libgnutls-openssl-dev libpcap-dev libmatio-dev libpugixml-dev libgtest-dev \
|
||||
libprotobuf-dev protobuf-compiler python3-mako python3-six
|
||||
~~~~~~
|
||||
|
||||
Please note that the required files from `libgtest-dev` were moved to `googletest` in Debian 9 "stretch" and Ubuntu 18.04 "bionic", and moved back again to `libgtest-dev` in Debian 10 "buster" and Ubuntu 18.10 "cosmic" (and above).
|
||||
|
||||
**Note for Ubuntu 14.04 LTS "trusty" users:** you will need to build from source and install GNU Radio manually, as explained below, since GNSS-SDR requires `gnuradio-dev` >= 3.7.3, and Ubuntu 14.04 came with 3.7.2. Install all the packages above BUT EXCEPT `libuhd-dev`, `gnuradio-dev` and `gr-osmosdr` (and remove them if they are already installed in your machine), and install those dependencies using PyBOMBS. The same applies to `libmatio-dev`: Ubuntu 14.04 came with 1.5.2 and the minimum required version is 1.5.3. Please do not install the `libmatio-dev` package and install `libtool`, `automake` and `libhdf5-dev` instead. A recent version of the library will be downloaded and built automatically if CMake does not find it installed.
|
||||
|
||||
In distributions older than Ubuntu 16.04 or Debian 9, `python3-mako` and `python3-six` must be replaced by `python-mako` and `python-six`.
|
||||
|
||||
**Note for Debian 8 "jessie" users:** please see the note about `libmatio-dev` above. Install `libtool`, `automake` and `libhdf5-dev` instead.
|
||||
|
||||
Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux).
|
||||
@ -119,7 +121,7 @@ $ sudo yum install make automake gcc gcc-c++ kernel-devel cmake git boost-devel
|
||||
boost-date-time boost-system boost-filesystem boost-thread boost-chrono \
|
||||
boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr-devel \
|
||||
blas-devel lapack-devel matio-devel armadillo-devel gflags-devel \
|
||||
glog-devel openssl-devel libpcap-devel python-mako python-six \
|
||||
glog-devel openssl-devel libpcap-devel python3-mako python3-six \
|
||||
pugixml-devel protobuf-devel protobuf-compiler
|
||||
~~~~~~
|
||||
|
||||
@ -135,7 +137,7 @@ zypper install cmake git gcc-c++ boost-devel libboost_atomic-devel \
|
||||
libboost_system-devel libboost_filesystem-devel libboost_chrono-devel \
|
||||
libboost_thread-devel libboost_serialization-devel log4cpp-devel \
|
||||
gnuradio-devel pugixml-devel libpcap-devel armadillo-devel libtool \
|
||||
automake hdf5-devel openssl-devel python-Mako python-six protobuf-devel
|
||||
automake hdf5-devel openssl-devel python3-Mako python3-six protobuf-devel
|
||||
~~~~~~
|
||||
|
||||
If you are using openSUSE Tumbleweed:
|
||||
@ -220,9 +222,9 @@ $ sudo apt-get install libblas-dev liblapack-dev # For Debian/Ubuntu/Linux
|
||||
$ sudo yum install lapack-devel blas-devel # For Fedora/CentOS/RHEL
|
||||
$ sudo zypper install lapack-devel blas-devel # For OpenSUSE
|
||||
$ sudo pacman -S blas lapack # For Arch Linux
|
||||
$ wget https://sourceforge.net/projects/arma/files/armadillo-9.800.2.tar.xz
|
||||
$ tar xvfz armadillo-9.800.2.tar.xz
|
||||
$ cd armadillo-9.800.2
|
||||
$ wget https://sourceforge.net/projects/arma/files/armadillo-9.800.3.tar.xz
|
||||
$ tar xvfz armadillo-9.800.3.tar.xz
|
||||
$ cd armadillo-9.800.3
|
||||
$ cmake .
|
||||
$ make
|
||||
$ sudo make install
|
||||
@ -302,9 +304,9 @@ $ sudo apt-get install autoconf automake libtool curl make g++ unzip
|
||||
and then:
|
||||
|
||||
~~~~~~
|
||||
$ wget https://github.com/protocolbuffers/protobuf/releases/download/v3.10.1/protobuf-cpp-3.10.1.tar.gz
|
||||
$ tar xvfz protobuf-cpp-3.10.1.tar.gz
|
||||
$ cd protobuf-3.10.1
|
||||
$ wget https://github.com/protocolbuffers/protobuf/releases/download/v3.11.1/protobuf-cpp-3.11.1.tar.gz
|
||||
$ tar xvfz protobuf-cpp-3.11.1.tar.gz
|
||||
$ cd protobuf-3.11.1
|
||||
$ ./autogen.sh
|
||||
$ ./configure
|
||||
$ make
|
||||
@ -632,10 +634,11 @@ $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/inst
|
||||
|
||||
The script explains what it will do, and then it pauses before doing it. There are more installation options [here](https://docs.brew.sh/Installation.html).
|
||||
|
||||
Install pip:
|
||||
Install pip3:
|
||||
|
||||
~~~~~~
|
||||
$ sudo easy_install pip
|
||||
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||
$ sudo python3 get-pip.py
|
||||
~~~~~~
|
||||
|
||||
Install the required dependencies:
|
||||
@ -654,8 +657,8 @@ $ brew install log4cpp
|
||||
$ brew install openssl
|
||||
$ brew install pugixml
|
||||
$ brew install protobuf
|
||||
$ pip install mako
|
||||
$ pip install six
|
||||
$ pip3 install mako
|
||||
$ pip3 install six
|
||||
~~~~~~
|
||||
|
||||
|
||||
|
@ -140,6 +140,9 @@ endif()
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11"))
|
||||
set(CMAKE_REQUIRED_FLAGS "-std=c++17")
|
||||
endif()
|
||||
if(MSVC AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "18"))
|
||||
set(CMAKE_REQUIRED_FLAGS "/std:c++17")
|
||||
endif()
|
||||
|
||||
# Normalize and check the component list we were given
|
||||
set(want_components ${FILESYSTEM_FIND_COMPONENTS})
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
@ -71,12 +71,13 @@ 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)
|
||||
else()
|
||||
message(STATUS "PYTHON_EXECUTABLE not set - trying by default python2")
|
||||
message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python3 to build for python3.")
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION})
|
||||
message(STATUS "PYTHON_EXECUTABLE not set - trying by default python3")
|
||||
message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python to build for python 2.7")
|
||||
set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6 3.7 3.8 3.9)
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN3_VERSION})
|
||||
if(NOT PYTHONINTERP_FOUND)
|
||||
message(STATUS "python2 not found - trying with python3")
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON3_MIN_VERSION} REQUIRED)
|
||||
message(STATUS "python3 not found - trying with python2.7")
|
||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION} REQUIRED)
|
||||
endif()
|
||||
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
||||
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
@ -16,23 +16,32 @@
|
||||
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
|
||||
endif()
|
||||
|
||||
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||
foreach(file ${files})
|
||||
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
|
||||
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||
execute_process(
|
||||
COMMAND @CMAKE_COMMAND@ -E remove \"$ENV{DESTDIR}${file}\"
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RESULT_VARIABLE rm_retval
|
||||
)
|
||||
if(NOT "${rm_retval}" STREQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
|
||||
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
|
||||
if(EXISTS "$ENV{DESTDIR}${file}")
|
||||
execute_process(
|
||||
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RESULT_VARIABLE rm_retval
|
||||
)
|
||||
if(NOT "${rm_retval}" STREQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
||||
endif()
|
||||
elseif(IS_SYMLINK "$ENV{DESTDIR}${file}")
|
||||
execute_process(
|
||||
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RESULT_VARIABLE rm_retval
|
||||
)
|
||||
if(NOT "${rm_retval}" STREQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
|
||||
endif()
|
||||
endforeach()
|
||||
|
@ -40,6 +40,7 @@
|
||||
- Fixed cpplint.py build/include_what_you_use, whitespace/tab, whitespace/blank_line errors.
|
||||
- clang-format can now be applied to the whole code tree without breaking compilation.
|
||||
- Added more check options to .clang-tidy file.
|
||||
- Default Python version is now >= 3.4. Python 2.7 still can be used in systems where Python 3 is not available (e.g., CentOS 7, Debian 8, Ubuntu 10.04).
|
||||
|
||||
|
||||
### Improvements in Portability:
|
||||
@ -49,6 +50,7 @@
|
||||
- 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.
|
||||
- Now the volk_gnsssdr library can be built on Microsoft Windows.
|
||||
|
||||
|
||||
### Improvements in Reliability:
|
||||
@ -56,6 +58,7 @@
|
||||
- Decoding of navigation messages no longer rely on implementation defined behavior for shifting left a signed integer.
|
||||
- Removed usage of functions with insecure API (e.g., strcpy, sprintf).
|
||||
- New type alias volk_gnsssdr::vector allows both aligned memory allocation and automatic deallocation.
|
||||
- Fixed a memory leak in the generation of Galileo PRN codes.
|
||||
- Added clang-tidy checks clang-analyzer-security.*, clang-analyzer-optin.portability.UnixAPI clang-tidy checks. Fixed raised warnings.
|
||||
- Fixed cpplint.py runtime/printf and runtime/explicit errors.
|
||||
- All constructors callable with one argument are marked with the keyword explicit. See MISRA C++:2008, 12-1-3 - All constructors that are callable with a single argument of fundamental type shall be declared explicit.
|
||||
|
@ -172,12 +172,11 @@ void galileo_e1_code_gen_float_sampled(gsl::span<float> _dest, const std::array<
|
||||
galileo_e1_code_gen_int(primary_code_E1_chips, _Signal, _prn); // generate Galileo E1 code, 1 sample per chip
|
||||
|
||||
const uint32_t _codeLength = _samplesPerChip * GALILEO_E1_B_CODE_LENGTH_CHIPS;
|
||||
std::unique_ptr<float> _signal_E1{new float[_codeLength]};
|
||||
gsl::span<float> _signal_E1_span(_signal_E1, _codeLength);
|
||||
std::vector<float> _signal_E1(_codeLength);
|
||||
|
||||
if (_cboc == true)
|
||||
{
|
||||
galileo_e1_gen_float(_signal_E1_span, primary_code_E1_chips, _Signal); // generate cboc 12 samples per chip
|
||||
galileo_e1_gen_float(_signal_E1, primary_code_E1_chips, _Signal); // generate cboc 12 samples per chip
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -186,33 +185,27 @@ void galileo_e1_code_gen_float_sampled(gsl::span<float> _dest, const std::array<
|
||||
|
||||
for (uint32_t ii = 0; ii < _codeLength; ++ii)
|
||||
{
|
||||
_signal_E1_span[ii] = static_cast<float>(_signal_E1_int[ii]);
|
||||
_signal_E1[ii] = static_cast<float>(_signal_E1_int[ii]);
|
||||
}
|
||||
}
|
||||
|
||||
if (_fs != _samplesPerChip * _codeFreqBasis)
|
||||
{
|
||||
std::unique_ptr<float> _resampled_signal{new float[_samplesPerCode]};
|
||||
std::vector<float> _resampled_signal(_samplesPerCode);
|
||||
|
||||
resampler(gsl::span<float>(_signal_E1, _codeLength), gsl::span<float>(_resampled_signal, _samplesPerCode), _samplesPerChip * _codeFreqBasis, _fs); // resamples code to fs
|
||||
resampler(_signal_E1, _resampled_signal, _samplesPerChip * _codeFreqBasis, _fs); // resamples code to fs
|
||||
|
||||
_signal_E1 = std::move(_resampled_signal);
|
||||
}
|
||||
uint32_t size_signal_E1 = _codeLength;
|
||||
if (_fs != _samplesPerChip * _codeFreqBasis)
|
||||
{
|
||||
size_signal_E1 = _samplesPerCode;
|
||||
}
|
||||
gsl::span<float> _signal_E1_span_aux(_signal_E1, size_signal_E1);
|
||||
|
||||
if (_galileo_signal.rfind("1C") != std::string::npos && _galileo_signal.length() >= 2 && _secondary_flag)
|
||||
{
|
||||
std::unique_ptr<float> _signal_E1C_secondary{new float[static_cast<int32_t>(GALILEO_E1_C_SECONDARY_CODE_LENGTH) * _samplesPerCode]};
|
||||
gsl::span<float> _signal_E1C_secondary_span(_signal_E1C_secondary, static_cast<int32_t>(GALILEO_E1_C_SECONDARY_CODE_LENGTH) * _samplesPerCode);
|
||||
std::vector<float> _signal_E1C_secondary(static_cast<int32_t>(GALILEO_E1_C_SECONDARY_CODE_LENGTH) * _samplesPerCode);
|
||||
for (uint32_t i = 0; i < static_cast<uint32_t>(GALILEO_E1_C_SECONDARY_CODE_LENGTH); i++)
|
||||
{
|
||||
for (unsigned k = 0; k < _samplesPerCode; k++)
|
||||
for (uint32_t k = 0; k < _samplesPerCode; k++)
|
||||
{
|
||||
_signal_E1C_secondary_span[i * _samplesPerCode + k] = _signal_E1_span_aux[k] * (GALILEO_E1_C_SECONDARY_CODE[i] == '0' ? 1.0F : -1.0F);
|
||||
_signal_E1C_secondary[i * _samplesPerCode + k] = _signal_E1[k] * (GALILEO_E1_C_SECONDARY_CODE[i] == '0' ? 1.0F : -1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@ -220,14 +213,10 @@ void galileo_e1_code_gen_float_sampled(gsl::span<float> _dest, const std::array<
|
||||
|
||||
_signal_E1 = std::move(_signal_E1C_secondary);
|
||||
}
|
||||
if (_galileo_signal.rfind("1C") != std::string::npos && _galileo_signal.length() >= 2 && _secondary_flag)
|
||||
{
|
||||
size_signal_E1 = static_cast<int32_t>(GALILEO_E1_C_SECONDARY_CODE_LENGTH) * _samplesPerCode;
|
||||
}
|
||||
gsl::span<float> _signal_E1_span_aux2(_signal_E1, size_signal_E1);
|
||||
|
||||
for (uint32_t i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
_dest[(i + delay) % _samplesPerCode] = _signal_E1_span_aux2[i];
|
||||
_dest[(i + delay) % _samplesPerCode] = _signal_E1[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <gnuradio/gr_complex.h>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
||||
void galileo_e5_a_code_gen_complex_primary(gsl::span<std::complex<float>> _dest, int32_t _prn, const std::array<char, 3>& _Signal)
|
||||
@ -108,9 +109,8 @@ void galileo_e5_a_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest,
|
||||
const uint32_t _codeLength = GALILEO_E5A_CODE_LENGTH_CHIPS;
|
||||
const int32_t _codeFreqBasis = GALILEO_E5A_CODE_CHIP_RATE_CPS;
|
||||
|
||||
std::unique_ptr<std::complex<float>> _code{new std::complex<float>[_codeLength]};
|
||||
gsl::span<std::complex<float>> _code_span(_code, _codeLength);
|
||||
galileo_e5_a_code_gen_complex_primary(_code_span, _prn, _Signal);
|
||||
std::vector<std::complex<float>> _code(_codeLength);
|
||||
galileo_e5_a_code_gen_complex_primary(_code, _prn, _Signal);
|
||||
|
||||
_samplesPerCode = static_cast<uint32_t>(static_cast<double>(_fs) / (static_cast<double>(_codeFreqBasis) / static_cast<double>(_codeLength)));
|
||||
|
||||
@ -118,18 +118,13 @@ void galileo_e5_a_code_gen_complex_sampled(gsl::span<std::complex<float>> _dest,
|
||||
|
||||
if (_fs != _codeFreqBasis)
|
||||
{
|
||||
std::unique_ptr<std::complex<float>> _resampled_signal{new std::complex<float>[_samplesPerCode]};
|
||||
resampler(_code_span, gsl::span<std::complex<float>>(_resampled_signal, _samplesPerCode), _codeFreqBasis, _fs); // resamples code to fs
|
||||
std::vector<std::complex<float>> _resampled_signal(_samplesPerCode);
|
||||
resampler(_code, _resampled_signal, _codeFreqBasis, _fs); // resamples code to fs
|
||||
_code = std::move(_resampled_signal);
|
||||
}
|
||||
uint32_t size_code = _codeLength;
|
||||
if (_fs != _codeFreqBasis)
|
||||
{
|
||||
size_code = _samplesPerCode;
|
||||
}
|
||||
gsl::span<std::complex<float>> _code_span_aux(_code, size_code);
|
||||
|
||||
for (uint32_t i = 0; i < _samplesPerCode; i++)
|
||||
{
|
||||
_dest[(i + delay) % _samplesPerCode] = _code_span_aux[i];
|
||||
_dest[(i + delay) % _samplesPerCode] = _code[i];
|
||||
}
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ geph_t eph_to_rtklib(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const Glona
|
||||
rtklib_sat.acc[2] = glonass_gnav_eph.d_AZn * 1000; /* satellite acceleration (ecef) (m/s^2) */
|
||||
rtklib_sat.taun = glonass_gnav_eph.d_tau_n; /* SV clock bias (s) */
|
||||
rtklib_sat.gamn = glonass_gnav_eph.d_gamma_n; /* SV relative freq bias */
|
||||
rtklib_sat.age = static_cast<int>(glonass_gnav_eph.d_Delta_tau_n); /* delay between L1 and L2 (s) */
|
||||
rtklib_sat.dtaun = static_cast<int>(glonass_gnav_eph.d_Delta_tau_n); /* delay between L1 and L2 (s) */
|
||||
|
||||
// Time expressed in GPS Time but using RTKLib format
|
||||
glonass_gnav_eph.glot_to_gpst(glonass_gnav_eph.d_t_b, gnav_clock_model.d_tau_c, gnav_clock_model.d_tau_gps, &week, &sec);
|
||||
|
@ -225,12 +225,11 @@ volk_python_check_module("python >= 2.7" sys "sys.version.split()[0] >= '2.7'" P
|
||||
volk_python_check_module("mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND)
|
||||
volk_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
||||
|
||||
|
||||
if(NOT PYTHON_MIN_VER_FOUND)
|
||||
message(FATAL_ERROR "Python 2.7 or greater required to build VOLK_GNSSSDR")
|
||||
endif()
|
||||
|
||||
# Mako
|
||||
# Mako
|
||||
if(NOT MAKO_FOUND)
|
||||
message(FATAL_ERROR "Mako templates required to build VOLK_GNSSSDR")
|
||||
endif()
|
||||
@ -252,10 +251,7 @@ if(MSVC)
|
||||
unset(BOOST_REQUIRED_COMPONENTS) # empty components list for static link
|
||||
endif()
|
||||
endif()
|
||||
if(${FILESYSTEM_FOUND})
|
||||
set(Boost_LIBRARIES "")
|
||||
set(Boost_INCLUDE_DIRS "")
|
||||
else()
|
||||
if(NOT ${FILESYSTEM_FOUND})
|
||||
include(VolkBoost)
|
||||
if(NOT Boost_FOUND)
|
||||
message(FATAL_ERROR "VOLK-GNSSSDR requires Boost to build")
|
||||
@ -265,9 +261,9 @@ endif()
|
||||
# Orc
|
||||
option(ENABLE_ORC "Enable Orc" TRUE)
|
||||
if(ENABLE_ORC)
|
||||
find_package(ORC)
|
||||
find_package(ORC)
|
||||
else()
|
||||
message(STATUS "Disabling use of ORC")
|
||||
message(STATUS "Disabling use of ORC")
|
||||
endif()
|
||||
|
||||
|
||||
@ -279,8 +275,8 @@ if(DOXYGEN_FOUND)
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/Doxyfile.in
|
||||
${PROJECT_BINARY_DIR}/Doxyfile
|
||||
@ONLY)
|
||||
|
||||
@ONLY
|
||||
)
|
||||
add_custom_target(doc
|
||||
${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
@ -313,9 +309,9 @@ install(
|
||||
########################################################################
|
||||
# Install all headers in the include directories
|
||||
########################################################################
|
||||
set(VOLK_RUNTIME_DIR bin)
|
||||
set(VOLK_LIBRARY_DIR lib${LIB_SUFFIX})
|
||||
set(VOLK_INCLUDE_DIR include)
|
||||
set(VOLK_RUNTIME_DIR bin)
|
||||
set(VOLK_LIBRARY_DIR lib${LIB_SUFFIX})
|
||||
set(VOLK_INCLUDE_DIR include)
|
||||
|
||||
install(
|
||||
DIRECTORY ${PROJECT_SOURCE_DIR}/kernels/volk_gnsssdr
|
||||
@ -352,16 +348,19 @@ if(APPLE)
|
||||
if(NOT CMAKE_INSTALL_NAME_DIR)
|
||||
set(CMAKE_INSTALL_NAME_DIR
|
||||
${CMAKE_INSTALL_PREFIX}/${VOLK_LIBRARY_DIR} CACHE
|
||||
PATH "Library Install Name Destination Directory" FORCE)
|
||||
PATH "Library Install Name Destination Directory" FORCE
|
||||
)
|
||||
endif()
|
||||
if(NOT CMAKE_INSTALL_RPATH)
|
||||
set(CMAKE_INSTALL_RPATH
|
||||
${CMAKE_INSTALL_PREFIX}/${VOLK_LIBRARY_DIR} CACHE
|
||||
PATH "Library Install RPath" FORCE)
|
||||
PATH "Library Install RPath" FORCE
|
||||
)
|
||||
endif()
|
||||
if(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE
|
||||
BOOL "Do Build Using Library Install RPath" FORCE)
|
||||
BOOL "Do Build Using Library Install RPath" FORCE
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -372,7 +371,8 @@ endif()
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
|
||||
@ONLY)
|
||||
@ONLY
|
||||
)
|
||||
|
||||
# Only add the target if there isn't one defined already
|
||||
if(NOT TARGET uninstall)
|
||||
@ -390,14 +390,16 @@ endif()
|
||||
########################################################################
|
||||
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/cmake/Modules/VolkGnsssdrConfig.cmake.in
|
||||
${CMAKE_BINARY_DIR}/cmake/Modules/VolkGnsssdrConfig.cmake
|
||||
@ONLY)
|
||||
${CMAKE_SOURCE_DIR}/cmake/Modules/VolkGnsssdrConfig.cmake.in
|
||||
${CMAKE_BINARY_DIR}/cmake/Modules/VolkGnsssdrConfig.cmake
|
||||
@ONLY
|
||||
)
|
||||
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/cmake/Modules/VolkGnsssdrConfigVersion.cmake.in
|
||||
${PROJECT_BINARY_DIR}/cmake/Modules/VolkGnsssdrConfigVersion.cmake
|
||||
@ONLY)
|
||||
${PROJECT_SOURCE_DIR}/cmake/Modules/VolkGnsssdrConfigVersion.cmake.in
|
||||
${PROJECT_BINARY_DIR}/cmake/Modules/VolkGnsssdrConfigVersion.cmake
|
||||
@ONLY
|
||||
)
|
||||
|
||||
|
||||
########################################################################
|
||||
@ -425,9 +427,9 @@ install(EXPORT VOLK_GNSSSDR-export FILE VolkGnsssdrTargets.cmake
|
||||
########################################################################
|
||||
option(ENABLE_TESTING "Enable QA testing" ON)
|
||||
if(ENABLE_TESTING)
|
||||
message(STATUS "QA Testing is enabled.")
|
||||
message(STATUS "QA Testing is enabled.")
|
||||
else()
|
||||
message(STATUS "QA Testing is disabled.")
|
||||
message(STATUS "QA Testing is disabled.")
|
||||
endif()
|
||||
message(STATUS " Modify using: -DENABLE_TESTING=ON/OFF")
|
||||
|
||||
@ -437,24 +439,24 @@ message(STATUS " Modify using: -DENABLE_TESTING=ON/OFF")
|
||||
########################################################################
|
||||
option(ENABLE_PROFILING "Launch system profiler after build" OFF)
|
||||
if(ENABLE_PROFILING)
|
||||
set(ENABLE_STATIC_LIBS ON)
|
||||
if(DEFINED VOLK_CONFIGPATH)
|
||||
get_filename_component(VOLK_CONFIGPATH ${VOLK_CONFIGPATH} ABSOLUTE)
|
||||
set(VOLK_CONFIGPATH "${VOLK_CONFIGPATH}/volk_gnsssdr")
|
||||
message(STATUS "System profiling is enabled, using path: ${VOLK_CONFIGPATH}")
|
||||
elseif(DEFINED ENV{VOLK_CONFIGPATH})
|
||||
set(VOLK_CONFIGPATH "$ENV{VOLK_CONFIGPATH}/volk_gnsssdr")
|
||||
message(STATUS "System profiling is enabled, using env path: $ENV{VOLK_CONFIGPATH}")
|
||||
else()
|
||||
message(STATUS "System profiling is enabled with default paths.")
|
||||
if(DEFINED ENV{HOME})
|
||||
set(VOLK_CONFIGPATH "$ENV{HOME}/.volk_gnsssdr")
|
||||
elseif(DEFINED ENV{APPDATA})
|
||||
set(VOLK_CONFIGPATH "$ENV{APPDATA}/.volk_gnsssdr")
|
||||
set(ENABLE_STATIC_LIBS ON)
|
||||
if(DEFINED VOLK_CONFIGPATH)
|
||||
get_filename_component(VOLK_CONFIGPATH ${VOLK_CONFIGPATH} ABSOLUTE)
|
||||
set(VOLK_CONFIGPATH "${VOLK_CONFIGPATH}/volk_gnsssdr")
|
||||
message(STATUS "System profiling is enabled, using path: ${VOLK_CONFIGPATH}")
|
||||
elseif(DEFINED ENV{VOLK_CONFIGPATH})
|
||||
set(VOLK_CONFIGPATH "$ENV{VOLK_CONFIGPATH}/volk_gnsssdr")
|
||||
message(STATUS "System profiling is enabled, using env path: $ENV{VOLK_CONFIGPATH}")
|
||||
else()
|
||||
message(STATUS "System profiling is enabled with default paths.")
|
||||
if(DEFINED ENV{HOME})
|
||||
set(VOLK_CONFIGPATH "$ENV{HOME}/.volk_gnsssdr")
|
||||
elseif(DEFINED ENV{APPDATA})
|
||||
set(VOLK_CONFIGPATH "$ENV{APPDATA}/.volk_gnsssdr")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "System profiling is disabled.")
|
||||
message(STATUS "System profiling is disabled.")
|
||||
endif()
|
||||
message(STATUS " Modify using: -DENABLE_PROFILING=ON/OFF")
|
||||
########################################################################
|
||||
|
@ -45,7 +45,7 @@ First, make sure that the required dependencies are installed in your
|
||||
machine:
|
||||
|
||||
~~~~~~
|
||||
$ sudo apt-get install cmake python-mako python-six libboost-dev \
|
||||
$ sudo apt-get install cmake python3-mako python3-six libboost-dev \
|
||||
libboost-filesystem-dev libboost-system-dev
|
||||
~~~~~~
|
||||
|
||||
@ -97,6 +97,25 @@ of a GNSS baseband processor:
|
||||
usage.](./docs/images/VOLK_GNSSSDR_Usage_Example.png)
|
||||
|
||||
|
||||
### Building on Raspberry Pi and other ARM boards
|
||||
|
||||
To build for these boards you need specify the correct CMake toolchain file for
|
||||
best performance.
|
||||
|
||||
* Raspberry Pi 4 `arm_cortex_a72_hardfp_native.cmake`
|
||||
* Raspberry Pi 3 `arm_cortex_a53_hardfp_native.cmake`
|
||||
|
||||
~~~~~~
|
||||
$ mkdir build && cd build
|
||||
$ cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchains/arm_cortex_a72_hardfp_native.cmake ..
|
||||
$ make
|
||||
$ make test
|
||||
$ sudo make install
|
||||
$ volk_gnsssdr_profile
|
||||
~~~~~~
|
||||
|
||||
|
||||
### References
|
||||
|
||||
If you use VOLK_GNSSSDR in your research and/or software, please cite
|
||||
the following paper:
|
||||
|
@ -20,21 +20,6 @@
|
||||
########################################################################
|
||||
# Setup profiler
|
||||
########################################################################
|
||||
if(MSVC)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/cmake/msvc)
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${PROJECT_SOURCE_DIR}/include
|
||||
${PROJECT_BINARY_DIR}/include
|
||||
${PROJECT_SOURCE_DIR}/lib
|
||||
${PROJECT_BINARY_DIR}/lib
|
||||
${Boost_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
|
||||
if(ORC_FOUND)
|
||||
set(orc_lib ${ORC_LIBRARIES})
|
||||
else()
|
||||
@ -58,6 +43,29 @@ add_executable(volk_gnsssdr_profile
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/volk_gnsssdr_option_helpers.cc
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
target_include_directories(volk_gnsssdr_profile
|
||||
PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/cmake/msvc>
|
||||
)
|
||||
endif(MSVC)
|
||||
|
||||
target_include_directories(volk_gnsssdr_profile
|
||||
PRIVATE $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
|
||||
PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
||||
PRIVATE $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/lib>
|
||||
PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/lib>
|
||||
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
if(NOT ${FILESYSTEM_FOUND})
|
||||
target_include_directories(volk_gnsssdr_profile
|
||||
PUBLIC ${Boost_INCLUDE_DIRS}
|
||||
)
|
||||
target_link_libraries(volk_gnsssdr_profile PRIVATE ${Boost_LIBRARIES})
|
||||
endif()
|
||||
|
||||
|
||||
if(${FILESYSTEM_FOUND})
|
||||
add_definitions(-DHAS_STD_FILESYSTEM=1)
|
||||
if(${find_experimental})
|
||||
@ -67,9 +75,9 @@ if(${FILESYSTEM_FOUND})
|
||||
endif()
|
||||
|
||||
if(ENABLE_STATIC_LIBS)
|
||||
target_link_libraries(volk_gnsssdr_profile PUBLIC volk_gnsssdr_static ${Boost_LIBRARIES} ${orc_lib})
|
||||
target_link_libraries(volk_gnsssdr_profile PUBLIC volk_gnsssdr_static ${orc_lib})
|
||||
else()
|
||||
target_link_libraries(volk_gnsssdr_profile PUBLIC volk_gnsssdr ${Boost_LIBRARIES} ${orc_lib})
|
||||
target_link_libraries(volk_gnsssdr_profile PUBLIC volk_gnsssdr ${orc_lib})
|
||||
add_dependencies(volk_gnsssdr_profile volk_gnsssdr)
|
||||
endif()
|
||||
|
||||
@ -77,7 +85,8 @@ endif()
|
||||
if(ENABLE_STRIP)
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||
set_target_properties(volk_gnsssdr_profile
|
||||
PROPERTIES LINK_FLAGS "-s")
|
||||
PROPERTIES LINK_FLAGS "-s"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -103,7 +112,8 @@ endif()
|
||||
if(ENABLE_STRIP)
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||
set_target_properties(volk_gnsssdr-config-info
|
||||
PROPERTIES LINK_FLAGS "-s")
|
||||
PROPERTIES LINK_FLAGS "-s"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -27,10 +27,9 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include <cstdbool> // for bool
|
||||
#include <iosfwd> // for ofstream
|
||||
#include <string> // for string
|
||||
#include <vector> // for vector
|
||||
#include <iosfwd> // for ofstream
|
||||
#include <string> // for string
|
||||
#include <vector> // for vector
|
||||
|
||||
class volk_gnsssdr_test_results_t;
|
||||
|
||||
|
@ -139,6 +139,9 @@ endif()
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11"))
|
||||
set(CMAKE_REQUIRED_FLAGS "-std=c++17")
|
||||
endif()
|
||||
if(MSVC AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "18"))
|
||||
set(CMAKE_REQUIRED_FLAGS "/std:c++17")
|
||||
endif()
|
||||
|
||||
# Normalize and check the component list we were given
|
||||
set(want_components ${FILESYSTEM_FIND_COMPONENTS})
|
||||
|
@ -69,12 +69,13 @@ if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
|
||||
else()
|
||||
message(STATUS "PYTHON_EXECUTABLE not set - using default python2")
|
||||
message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python3 to build for python3.")
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION})
|
||||
message(STATUS "PYTHON_EXECUTABLE not set - trying by default python3")
|
||||
message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python to build for python 2.7")
|
||||
set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6 3.7 3.8 3.9)
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN3_VERSION})
|
||||
if(NOT PYTHONINTERP_FOUND)
|
||||
message(STATUS "python2 not found - using python3")
|
||||
find_package(PythonInterp ${VOLK_PYTHON3_MIN_VERSION} REQUIRED)
|
||||
message(STATUS "python3 not found - trying with python2.7")
|
||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2011-2018 (see AUTHORS file for a list of contributors)
|
||||
# Copyright (C) 2011-2019 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
@ -15,25 +15,33 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
|
||||
endif()
|
||||
|
||||
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||
foreach(file ${files})
|
||||
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
|
||||
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||
execute_process(
|
||||
COMMAND @CMAKE_COMMAND@ -E remove \"$ENV{DESTDIR}${file}\"
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RESULT_VARIABLE rm_retval
|
||||
)
|
||||
if(NOT "${rm_retval}" STREQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
|
||||
endif(NOT "${rm_retval}" STREQUAL 0)
|
||||
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
|
||||
endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||
endforeach(file)
|
||||
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
|
||||
if(EXISTS "$ENV{DESTDIR}${file}")
|
||||
execute_process(
|
||||
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RESULT_VARIABLE rm_retval
|
||||
)
|
||||
if(NOT "${rm_retval}" STREQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
||||
endif()
|
||||
elseif(IS_SYMLINK "$ENV{DESTDIR}${file}")
|
||||
execute_process(
|
||||
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RESULT_VARIABLE rm_retval
|
||||
)
|
||||
if(NOT "${rm_retval}" STREQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
|
||||
endif()
|
||||
endforeach()
|
||||
|
@ -1,12 +1,12 @@
|
||||
/*! \page using_volk_gnsssdr Using VOLK_GNSSSDR
|
||||
|
||||
Using VOLK_GNSSSDR in your code requires proper linking and including the correct headers.
|
||||
Using VOLK_GNSSSDR in your code requires proper linking and including the correct headers.
|
||||
VOLK_GNSSSDR currently supports both C and C++ bindings.
|
||||
|
||||
VOLK_GNSSSDR provides both a pkgconfig and CMake module to help configuration and
|
||||
linking. The pkfconfig file is installed to
|
||||
linking. The pkgconfig file is installed to
|
||||
$install_prefix/lib/pkgconfig/volk_gnsssdr.pc. The CMake configuration module is in
|
||||
$install_prefix/lib/cmake/volk_gnsssdr/VolkConfig.cmake.
|
||||
$install_prefix/lib/cmake/volk_gnsssdr/VolkGnsssdrConfig.cmake.
|
||||
|
||||
The header in the VOLK_GNSSSDR include directory (includedir in pkgconfig,
|
||||
VOLK_GNSSSDR_INCLUDE_DIRS in cmake module) contains the header volk_gnsssdr/volk_gnsssdr.h defines all
|
||||
@ -16,4 +16,3 @@ the same location.
|
||||
In most cases it is sufficient to call the dispatcher for the kernel you are using.
|
||||
|
||||
*/
|
||||
|
||||
|
@ -45,6 +45,9 @@
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <complex.h>
|
||||
#endif
|
||||
#include <complex>
|
||||
#include <stdint.h>
|
||||
|
||||
|
@ -103,7 +103,7 @@ static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_g
|
||||
}
|
||||
tmp32_1 = *in_common++ * (*phase);
|
||||
phase_doppler *= phase_inc;
|
||||
phase_doppler_rate = cpowf(phase_inc_rate, lv_cmake(n * n, 0.0f));
|
||||
phase_doppler_rate = cpowf(phase_inc_rate, lv_cmake((float)(n * n), 0.0f));
|
||||
phase_doppler_rate /= hypotf(lv_creal(phase_doppler_rate), lv_cimag(phase_doppler_rate));
|
||||
(*phase) = phase_doppler * phase_doppler_rate;
|
||||
|
||||
|
@ -47,7 +47,7 @@ endif()
|
||||
# Setup the compiler name
|
||||
########################################################################
|
||||
set(COMPILER_NAME ${CMAKE_C_COMPILER_ID})
|
||||
if(MSVC) #its not set otherwise
|
||||
if(MSVC) # its not set otherwise
|
||||
set(COMPILER_NAME MSVC)
|
||||
endif()
|
||||
|
||||
@ -77,11 +77,11 @@ include(CheckSymbolExists)
|
||||
check_symbol_exists(posix_memalign stdlib.h HAVE_POSIX_MEMALIGN)
|
||||
|
||||
if(HAVE_POSIX_MEMALIGN)
|
||||
add_definitions(-DHAVE_POSIX_MEMALIGN)
|
||||
add_definitions(-DHAVE_POSIX_MEMALIGN)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED _XOPEN_SOURCE)
|
||||
add_definitions(-D_XOPEN_SOURCE=700)
|
||||
if(NOT DEFINED _XOPEN_SOURCE AND NOT MSVC)
|
||||
add_definitions(-D_XOPEN_SOURCE=700)
|
||||
endif()
|
||||
|
||||
########################################################################
|
||||
@ -111,7 +111,7 @@ macro(check_arch arch_name)
|
||||
else()
|
||||
include(CheckCXXCompilerFlag)
|
||||
set(have_flag have${flag})
|
||||
#make the have_flag have nice alphanum chars (just for looks/not necessary)
|
||||
# make the have_flag have nice alphanum chars (just for looks/not necessary)
|
||||
execute_process(
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "import re; print(re.sub('\\W', '_', '${have_flag}'))"
|
||||
OUTPUT_VARIABLE have_flag OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
@ -153,20 +153,22 @@ if(CPU_IS_x86)
|
||||
if(NOT MSVC)
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv.c "unsigned long long _xgetbv(unsigned int index) { unsigned int eax, edx; __asm__ __volatile__(\"xgetbv\" : \"=a\"(eax), \"=d\"(edx) : \"c\"(index)); return ((unsigned long long)edx << 32) | eax; } int main (void) { (void) _xgetbv(0); return (0); }")
|
||||
else()
|
||||
#MSVC defines an intrinsic
|
||||
# MSVC defines an intrinsic
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv.c "#include <stdio.h> \n #include <intrin.h> \n int main() { int avxSupported = 0; \n#if (_MSC_FULL_VER >= 160040219) \nint cpuInfo[4]; __cpuid(cpuInfo, 1);\nif ((cpuInfo[2] & (1 << 27) || 0) && (cpuInfo[2] & (1 << 28) || 0)) \n{\nunsigned long long xcrFeatureMask = _xgetbv(_XCR_XFEATURE_ENABLED_MASK);\n avxSupported = (xcrFeatureMask & 0x6) == 6;}\n#endif \n return 1- avxSupported; }")
|
||||
endif()
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -o
|
||||
${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv
|
||||
${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv.c
|
||||
OUTPUT_QUIET ERROR_QUIET
|
||||
RESULT_VARIABLE avx_compile_result)
|
||||
RESULT_VARIABLE avx_compile_result
|
||||
)
|
||||
if(NOT ${avx_compile_result} EQUAL 0)
|
||||
overrule_arch(avx "Compiler or linker missing xgetbv instruction")
|
||||
elseif(NOT CROSSCOMPILE_MULTILIB)
|
||||
execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv
|
||||
OUTPUT_QUIET ERROR_QUIET
|
||||
RESULT_VARIABLE avx_exe_result)
|
||||
RESULT_VARIABLE avx_exe_result
|
||||
)
|
||||
if(NOT ${avx_exe_result} EQUAL 0)
|
||||
overrule_arch(avx "CPU missing xgetbv")
|
||||
else()
|
||||
@ -177,7 +179,8 @@ if(CPU_IS_x86)
|
||||
set(HAVE_XGETBV 1)
|
||||
endif()
|
||||
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv
|
||||
${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv.c)
|
||||
${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv.c
|
||||
)
|
||||
|
||||
#########################################################################
|
||||
# eliminate AVX if cvtpi32_ps intrinsic fails like some versions of clang
|
||||
@ -187,48 +190,51 @@ if(CPU_IS_x86)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps.c "#include <immintrin.h>\nint main (void) {__m128 __a; __m64 __b; __m128 foo = _mm_cvtpi32_ps(__a, __b); return (0); }")
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -mavx -o
|
||||
${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps
|
||||
${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps.c
|
||||
OUTPUT_QUIET ERROR_QUIET
|
||||
RESULT_VARIABLE avx_compile_result)
|
||||
if(NOT ${avx_compile_result} EQUAL 0)
|
||||
overrule_arch(avx "Compiler missing cvtpi32_ps intrinsic")
|
||||
elseif(NOT CROSSCOMPILE_MULTILIB)
|
||||
execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps
|
||||
${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps
|
||||
${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps.c
|
||||
OUTPUT_QUIET ERROR_QUIET
|
||||
RESULT_VARIABLE avx_exe_result)
|
||||
if(NOT ${avx_exe_result} EQUAL 0)
|
||||
overrule_arch(avx "CPU missing cvtpi32_ps")
|
||||
else()
|
||||
set(HAVE_AVX_CVTPI32_PS 1)
|
||||
endif()
|
||||
RESULT_VARIABLE avx_compile_result
|
||||
)
|
||||
if(NOT ${avx_compile_result} EQUAL 0)
|
||||
overrule_arch(avx "Compiler missing cvtpi32_ps intrinsic")
|
||||
elseif(NOT CROSSCOMPILE_MULTILIB)
|
||||
execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps
|
||||
OUTPUT_QUIET ERROR_QUIET
|
||||
RESULT_VARIABLE avx_exe_result
|
||||
)
|
||||
if(NOT ${avx_exe_result} EQUAL 0)
|
||||
overrule_arch(avx "CPU missing cvtpi32_ps")
|
||||
else()
|
||||
set(HAVE_AVX_CVTPI32_PS 1)
|
||||
endif()
|
||||
else()
|
||||
set(HAVE_AVX_CVTPI32_PS 1)
|
||||
set(HAVE_AVX_CVTPI32_PS 1)
|
||||
endif()
|
||||
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps
|
||||
${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps.c)
|
||||
${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps.c
|
||||
)
|
||||
else()
|
||||
# 64-bit compilations won't need this command so don't overrule AVX
|
||||
set(HAVE_AVX_CVTPI32_PS 0)
|
||||
endif()
|
||||
|
||||
# Disable SSE4a if Clang is less than version 3.2
|
||||
if("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
|
||||
# Figure out the version of Clang
|
||||
if(CMAKE_VERSION VERSION_LESS "2.8.10")
|
||||
# Extract the Clang version from the --version string.
|
||||
# In cmake 2.8.10, we can just use CMAKE_C_COMPILER_VERSION
|
||||
# without having to go through these string manipulations
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} --version
|
||||
OUTPUT_VARIABLE clang_version)
|
||||
string(REGEX MATCH "[0-9].[0-9]" CMAKE_C_COMPILER_VERSION ${clang_version})
|
||||
endif()
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
# Figure out the version of Clang
|
||||
if(CMAKE_VERSION VERSION_LESS "2.8.10")
|
||||
# Extract the Clang version from the --version string.
|
||||
# In cmake 2.8.10, we can just use CMAKE_C_COMPILER_VERSION
|
||||
# without having to go through these string manipulations
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} --version
|
||||
OUTPUT_VARIABLE clang_version
|
||||
)
|
||||
string(REGEX MATCH "[0-9].[0-9]" CMAKE_C_COMPILER_VERSION ${clang_version})
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_VERSION VERSION_LESS "3.2")
|
||||
overrule_arch(sse4_a "Clang >= 3.2 required for SSE4a")
|
||||
endif()
|
||||
if(CMAKE_C_COMPILER_VERSION VERSION_LESS "3.2")
|
||||
overrule_arch(sse4_a "Clang >= 3.2 required for SSE4a")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if(${HAVE_XGETBV})
|
||||
@ -310,7 +316,7 @@ if(NOT CROSSCOMPILE_MULTILIB AND CPU_IS_x86)
|
||||
overrule_arch(64 "CPU width is 32 bits")
|
||||
endif()
|
||||
|
||||
#MSVC 64 bit does not have MMX, overrule it
|
||||
# MSVC 64 bit does not have MMX, overrule it
|
||||
if(${SIZEOF_CPU} EQUAL 64 AND MSVC)
|
||||
overrule_arch(mmx "No MMX for Win64")
|
||||
if(MSVC_VERSION GREATER 1700)
|
||||
@ -361,7 +367,7 @@ message(STATUS "Available machines: ${available_machines}")
|
||||
# Create rules to run the volk_gnsssdr generator
|
||||
########################################################################
|
||||
|
||||
#dependencies are all python, xml, and header implementation files
|
||||
# dependencies are all python, xml, and header implementation files
|
||||
file(GLOB xml_files ${PROJECT_SOURCE_DIR}/gen/*.xml)
|
||||
list(SORT xml_files)
|
||||
file(GLOB py_files ${PROJECT_SOURCE_DIR}/gen/*.py)
|
||||
@ -397,29 +403,30 @@ message(STATUS "BUILD TYPE = ${CBTU}")
|
||||
message(STATUS "Base cflags = ${CMAKE_C_FLAGS_${CBTU}} ${CMAKE_C_FLAGS}")
|
||||
set(COMPILER_INFO "")
|
||||
if(MSVC)
|
||||
if(MSVC90) #Visual Studio 9
|
||||
if(MSVC90) # Visual Studio 9
|
||||
set(cmake_c_compiler_version "Microsoft Visual Studio 9.0")
|
||||
elseif(MSVC10) #Visual Studio 10
|
||||
elseif(MSVC10) # Visual Studio 10
|
||||
set(cmake_c_compiler_version "Microsoft Visual Studio 10.0")
|
||||
elseif(MSVC11) #Visual Studio 11
|
||||
elseif(MSVC11) # Visual Studio 11
|
||||
set(cmake_c_compiler_version "Microsoft Visual Studio 11.0")
|
||||
elseif(MSVC12) #Visual Studio 12
|
||||
elseif(MSVC12) # Visual Studio 12
|
||||
set(cmake_c_compiler_version "Microsoft Visual Studio 12.0")
|
||||
elseif(MSVC14) #Visual Studio 14
|
||||
elseif(MSVC14) # Visual Studio 14
|
||||
set(cmake_c_compiler_version "Microsoft Visual Studio 14.0")
|
||||
endif()
|
||||
else()
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} --version
|
||||
OUTPUT_VARIABLE cmake_c_compiler_version)
|
||||
OUTPUT_VARIABLE cmake_c_compiler_version
|
||||
)
|
||||
endif()
|
||||
set(COMPILER_INFO "${CMAKE_C_COMPILER}:::${CMAKE_C_FLAGS_${GRCBTU}} ${CMAKE_C_FLAGS}\n${CMAKE_CXX_COMPILER}:::${CMAKE_CXX_FLAGS_${GRCBTU}} ${CMAKE_CXX_FLAGS}\n")
|
||||
|
||||
foreach(machine_name ${available_machines})
|
||||
#generate machine source
|
||||
# generate machine source
|
||||
set(machine_source ${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_machine_${machine_name}.c)
|
||||
gen_template(${PROJECT_SOURCE_DIR}/tmpl/volk_gnsssdr_machine_xxx.tmpl.c ${machine_source} ${machine_name})
|
||||
|
||||
#determine machine flags
|
||||
# determine machine flags
|
||||
execute_process(
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
|
||||
${PROJECT_SOURCE_DIR}/gen/volk_gnsssdr_compile_utils.py
|
||||
@ -434,7 +441,7 @@ foreach(machine_name ${available_machines})
|
||||
set_source_files_properties(${machine_source} PROPERTIES COMPILE_FLAGS "${${machine_name}_flags}")
|
||||
endif()
|
||||
|
||||
#add to available machine defs
|
||||
# add to available machine defs
|
||||
string(TOUPPER LV_MACHINE_${machine_name} machine_def)
|
||||
list(APPEND machine_defs ${machine_def})
|
||||
endforeach()
|
||||
@ -446,84 +453,72 @@ message(STATUS "Compiler Version: ${cmake_c_compiler_version}")
|
||||
string(REPLACE "\n" " \\n" cmake_c_compiler_version ${cmake_c_compiler_version})
|
||||
string(REPLACE "\n" " \\n" COMPILER_INFO ${COMPILER_INFO})
|
||||
|
||||
########################################################################
|
||||
# Set local include directories first
|
||||
########################################################################
|
||||
include_directories(
|
||||
${PROJECT_BINARY_DIR}/include
|
||||
${PROJECT_SOURCE_DIR}/include
|
||||
${PROJECT_SOURCE_DIR}/kernels
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
########################################################################
|
||||
# Handle ASM support
|
||||
# on by default, but let users turn it off
|
||||
########################################################################
|
||||
if(${CMAKE_VERSION} VERSION_GREATER "2.8.9")
|
||||
set(ASM_ARCHS_AVAILABLE "neonv7" "neonv8")
|
||||
set(ASM_ARCHS_AVAILABLE "neonv7" "neonv8")
|
||||
|
||||
set(FULL_C_FLAGS "${CMAKE_C_FLAGS}" "${CMAKE_CXX_COMPILER_ARG1}")
|
||||
set(FULL_C_FLAGS "${CMAKE_C_FLAGS}" "${CMAKE_CXX_COMPILER_ARG1}")
|
||||
|
||||
# sort through a list of all architectures we have ASM for
|
||||
# if we find one that matches our current system architecture
|
||||
# set up the assembler flags and include the source files
|
||||
foreach(ARCH ${ASM_ARCHS_AVAILABLE})
|
||||
string(REGEX MATCH "${ARCH}" ASM_ARCH "${available_archs}")
|
||||
if(ASM_ARCH STREQUAL "neonv7")
|
||||
message(STATUS "---- Adding ASM files") # we always use ATT syntax
|
||||
message(STATUS "-- Detected neon architecture; enabling ASM")
|
||||
# architecture specific assembler flags are now set in the cmake toolchain file
|
||||
# then add the files
|
||||
include_directories(${PROJECT_SOURCE_DIR}/kernels/volk_gnsssdr/asm/neon)
|
||||
file(GLOB asm_files ${PROJECT_SOURCE_DIR}/kernels/volk_gnsssdr/asm/neon/*.s)
|
||||
list(SORT asm_files)
|
||||
foreach(asm_file ${asm_files})
|
||||
list(APPEND volk_gnsssdr_sources ${asm_file})
|
||||
message(STATUS "Adding source file: ${asm_file}")
|
||||
endforeach()
|
||||
endif()
|
||||
enable_language(ASM)
|
||||
message(STATUS "c flags: ${FULL_C_FLAGS}")
|
||||
message(STATUS "asm flags: ${CMAKE_ASM_FLAGS}")
|
||||
endforeach()
|
||||
# sort through a list of all architectures we have ASM for
|
||||
# if we find one that matches our current system architecture
|
||||
# set up the assembler flags and include the source files
|
||||
foreach(ARCH ${ASM_ARCHS_AVAILABLE})
|
||||
string(REGEX MATCH "${ARCH}" ASM_ARCH "${available_archs}")
|
||||
if(ASM_ARCH STREQUAL "neonv7")
|
||||
message(STATUS "---- Adding ASM files") # we always use ATT syntax
|
||||
message(STATUS "-- Detected neon architecture; enabling ASM")
|
||||
# architecture specific assembler flags are now set in the cmake toolchain file
|
||||
# then add the files
|
||||
include_directories(${PROJECT_SOURCE_DIR}/kernels/volk_gnsssdr/asm/neon)
|
||||
file(GLOB asm_files ${PROJECT_SOURCE_DIR}/kernels/volk_gnsssdr/asm/neon/*.s)
|
||||
list(SORT asm_files)
|
||||
foreach(asm_file ${asm_files})
|
||||
list(APPEND volk_gnsssdr_sources ${asm_file})
|
||||
message(STATUS "Adding source file: ${asm_file}")
|
||||
endforeach()
|
||||
endif()
|
||||
enable_language(ASM)
|
||||
message(STATUS "c flags: ${FULL_C_FLAGS}")
|
||||
message(STATUS "asm flags: ${CMAKE_ASM_FLAGS}")
|
||||
endforeach()
|
||||
|
||||
else()
|
||||
message(STATUS "Not enabling ASM support. CMake >= 2.8.10 required.")
|
||||
foreach(machine_name ${available_machines})
|
||||
string(REGEX MATCH "neon" NEON_MACHINE ${machine_name})
|
||||
if(NEON_MACHINE STREQUAL "neon")
|
||||
message(FATAL_ERROR "CMake >= 2.8.10 is required for ARM NEON support")
|
||||
endif()
|
||||
endforeach()
|
||||
message(STATUS "Not enabling ASM support. CMake >= 2.8.10 required.")
|
||||
foreach(machine_name ${available_machines})
|
||||
string(REGEX MATCH "neon" NEON_MACHINE ${machine_name})
|
||||
if(NEON_MACHINE STREQUAL "neon")
|
||||
message(FATAL_ERROR "CMake >= 2.8.10 is required for ARM NEON support")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
########################################################################
|
||||
# Handle orc support
|
||||
########################################################################
|
||||
if(ORC_FOUND)
|
||||
#setup orc library usage
|
||||
# setup orc library usage
|
||||
include_directories(${ORC_INCLUDE_DIRS})
|
||||
link_directories(${ORC_LIBRARY_DIRS})
|
||||
list(APPEND volk_gnsssdr_libraries ${ORC_LIBRARIES})
|
||||
|
||||
#setup orc functions
|
||||
# setup orc functions
|
||||
file(GLOB orc_files ${PROJECT_SOURCE_DIR}/kernels/volk_gnsssdr/asm/orc/*.orc)
|
||||
list(SORT orc_files)
|
||||
foreach(orc_file ${orc_files})
|
||||
|
||||
#extract the name for the generated c source from the orc file
|
||||
# extract the name for the generated c source from the orc file
|
||||
get_filename_component(orc_file_name_we ${orc_file} NAME_WE)
|
||||
set(orcc_gen ${CMAKE_CURRENT_BINARY_DIR}/${orc_file_name_we}.c)
|
||||
|
||||
#create a rule to generate the source and add to the list of sources
|
||||
# create a rule to generate the source and add to the list of sources
|
||||
add_custom_command(
|
||||
COMMAND ${ORCC_EXECUTABLE} --include math.h --implementation -o ${orcc_gen} ${orc_file}
|
||||
DEPENDS ${orc_file} OUTPUT ${orcc_gen}
|
||||
)
|
||||
list(APPEND volk_gnsssdr_sources ${orcc_gen})
|
||||
|
||||
endforeach()
|
||||
else()
|
||||
message(STATUS "Did not find liborc and orcc, disabling orc support...")
|
||||
@ -535,13 +530,14 @@ endif()
|
||||
|
||||
message(STATUS "Loading version ${VERSION} into constants...")
|
||||
|
||||
#double escape for windows backslash path separators
|
||||
# double escape for windows backslash path separators
|
||||
string(REPLACE "\\" "\\\\" prefix "${prefix}")
|
||||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/constants.c.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/constants.c
|
||||
@ONLY)
|
||||
@ONLY
|
||||
)
|
||||
|
||||
list(APPEND volk_gnsssdr_sources ${CMAKE_CURRENT_BINARY_DIR}/constants.c)
|
||||
|
||||
@ -560,60 +556,61 @@ list(APPEND volk_gnsssdr_sources
|
||||
${volk_gnsssdr_gen_sources}
|
||||
)
|
||||
|
||||
#set the machine definitions where applicable
|
||||
# set the machine definitions where applicable
|
||||
set_source_files_properties(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_machines.c
|
||||
PROPERTIES COMPILE_DEFINITIONS "${machine_defs}")
|
||||
PROPERTIES COMPILE_DEFINITIONS "${machine_defs}"
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
#add compatibility includes for stdint types
|
||||
# add compatibility includes for stdint types
|
||||
include_directories(${PROJECT_SOURCE_DIR}/cmake/msvc)
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
#compile the sources as C++ due to the lack of complex.h under MSVC
|
||||
# compile the sources as C++ due to the lack of complex.h under MSVC
|
||||
set_source_files_properties(${volk_gnsssdr_sources} PROPERTIES LANGUAGE CXX)
|
||||
endif()
|
||||
|
||||
#Create a volk_gnsssdr object library
|
||||
# Create a volk_gnsssdr object library
|
||||
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 $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
|
||||
PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
||||
PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/kernels>
|
||||
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
# Configure object target properties
|
||||
if(NOT MSVC)
|
||||
set_target_properties(volk_gnsssdr_obj PROPERTIES COMPILE_FLAGS "-fPIC")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#Add dynamic library
|
||||
# Add dynamic library
|
||||
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_link_libraries(volk_gnsssdr PUBLIC ${volk_gnsssdr_libraries})
|
||||
target_include_directories(volk_gnsssdr
|
||||
PUBLIC $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
|
||||
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
||||
PUBLIC $<INSTALL_INTERFACE:include>
|
||||
PRIVATE ${PROJECT_SOURCE_DIR}/kernels
|
||||
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/kernels>
|
||||
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PUBLIC $<INSTALL_INTERFACE:include>
|
||||
)
|
||||
|
||||
#Configure target properties
|
||||
# Configure target properties
|
||||
if(NOT MSVC)
|
||||
if(NOT (CMAKE_GENERATOR STREQUAL Xcode))
|
||||
set_target_properties(volk_gnsssdr_obj PROPERTIES COMPILE_FLAGS "-fPIC")
|
||||
endif()
|
||||
target_link_libraries(volk_gnsssdr m)
|
||||
target_link_libraries(volk_gnsssdr PUBLIC m)
|
||||
endif()
|
||||
set_target_properties(volk_gnsssdr PROPERTIES SOVERSION ${LIBVER})
|
||||
set_target_properties(volk_gnsssdr PROPERTIES DEFINE_SYMBOL "volk_gnsssdr_EXPORTS")
|
||||
|
||||
#Install locations
|
||||
# Install locations
|
||||
install(TARGETS volk_gnsssdr
|
||||
EXPORT VOLK_GNSSSDR-export
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT "volk_gnsssdr_runtime" # .so file
|
||||
@ -621,22 +618,22 @@ install(TARGETS volk_gnsssdr
|
||||
RUNTIME DESTINATION bin COMPONENT "volk_gnsssdr_runtime" # .dll file
|
||||
)
|
||||
|
||||
#Configure static library
|
||||
# Configure static library
|
||||
if(ENABLE_STATIC_LIBS)
|
||||
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)
|
||||
target_link_libraries(volk_gnsssdr_static PUBLIC ${volk_gnsssdr_libraries} pthread)
|
||||
if(NOT MSVC)
|
||||
target_link_libraries(volk_gnsssdr_static m)
|
||||
target_link_libraries(volk_gnsssdr_static PUBLIC m)
|
||||
endif()
|
||||
target_include_directories(volk_gnsssdr_static
|
||||
PUBLIC $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
|
||||
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
||||
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/kernels>
|
||||
PUBLIC $<INSTALL_INTERFACE:include>
|
||||
PRIVATE ${PROJECT_SOURCE_DIR}/kernels
|
||||
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
@ -653,24 +650,18 @@ endif()
|
||||
# Build the QA test application
|
||||
########################################################################
|
||||
if(ENABLE_TESTING)
|
||||
#include Boost headers
|
||||
include_directories(${Boost_INCLUDE_DIRS})
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/.unittest)
|
||||
set_source_files_properties(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/testqa.cc PROPERTIES
|
||||
COMPILE_DEFINITIONS "BOOST_TEST_DYN_LINK;BOOST_TEST_MAIN"
|
||||
)
|
||||
|
||||
include(VolkAddTest)
|
||||
volk_gen_test("volk_gnsssdr_test_all"
|
||||
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
|
||||
)
|
||||
|
||||
foreach(kernel ${h_files})
|
||||
get_filename_component(kernel ${kernel} NAME)
|
||||
string(REPLACE ".h" "" kernel ${kernel})
|
||||
volk_add_test(${kernel} "volk_gnsssdr_test_all")
|
||||
get_filename_component(kernel ${kernel} NAME)
|
||||
string(REPLACE ".h" "" kernel ${kernel})
|
||||
volk_add_test(${kernel} volk_gnsssdr_test_all)
|
||||
endforeach()
|
||||
endif()
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
#include "volk_gnsssdr/volk_gnsssdr.h" // for volk_gnsssdr_func_desc_t
|
||||
#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t
|
||||
#include <cstdbool> // for bool, false
|
||||
#include <cstdlib> // for NULL
|
||||
#include <map> // for map
|
||||
#include <string> // for string, basic_string
|
||||
@ -145,14 +144,6 @@ bool run_volk_gnsssdr_tests(
|
||||
bool benchmark_mode = false);
|
||||
|
||||
|
||||
#define VOLK_RUN_TESTS(func, tol, scalar, len, iter) \
|
||||
BOOST_AUTO_TEST_CASE(func##_test) \
|
||||
{ \
|
||||
BOOST_CHECK_EQUAL(run_volk_gnsssdr_tests( \
|
||||
func##_get_func_desc(), (void (*)())func##_manual, \
|
||||
std::string(#func), tol, scalar, len, iter, 0, "NULL"), \
|
||||
0); \
|
||||
}
|
||||
#define VOLK_PROFILE(func, test_params, results) run_volk_gnsssdr_tests(func##_get_func_desc(), (void (*)())func##_manual, std::string(#func), test_params, results, "NULL")
|
||||
#define VOLK_PUPPET_PROFILE(func, puppet_master_func, test_params, results) run_volk_gnsssdr_tests(func##_get_func_desc(), (void (*)())func##_manual, std::string(#func), test_params, results, std::string(#puppet_master_func))
|
||||
typedef void (*volk_gnsssdr_fn_1arg)(void *, unsigned int, const char *); // one input, operate in place
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include "kernel_tests.h" // for init_test_list
|
||||
#include "qa_utils.h" // for volk_gnsssdr_test_case_t, volk_gnsssdr_test_results_t
|
||||
#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t
|
||||
#include <cstdbool> // for bool, false, true
|
||||
#include <fstream> // IWYU pragma: keep
|
||||
#include <iostream> // for operator<<, basic_ostream, endl, char...
|
||||
#include <map> // for map, map<>::iterator, _Rb_tree_iterator
|
||||
|
@ -28,7 +28,6 @@ class volk_gnsssdr_modtool(object):
|
||||
def __init__(self, cfg):
|
||||
self.volk_gnsssdr = re.compile('volk_gnsssdr');
|
||||
self.remove_after_underscore = re.compile("_.*");
|
||||
self.volk_gnsssdr_run_tests = re.compile(r'^\s*VOLK_RUN_TESTS.*\n', re.MULTILINE);
|
||||
self.volk_gnsssdr_profile = re.compile(r'^\s*(VOLK_PROFILE|VOLK_PUPPET_PROFILE).*\n', re.MULTILINE);
|
||||
self.my_dict = cfg;
|
||||
self.lastline = re.compile(r'\s*char path\[1024\];.*');
|
||||
|
@ -59,6 +59,7 @@ static inline unsigned long long _xgetbv(unsigned int index)
|
||||
#elif defined(_MSC_VER) && defined(HAVE_INTRIN_H)
|
||||
#include <intrin.h>
|
||||
#define cpuid_x86(op, r) __cpuid(((int *)r), op)
|
||||
#define cpuid_x86_count(op, count, regs) __cpuidex((int *)regs, op, count)
|
||||
|
||||
#if defined(_XCR_XFEATURE_ENABLED_MASK)
|
||||
#define __xgetbv() _xgetbv(_XCR_XFEATURE_ENABLED_MASK)
|
||||
|
@ -38,13 +38,14 @@ else()
|
||||
endif()
|
||||
|
||||
if(NOT GOOGLETEST_FOUND)
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set(DEBUG_POSTFIX "d")
|
||||
if((CMAKE_GENERATOR STREQUAL Xcode) OR MSVC)
|
||||
set(GTEST_BUILD_COMMAND "${CMAKE_COMMAND}" "--build" "${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}" "--config" $<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel>)
|
||||
else()
|
||||
set(GTEST_BUILD_COMMAND "${CMAKE_COMMAND}" "--build" "${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}" "--config" "${CMAKE_BUILD_TYPE}")
|
||||
set(GTEST_BUILD_CONFIG -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
|
||||
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")
|
||||
set(GTEST_BUILD_COMMAND "xcodebuild" "-configuration" $<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>$<$<CONFIG:MinSizeRel>:MinSizeRel> "-target" "gtest_main")
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.2)
|
||||
@ -53,24 +54,33 @@ if(NOT GOOGLETEST_FOUND)
|
||||
GIT_TAG v1.10.x
|
||||
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}
|
||||
CMAKE_ARGS ${GTEST_COMPILER} -DINSTALL_GTEST=OFF -DBUILD_GMOCK=OFF -Dgtest_hide_internal_symbols=ON ${TOOLCHAIN_ARG} ${GTEST_BUILD_CONFIG}
|
||||
BUILD_COMMAND ${GTEST_BUILD_COMMAND}
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
else()
|
||||
set(GOOGLETEST_BUILD_BYPRODUCTS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug) # Workaround for Ninja generator
|
||||
set(GOOGLETEST_BUILD_BYPRODUCTS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtestd${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_maind${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
endif()
|
||||
ExternalProject_Add(gtest-${GNSSSDR_GTEST_LOCAL_VERSION}
|
||||
GIT_REPOSITORY https://github.com/google/googletest
|
||||
GIT_TAG v1.10.x
|
||||
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}
|
||||
CMAKE_ARGS ${GTEST_COMPILER} -DINSTALL_GTEST=OFF -DBUILD_GMOCK=OFF -Dgtest_hide_internal_symbols=ON ${TOOLCHAIN_ARG} ${GTEST_BUILD_CONFIG}
|
||||
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}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../../gtest-${GNSSSDR_GTEST_LOCAL_VERSION}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
BUILD_BYPRODUCTS ${GOOGLETEST_BUILD_BYPRODUCTS}
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
endif()
|
||||
@ -82,10 +92,23 @@ 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/${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/${XCODE_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest${DEBUG_POSTFIX}${CMAKE_DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
IMPORTED_CONFIGURATIONS "Debug;Release;RelWithDebInfo;MinSizeRel"
|
||||
IMPORTED_LOCATION_DEBUG ${binary_dir}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtestd${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELEASE ${binary_dir}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELWITHDEBINFO ${binary_dir}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_MINSIZEREL ${binary_dir}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${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/gtest$<$<CONFIG:Debug>:d>${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
if((CMAKE_GENERATOR STREQUAL Xcode) OR MSVC)
|
||||
set_target_properties(GTest::GTest PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG ${binary_dir}/lib/Debug/${CMAKE_FIND_LIBRARY_PREFIXES}gtestd${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELEASE ${binary_dir}/lib/Release/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELWITHDEBINFO ${binary_dir}/lib/RelWithDebInfo/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_MINSIZEREL ${binary_dir}/lib/MinSizeRel/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
INTERFACE_LINK_LIBRARIES ${binary_dir}/lib/$<$<CONFIG:Debug>:Debug/>$<$<CONFIG:Release>:Release/>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo/>$<$<CONFIG:MinSizeRel>:MinSizeRel/>gtest$<$<CONFIG:Debug>:d>${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
endif()
|
||||
set_target_properties(GTest::GTest PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES Threads::Threads
|
||||
)
|
||||
@ -95,10 +118,23 @@ 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/${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/${XCODE_PREFIX}${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
IMPORTED_CONFIGURATIONS "Debug;Release;RelWithDebInfo;MinSizeRel"
|
||||
IMPORTED_LOCATION_DEBUG ${binary_dir}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_maind${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELEASE ${binary_dir}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELWITHDEBINFO ${binary_dir}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_MINSIZEREL ${binary_dir}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${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/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main$<$<CONFIG:Debug>:d>${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
if((CMAKE_GENERATOR STREQUAL Xcode) OR MSVC)
|
||||
set_target_properties(GTest::Main PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG ${binary_dir}/lib/Debug/${CMAKE_FIND_LIBRARY_PREFIXES}gtestd${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELEASE ${binary_dir}/lib/Release/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELWITHDEBINFO ${binary_dir}/lib/RelWithDebInfo/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_MINSIZEREL ${binary_dir}/lib/MinSizeRel/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
INTERFACE_LINK_LIBRARIES ${binary_dir}/lib/$<$<CONFIG:Debug>:Debug/>$<$<CONFIG:Release>:Release/>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo/>$<$<CONFIG:MinSizeRel>:MinSizeRel/>${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main$<$<CONFIG:Debug>:d>${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
if(GTEST_INCLUDE_DIRS)
|
||||
@ -118,10 +154,20 @@ else()
|
||||
add_dependencies(GTest::GTest gtest)
|
||||
set_target_properties(GTest::GTest PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GTEST_INCLUDE_DIRS}"
|
||||
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}"
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${GTEST_INCLUDE_DIRS}
|
||||
INTERFACE_LINK_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
if((CMAKE_GENERATOR STREQUAL Xcode) OR MSVC)
|
||||
set_target_properties(GTest::GTest PROPERTIES
|
||||
IMPORTED_CONFIGURATIONS "Debug;Release;RelWithDebInfo;MinSizeRel"
|
||||
IMPORTED_LOCATION_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/Debug/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/Release/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELWITHDEBINFO ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_MINSIZEREL ${CMAKE_CURRENT_BINARY_DIR}/MinSizeRel/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
INTERFACE_LINK_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/$<$<CONFIG:Debug>:Debug/>$<$<CONFIG:Release>:Release/>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo/>$<$<CONFIG:MinSizeRel>:MinSizeRel/>${CMAKE_FIND_LIBRARY_PREFIXES}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
endif()
|
||||
set_target_properties(GTest::GTest PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES Threads::Threads
|
||||
)
|
||||
@ -131,10 +177,20 @@ else()
|
||||
add_dependencies(GTest::Main gtest_main)
|
||||
set_target_properties(GTest::Main PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GTEST_INCLUDE_DIRS}"
|
||||
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}"
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${GTEST_INCLUDE_DIRS}
|
||||
INTERFACE_LINK_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
if((CMAKE_GENERATOR STREQUAL Xcode) OR MSVC)
|
||||
set_target_properties(GTest::Main PROPERTIES
|
||||
IMPORTED_CONFIGURATIONS "Debug;Release;RelWithDebInfo;MinSizeRel"
|
||||
IMPORTED_LOCATION_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/Debug/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/Release/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_RELWITHDEBINFO ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
IMPORTED_LOCATION_MINSIZEREL ${CMAKE_CURRENT_BINARY_DIR}/MinSizeRel/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
INTERFACE_LINK_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/$<$<CONFIG:Debug>:Debug/>$<$<CONFIG:Release>:Release/>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo/>$<$<CONFIG:MinSizeRel>:MinSizeRel/>${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@ -838,7 +894,7 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
|
||||
if(ARMADILLO_VERSION_STRING VERSION_GREATER 8.400)
|
||||
set(NONLINEAR_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/cubature_filter_test.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/signal-processing-blocks/tracking/unscented_filter_test.cc
|
||||
)
|
||||
endif()
|
||||
add_executable(trk_test
|
||||
|
Loading…
Reference in New Issue
Block a user