1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-06 07:20:34 +00:00

Merge remote-tracking branch 'cf/cmakelint' into next

Add CI job using cmakelint for CMake scripts formatting and fix raised errors
This commit is contained in:
Carles Fernandez 2020-03-01 13:50:00 +01:00
commit ad97144f8f
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
17 changed files with 93 additions and 53 deletions

View File

@ -83,6 +83,18 @@ jobs:
run: find . -iname "*.md" | xargs prettier --parser markdown --print-width 80 --prose-wrap always --list-different
cmakelint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install dependencies
run: |
sudo python -m pip install --upgrade pip
sudo pip install cmakelint
- name: check CMake scripts
run: find . -iname "CMakeLists.txt" -o -iname "*.cmake" | xargs cmakelint --filter=-linelength,-readability/wonkycase
volk-gnsssdr-windows:
runs-on: windows-latest
steps:

View File

@ -255,6 +255,9 @@ cmake_pop_check_state()
set(FILESYSTEM_FOUND ${_found} CACHE BOOL "TRUE if we can compile and link a program using std::filesystem" FORCE)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(FILESYSTEM DEFAULT_MSG FILESYSTEM_FOUND)
if(FILESYSTEM_FIND_REQUIRED AND NOT FILESYSTEM_FOUND)
message(FATAL_ERROR "Cannot compile a simple program using std::filesystem")
endif()

View File

@ -13,6 +13,7 @@
if(NOT COMMAND feature_summary)
include(FeatureSummary)
endif()
include(FindPackageHandleStandardArgs)
# if GR_REQUIRED_COMPONENTS is not defined, it will be set to the following list
if(NOT GR_REQUIRED_COMPONENTS)
@ -236,10 +237,6 @@ if(NOT PC_GNURADIO_RUNTIME_VERSION)
endif()
endif()
# Trick for feature_summary
if(NOT DEFINED GNURADIO_FOUND)
set(GNURADIO_FOUND TRUE)
endif()
set(GNURADIO_VERSION ${PC_GNURADIO_RUNTIME_VERSION})
if(NOT GNSSSDR_GNURADIO_MIN_VERSION)
@ -271,6 +268,7 @@ else()
)
endif()
find_package_handle_standard_args(GNURADIO DEFAULT_MSG GNURADIO_RUNTIME_FOUND)
# Search for IIO component
if(GNURADIO_VERSION VERSION_GREATER 3.8.99)

View File

@ -105,7 +105,7 @@ if(_OPENCL_CPP_INCLUDE_DIRS)
list(REMOVE_DUPLICATES OPENCL_INCLUDE_DIRS)
endif()
_FIND_OPENCL_VERSION()
_find_opencl_version()
if(WIN32)
if(CMAKE_SIZEOF_VOID_P EQUAL 4)

View File

@ -23,12 +23,16 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(ZYNQ_FLAGS "-march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7")
set(ZYNQ_FLAGS
"-march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7"
)
set(CMAKE_ASM_FLAGS ${ZYNQ_FLAGS} CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS ${ZYNQ_FLAGS} CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS ${ZYNQ_FLAGS} CACHE STRING "" FORCE)
set(CMAKE_LIBRARY_PATH ${CMAKE_SYSROOT}/usr/lib
${CMAKE_SYSROOT}/usr/lib/arm-linux-gnueabihf)
set(CMAKE_LIBRARY_PATH
${CMAKE_SYSROOT}/usr/lib
${CMAKE_SYSROOT}/usr/lib/arm-linux-gnueabihf
)
set(CMAKE_INSTALL_PREFIX ${CMAKE_SYSROOT}/usr CACHE STRING "" FORCE)

View File

@ -104,14 +104,16 @@ SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades <carles.fernandez@cttc
- Updated links in comments along the source code and in CMake scripts.
- Update GSL implementation to 0.36.0. See
https://github.com/gsl-lite/gsl-lite/releases/tag/v0.36.0
- Create a CI job in GitHub to ensure that `clang-tidy` has been applied in most
- Create a CI job on GitHub to ensure that `clang-tidy` has been applied in most
of the source code (some optional blocks and tests are left apart).
- Create a CI job in GitHub to ensure that `clang-format` has been applied.
- Create a CI job in GitHub to ensure that `cpplint` filters have been applied.
- Create a CI job in GitHub to ensure compliance with REUSE Specification (see
- Create a CI job on GitHub to ensure that `clang-format` has been applied.
- Create a CI job on GitHub to ensure that `cpplint` filters have been applied.
- Create a CI job on GitHub to ensure compliance with REUSE Specification (see
https://reuse.software)
- Create a CI job in GitHub using `prettier` (https://prettier.io/) to check
- Create a CI job on GitHub using `prettier` (https://prettier.io/) to check
markdown files formatting.
- Create a CI job on GitHub to check the formatting of CMake scripts using
`cmakelint` (see https://github.com/richq/cmake-lint).
### Improvements in Openness:
@ -192,6 +194,8 @@ SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades <carles.fernandez@cttc
See the definitions of concepts and metrics at
https://gnss-sdr.org/design-forces/
&nbsp;
## [GNSS-SDR v0.0.11](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.11)
This release has several improvements in different dimensions, addition of new
@ -339,6 +343,8 @@ features and bug fixes:
See the definitions of concepts and metrics at
https://gnss-sdr.org/design-forces/
&nbsp;
## [GNSS-SDR v0.0.10](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.10)
This release has several improvements in different dimensions, addition of new
@ -569,6 +575,8 @@ features and bug fixes:
See the definitions of concepts and metrics at
https://gnss-sdr.org/design-forces/
&nbsp;
## [GNSS-SDR v0.0.9](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.9)
DOI: https://doi.org/10.5281/zenodo.291371
@ -688,6 +696,8 @@ many dimensions:
See the definitions of concepts and metrics at
https://gnss-sdr.org/design-forces/
&nbsp;
## [GNSS-SDR v0.0.8](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.8)
DOI: https://doi.org/10.5281/zenodo.57022
@ -712,6 +722,8 @@ respect to v0.0.7. The main changes are:
- VOLK_GNSSSDR: Added an option to trigger profiling at building time.
- VOLK_GNSSSDR: Fix the CMake-based check for posix_memalign.
&nbsp;
## [GNSS-SDR v0.0.7](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.7)
DOI: https://doi.org/10.5281/zenodo.51521
@ -802,6 +814,8 @@ This release has several improvements, addition of new features and bug fixes:
- Added a CGRAN (https://www.cgran.org/) manifest
- Lots of code cleaning and fixes of typos and small bugs.
&nbsp;
## [GNSS-SDR v0.0.6](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.6)
This release has several improvements and bug fixes:
@ -849,6 +863,8 @@ This release has several improvements and bug fixes:
- Enabled cross-compilation for ARM devices.
- Lots of code cleaning.
&nbsp;
## [GNSS-SDR v0.0.5](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.5)
This release has several improvements and bug fixes:
@ -874,6 +890,8 @@ This release has several improvements and bug fixes:
- Added support for interleaved I/Q byte-size sample files.
- Minor bug fixes, updated documentation and code cleaning.
&nbsp;
## [GNSS-SDR v0.0.4](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.4)
This release has several improvements and bug fixes:
@ -909,6 +927,8 @@ This release has several improvements and bug fixes:
- Some raw pointers have been changed to smart pointers.
- Minor bug fixes and code cleaning.
&nbsp;
## [GNSS-SDR v0.0.3](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.3)
This release has several improvements and bug fixes, completing the transition

View File

@ -29,7 +29,7 @@ endif()
if(HAVE_POSIX_MEMALIGN)
message(STATUS "Use `posix_memalign` for aligned malloc!")
add_definitions(-DHAVE_POSIX_MEMALIGN)
endif(HAVE_POSIX_MEMALIGN)
endif()
# MAKE volk_gnsssdr_profile
add_executable(volk_gnsssdr_profile
@ -42,7 +42,7 @@ if(MSVC)
target_include_directories(volk_gnsssdr_profile
PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/cmake/msvc>
)
endif(MSVC)
endif()
target_include_directories(volk_gnsssdr_profile
PRIVATE $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>

View File

@ -78,11 +78,11 @@ function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgName
# first set all result variables to empty/FALSE
foreach(arg_name ${_singleArgNames} ${_multiArgNames})
set(${prefix}_${arg_name})
endforeach(arg_name)
endforeach()
foreach(option ${_optionNames})
set(${prefix}_${option} FALSE)
endforeach(option)
endforeach()
set(${prefix}_UNPARSED_ARGUMENTS)
@ -103,9 +103,9 @@ function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgName
elseif("${insideValues}" STREQUAL "MULTI")
list(APPEND ${prefix}_${currentArgName} ${currentArg})
endif()
else(insideValues)
else()
list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg})
endif(insideValues)
endif()
else()
if(NOT ${optionIndex} EQUAL -1)
set(${prefix}_${currentArg} TRUE)
@ -121,12 +121,12 @@ function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgName
endif()
endif()
endforeach(currentArg)
endforeach()
# propagate the result variables to the caller:
foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames})
set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE)
endforeach(arg_name)
endforeach()
set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE)
endfunction(CMAKE_PARSE_ARGUMENTS _options _singleArgs _multiArgs)
endfunction()

View File

@ -254,6 +254,9 @@ cmake_pop_check_state()
set(FILESYSTEM_FOUND ${_found} CACHE BOOL "TRUE if we can compile and link a program using std::filesystem" FORCE)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(FILESYSTEM DEFAULT_MSG FILESYSTEM_FOUND)
if(FILESYSTEM_FIND_REQUIRED AND NOT FILESYSTEM_FOUND)
message(FATAL_ERROR "Cannot compile a simple program using std::filesystem")
endif()

View File

@ -34,7 +34,7 @@ macro(VOLK_PYTHON_CHECK_MODULE_RAW desc python_code have)
endmacro()
macro(VOLK_PYTHON_CHECK_MODULE desc mod cmd have)
VOLK_PYTHON_CHECK_MODULE_RAW(
volk_python_check_module_raw(
"${desc}" "
#########################################
try:

View File

@ -309,7 +309,7 @@ if(NOT CROSSCOMPILE_MULTILIB AND CPU_IS_x86)
if(${SIZEOF_CPU} EQUAL 64 AND MSVC)
overrule_arch(mmx "No MMX for Win64")
if(MSVC_VERSION GREATER 1700)
OVERRULE_ARCH(sse "No SSE for Win64 Visual Studio 2013")
overrule_arch(sse "No SSE for Win64 Visual Studio 2013")
endif()
endif()

View File

@ -12,7 +12,7 @@
########################################################################
include(VolkPython)
VOLK_PYTHON_INSTALL(
volk_python_install(
FILES
__init__.py
cfg.py
@ -21,7 +21,7 @@ VOLK_PYTHON_INSTALL(
COMPONENT "volk_gnsssdr"
)
VOLK_PYTHON_INSTALL(
volk_python_install(
PROGRAMS
volk_gnsssdr_modtool
DESTINATION ${VOLK_RUNTIME_DIR}