1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-04 15:30:01 +00:00

Remove build and data folders, move tests and utils to the base of the source tree

This commit is contained in:
Carles Fernandez 2024-10-04 11:55:09 +02:00
parent 5be2971c9b
commit 825037592a
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
251 changed files with 154 additions and 179 deletions

View File

@ -28,15 +28,15 @@ jobs:
libgnutls-openssl-dev libmatio-dev googletest protobuf-compiler libprotobuf-dev \ libgnutls-openssl-dev libmatio-dev googletest protobuf-compiler libprotobuf-dev \
python3-mako liborc-0.4-dev python3-mako liborc-0.4-dev
- name: configure - name: configure
run: cd build && cmake -GNinja .. run: cmake -S . -B build -GNinja
- name: build - name: build
run: cd build && ninja run: cmake --build build
- name: check - name: check
run: cd build && ninja check && ../install/volk_gnsssdr_profile && ../install/run_tests run: cmake --build build --target check && ./install/volk_gnsssdr_profile && ./install/run_tests
- name: default position_test - name: default position_test
run: | run: |
cd build && cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON -DENABLE_UNIT_TESTING_EXTRA=OFF .. && \ cmake -S . -B build -DENABLE_SYSTEM_TESTING_EXTRA=ON -DENABLE_UNIT_TESTING_EXTRA=OFF && \
ninja && ../install/position_test && ../install/run_tests --gtest_filter=Osnma* cmake --build build && ./install/position_test && ./install/run_tests --gtest_filter=Osnma*
build-macos: build-macos:
runs-on: macos-latest runs-on: macos-latest
@ -62,15 +62,15 @@ jobs:
brew install ninja hdf5 automake armadillo lapack libmatio gnuradio openssl pugixml protobuf brew install ninja hdf5 automake armadillo lapack libmatio gnuradio openssl pugixml protobuf
pip3 install mako pip3 install mako
- name: configure - name: configure
run: cd build && cmake -GNinja .. run: cmake -S . -B build -GNinja
- name: build - name: build
run: cd build && ninja run: cmake --build build
- name: check - name: check
run: cd build && ninja check && ../install/volk_gnsssdr_profile && ../install/run_tests run: cmake --build build --target check && ./install/volk_gnsssdr_profile && ./install/run_tests
- name: default position_test - name: default position_test
run: | run: |
cd build && cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON -DENABLE_UNIT_TESTING_EXTRA=OFF .. && \ cmake -S . -B build -DENABLE_SYSTEM_TESTING_EXTRA=ON -DENABLE_UNIT_TESTING_EXTRA=OFF && \
ninja && ../install/position_test && ../install/run_tests --gtest_filter=Osnma* cmake --build build && ./install/position_test && ./install/run_tests --gtest_filter=Osnma*
build-macos-xcode: build-macos-xcode:
runs-on: macos-latest runs-on: macos-latest
@ -96,22 +96,20 @@ jobs:
brew install ninja pkg-config hdf5 automake armadillo lapack libmatio gnuradio openssl pugixml protobuf brew install ninja pkg-config hdf5 automake armadillo lapack libmatio gnuradio openssl pugixml protobuf
pip3 install mako pip3 install mako
- name: configure - name: configure
run: cd build && cmake -GXcode .. run: cmake -S . -B build -GXcode
- name: build - name: build
run: cd build && xcodebuild -configuration Release run: cmake --build build --config Release
- name: check - name: check
run: | run: |
cd build cmake --build build --config Release --target check
xcodebuild -configuration Release -target check ./install/volk_gnsssdr_profile
../install/volk_gnsssdr_profile ./install/run_tests
../install/run_tests
- name: default position_test - name: default position_test
run: | run: |
cd build cmake -S . -B build -DENABLE_SYSTEM_TESTING_EXTRA=ON -DENABLE_UNIT_TESTING_EXTRA=OFF
cmake -DENABLE_SYSTEM_TESTING_EXTRA=ON -DENABLE_UNIT_TESTING_EXTRA=OFF .. cmake --build build --config Release --target position_test
xcodebuild -configuration Release -target position_test ./install/position_test
../install/position_test ./install/run_tests --gtest_filter=Osnma*
../install/run_tests --gtest_filter=Osnma*
clang-format: clang-format:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -151,7 +149,7 @@ jobs:
ln -s $(brew --prefix llvm)/bin/clang-apply-replacements /usr/local/bin ln -s $(brew --prefix llvm)/bin/clang-apply-replacements /usr/local/bin
ln -s $(brew --prefix llvm)/bin/run-clang-tidy.py /usr/local/bin ln -s $(brew --prefix llvm)/bin/run-clang-tidy.py /usr/local/bin
- name: Prepare run - name: Prepare run
run: cd build && cmake .. && make volk_gnsssdr_module gtest-1.15.2 core_monitor core_libs pvt_libs run: cmake -S . -B build && cmake --build build --target volk_gnsssdr_module gtest-1.15.2 core_monitor core_libs pvt_libs
- name: run clang-tidy - name: run clang-tidy
run: cd build && /opt/homebrew/opt/llvm/bin/run-clang-tidy -fix run: cd build && /opt/homebrew/opt/llvm/bin/run-clang-tidy -fix
- name: check - name: check
@ -168,7 +166,7 @@ jobs:
- name: install dependencies - name: install dependencies
run: sudo apt-get install python3-pip && sudo pip3 install cpplint run: sudo apt-get install python3-pip && sudo pip3 install cpplint
- name: run checks - name: run checks
run: "find ./src/ -iname *.h -o -iname *.cc | xargs cpplint run: "find ./src/ ./utils ./tests -iname *.h -o -iname *.cc | xargs cpplint
--filter=-,+build/class,+build/c++14,+build/deprecated,+build/explicit_make_pair,\ --filter=-,+build/class,+build/c++14,+build/deprecated,+build/explicit_make_pair,\
+build/include_what_you_use,+build/printf_format,+build/storage_class,\ +build/include_what_you_use,+build/printf_format,+build/storage_class,\
+readability/constructors,+readability/namespace,+readability/newline,\ +readability/constructors,+readability/namespace,+readability/newline,\
@ -180,7 +178,7 @@ jobs:
+whitespace/end-of-line,+whitespace/ending-newline,+whitespace/semicolon,\ +whitespace/end-of-line,+whitespace/ending-newline,+whitespace/semicolon,\
+whitespace/tab --exclude=./src/core/interfaces/gnss_block_interface.h +whitespace/tab --exclude=./src/core/interfaces/gnss_block_interface.h
--exclude=./src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cpu_features/test/hwcaps_for_testing.* --exclude=./src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cpu_features/test/hwcaps_for_testing.*
--exclude=./src/utils/nav-listener/build/nav_message.pb.h" --exclude=./utils/nav-listener/build/nav_message.pb.h"
prettier-markdown: prettier-markdown:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -215,12 +213,12 @@ jobs:
pip install mako pip install mako
- name: configure - name: configure
shell: powershell shell: powershell
run: cd build; cmake -G "Visual Studio 17 2022" ..\src\algorithms\libs\volk_gnsssdr_module\volk_gnsssdr run: cmake -S src\algorithms\libs\volk_gnsssdr_module\volk_gnsssdr -B build -G "Visual Studio 17 2022"
- name: build - name: build
run: cmake --build build --config Release run: cmake --build build --config Release
- name: test - name: test
shell: powershell shell: powershell
run: cd build; ctest -C Release run: ctest -C Release --test-dir build
- name: install - name: install
run: cmake --install build run: cmake --install build
- name: run profile - name: run profile
@ -233,11 +231,11 @@ jobs:
- name: install dependencies - name: install dependencies
run: sudo apt install python3-mako liborc-dev run: sudo apt install python3-mako liborc-dev
- name: configure - name: configure
run: cd build && cmake ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr run: cmake -S src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr -B build
- name: build - name: build
run: cd build && make -j2 run: cmake --build build
- name: install - name: install
run: cd build && sudo make install && sudo ldconfig run: sudo cmake --install build && sudo ldconfig
- name: test - name: test
run: volk_gnsssdr_profile run: volk_gnsssdr_profile
@ -253,11 +251,11 @@ jobs:
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install mako pip install mako
- name: configure - name: configure
run: cd build && cmake ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr run: cmake -S src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr -B build
- name: build - name: build
run: cd build && make -j2 && sudo make install run: cmake --build build && sudo cmake --install build
- name: test - name: test
run: cd build && ctest -C Release --exclude-regex volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc run: ctest -C Release --test-dir build --exclude-regex volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc
volk-gnsssdr-macos-xcode: volk-gnsssdr-macos-xcode:
runs-on: macos-latest runs-on: macos-latest
@ -271,13 +269,13 @@ jobs:
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install mako pip install mako
- name: configure - name: configure
run: cd build && cmake -GXcode ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr run: cmake -S src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr -B build -GXcode
- name: build - name: build
run: cd build && xcodebuild -configuration Release run: cmake --build build --config Release
- name: install - name: install
run: cd build && sudo xcodebuild -configuration Release -target install run: sudo cmake --install build
- name: test - name: test
run: cd build && ctest -C Release --exclude-regex volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc run: ctest -C Release --test-dir build --exclude-regex --exclude-regex volk_gnsssdr_32fc_32f_rotator_dotprodxnpuppet_32fc
shellcheck: shellcheck:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -286,7 +284,7 @@ jobs:
- name: install dependencies - name: install dependencies
run: sudo apt install shellcheck run: sudo apt install shellcheck
- name: check scripts - name: check scripts
run: shellcheck src/utils/scripts/* run: shellcheck utils/scripts/*
REUSE-compliance: REUSE-compliance:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -50,6 +50,7 @@ jobs:
shell: bash shell: bash
run: | run: |
cd $GITHUB_WORKSPACE/ cd $GITHUB_WORKSPACE/
mkdir build
cd build cd build
cmake -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/android-sdk-linux/ndk/24.0.8215888/build/cmake/android.toolchain.cmake \ cmake -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/android-sdk-linux/ndk/24.0.8215888/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=${{ matrix.arch.name }} \ -DANDROID_ABI=${{ matrix.arch.name }} \

45
.gitignore vendored
View File

@ -1,29 +1,30 @@
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2011 Carles Fernandez-Prades <carles.fernandez(at)cttc.es> # SPDX-FileCopyrightText: 2011-2024 Carles Fernandez-Prades <carles.fernandez(at)cttc.es>
*~ *~
.*.swp .*.swp
docs/doxygen/Doxyfile /build/
docs/html /build*/
docs/latex /cmake-build-debug/
docs/GNSS-SDR_manual.pdf /data/
src/tests/data/output.dat /docs/doxygen/Doxyfile
thirdparty/ /docs/html/
src/utils/nav-listener/build /docs/latex/
.settings /docs/GNSS-SDR_manual.pdf
.project /gnss_sdr_pvt.nmea
.cproject /GSDR*
.idea /HAS_*
cmake-build-debug/ /PVT_*
/Testing/
/tests/data/output.dat
/thirdparty/
/utils/nav-listener/build/
/utils/nav-listener/build*/
/install /install
.cproject
.DS_Store .DS_Store
.idea
.project
.pydevproject .pydevproject
.vscode/ .settings
.vs/ .vs/
Testing/ .vscode/
GSDR*
PVT_*
HAS_*
gnss_sdr_pvt.nmea
build-debug/
build-release/

View File

@ -3602,6 +3602,10 @@ add_custom_target(uninstall
# Add subdirectories # Add subdirectories
################################################################################ ################################################################################
add_subdirectory(src) add_subdirectory(src)
if(ENABLE_UNIT_TESTING OR ENABLE_SYSTEM_TESTING)
add_subdirectory(tests)
endif()
add_subdirectory(utils)

110
README.md
View File

@ -535,18 +535,16 @@ gnss-sdr with the following structure:
``` ```
|-gnss-sdr |-gnss-sdr
|---build <- where gnss-sdr is built.
|---cmake <- CMake-related files. |---cmake <- CMake-related files.
|---conf <- Configuration files. Each file defines one particular receiver. |---conf <- Configuration files. Each file defines one particular receiver.
|---data <- Populate this folder with your captured data.
|---docs <- Contains documentation-related files. |---docs <- Contains documentation-related files.
|---install <- Executables will be placed here. |---install <- Executables will be placed here.
|---src <- Source code folder. |---src <- Source code folder.
|-----algorithms <- Signal processing blocks. |-----algorithms <- Signal processing blocks.
|-----core <- Control plane, interfaces, systems' parameters. |-----core <- Control plane, interfaces, systems' parameters.
|-----main <- Main function of the C++ program. |-----main <- Main function of the C++ program.
|-----tests <- QA code. |---tests <- QA code.
|-----utils <- some utilities (e.g. Matlab scripts). |---utils <- some utilities (e.g. Matlab scripts).
``` ```
By default, you will be in the 'main' branch of the Git repository, which By default, you will be in the 'main' branch of the Git repository, which
@ -567,14 +565,14 @@ readings can be found at our
Go to GNSS-SDR's build directory: Go to GNSS-SDR's build directory:
``` ```
$ cd gnss-sdr/build $ cd gnss-sdr
``` ```
Configure and build the application: Configure and build the application:
``` ```
$ cmake .. $ cmake -S . -B build
$ make $ cmake --build build
``` ```
By default, CMake will build the Release version, meaning that the compiler will By default, CMake will build the Release version, meaning that the compiler will
@ -585,8 +583,8 @@ information about the internals of the receiver, as well as more fine-grained
logging. This can be done by building the Debug version, by doing: logging. This can be done by building the Debug version, by doing:
``` ```
$ cmake -DCMAKE_BUILD_TYPE=Debug .. $ cmake -S . -B build-debug -DCMAKE_BUILD_TYPE=Debug
$ make $ cmake --build build-debug
``` ```
This will create four executables at gnss-sdr/install, namely `gnss-sdr`, This will create four executables at gnss-sdr/install, namely `gnss-sdr`,
@ -595,7 +593,7 @@ that folder, but if you prefer to install `gnss-sdr` on your system and have it
available anywhere else, do: available anywhere else, do:
``` ```
$ sudo make install $ sudo cmake --install build
``` ```
This will also make a copy of the conf/ folder into This will also make a copy of the conf/ folder into
@ -607,21 +605,21 @@ You could be interested in creating the documentation (requires:
`sudo apt-get install doxygen-latex` in Ubuntu/Debian) by doing: `sudo apt-get install doxygen-latex` in Ubuntu/Debian) by doing:
``` ```
$ make doc $ cmake --build build --target doc
``` ```
from the gnss-sdr/build folder. This will generate HTML documentation that can This will generate HTML documentation that can be retrieved pointing your
be retrieved pointing your browser of preference to build/docs/html/index.html. browser of preference to `build/docs/html/index.html`. If a LaTeX installation
If a LaTeX installation is detected in your system, is detected in your system,
``` ```
$ make pdfmanual $ cmake --build build --target pdfmanual
``` ```
will create a PDF manual at build/docs/GNSS-SDR_manual.pdf. Finally, will create a PDF manual at build/docs/GNSS-SDR_manual.pdf. Finally,
``` ```
$ make doc-clean $ cmake --build build --target doc-clean
``` ```
will remove the content of previously generated documentation. will remove the content of previously generated documentation.
@ -639,30 +637,6 @@ the function to execute. It mimics GNU Radio's [VOLK](https://www.libvolk.org/)
library, so if you still have not run `volk_profile`, this is a good moment to library, so if you still have not run `volk_profile`, this is a good moment to
do so. do so.
If you are using [Eclipse](https://www.eclipse.org/ide/) as your development
environment, CMake can create the project for you. However, if the build
directory is a subdirectory of the source directory (as is the case of the
`gnss-sdr/build` folder), this is not supported well by Eclipse. It is strongly
recommended to use a build directory which is a sibling of the source directory.
Hence, type from the `gnss-sdr` root folder:
```
$ cd ..
$ mkdir eclipse && cd eclipse
$ cmake -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=TRUE -DCMAKE_ECLIPSE_VERSION=4.5 ../gnss-sdr
```
and then import the created project into Eclipse:
1. Import project using Menu File -> Import.
2. Select General -> Existing projects into workspace.
3. Select your root directory: Browse and select your newly created `eclipse/`
directory. Keep "Copy projects into workspace" unchecked.
4. Click on "Finish" and you will get a fully functional Eclipse project.
After building the project, you will find the generated binaries at
`eclipse/install`.
#### Build OSMOSDR support (OPTIONAL) #### Build OSMOSDR support (OPTIONAL)
Install the [OsmoSDR](https://osmocom.org/projects/sdr "OsmoSDR's Homepage") Install the [OsmoSDR](https://osmocom.org/projects/sdr "OsmoSDR's Homepage")
@ -691,9 +665,9 @@ $ sudo ldconfig
Then, configure GNSS-SDR to build the `Osmosdr_Signal_Source` by: Then, configure GNSS-SDR to build the `Osmosdr_Signal_Source` by:
``` ```
$ cmake -DENABLE_OSMOSDR=ON .. $ cmake -S . -B build -DENABLE_OSMOSDR=ON
$ make $ cmake --build build
$ sudo make install $ sudo cmake --install build
``` ```
(in order to disable the `Osmosdr_Signal_Source` compilation, you can pass (in order to disable the `Osmosdr_Signal_Source` compilation, you can pass
@ -734,18 +708,18 @@ $ cd ../..
Then configure GNSS-SDR to build the `Fmcomms2_Signal_Source` implementation: Then configure GNSS-SDR to build the `Fmcomms2_Signal_Source` implementation:
``` ```
$ cd gnss-sdr/build $ cd gnss-sdr
$ cmake -DENABLE_FMCOMMS2=ON .. $ cmake -S . -B build -DENABLE_FMCOMMS2=ON
$ make $ cmake --build build
$ sudo make install $ sudo cmake --install build
``` ```
or configure it to build `Plutosdr_Signal_Source`: or configure it to build `Plutosdr_Signal_Source`:
``` ```
$ cmake -DENABLE_PLUTOSDR=ON .. $ cmake -S . -B build -DENABLE_PLUTOSDR=ON
$ make $ cmake --build build
$ sudo make install $ sudo cmake --install build
``` ```
With `Fmcomms2_Signal_Source` you can use any SDR hardware based on With `Fmcomms2_Signal_Source` you can use any SDR hardware based on
@ -760,9 +734,9 @@ devices.
In order to enable the building of blocks that use OpenCL, type: In order to enable the building of blocks that use OpenCL, type:
``` ```
$ cmake -DENABLE_OPENCL=ON .. $ cmake -S . -B build -DENABLE_OPENCL=ON
$ make $ cmake --build build
$ sudo make install $ sudo cmake --install build
``` ```
#### Build CUDA support (OPTIONAL) #### Build CUDA support (OPTIONAL)
@ -774,9 +748,9 @@ data-parallel computations, first you need to install the CUDA Toolkit from
Make sure that the SDK samples build well. Then, build GNSS-SDR by doing: Make sure that the SDK samples build well. Then, build GNSS-SDR by doing:
``` ```
$ cmake -DENABLE_CUDA=ON .. $ cmake -S . -B build -DENABLE_CUDA=ON
$ make $ cmake --build build
$ sudo make install $ sudo cmake --install build
``` ```
Of course, you will also need a GPU that Of course, you will also need a GPU that
@ -879,13 +853,13 @@ non-standard location. If that is the case, you need to inform GNSS-SDR's
configuration system by defining the `PYTHON_EXECUTABLE` variable as: configuration system by defining the `PYTHON_EXECUTABLE` variable as:
``` ```
$ cmake -DPYTHON_EXECUTABLE=/path/to/bin/python3 .. $ cmake -S . -B build -DPYTHON_EXECUTABLE=/path/to/bin/python3
``` ```
In case you have installed Macports in a non-standard location, you can use: In case you have installed Macports in a non-standard location, you can use:
``` ```
$ cmake -DCMAKE_PREFIX_PATH=/opt/local -DUSE_MACPORTS_PYTHON=/opt/local/bin/python .. $ cmake -S . -B build -DCMAKE_PREFIX_PATH=/opt/local -DUSE_MACPORTS_PYTHON=/opt/local/bin/python
``` ```
changing `/opt/local` by the base directory in which your software is installed. changing `/opt/local` by the base directory in which your software is installed.
@ -901,17 +875,23 @@ software:
``` ```
$ git clone https://github.com/gnss-sdr/gnss-sdr $ git clone https://github.com/gnss-sdr/gnss-sdr
$ cd gnss-sdr/build $ cd gnss-sdr
$ cmake .. $ cmake -S . -B build
$ make $ cmake --build build
``` ```
This will create three executables at gnss-sdr/install, namely `gnss-sdr`, This will create three executables at `gnss-sdr/install`, namely `gnss-sdr`,
`run_tests` and `volk_gnsssdr_profile`. You can install the software receiver on `run_tests` and `volk_gnsssdr_profile`. You can install the software receiver on
your system by doing: your system by doing:
``` ```
$ sudo make install $ sudo cmake --install build
```
and uninstall it with:
```
$ sudo cmake --build build --target uninstall
``` ```
Note, it is advisable not to run the install step in a homebrew environment. Note, it is advisable not to run the install step in a homebrew environment.
@ -919,7 +899,7 @@ Note, it is advisable not to run the install step in a homebrew environment.
The documentation can be built by: The documentation can be built by:
``` ```
$ make doc $ cmake --build build --target doc
``` ```
and can be viewed doing: and can be viewed doing:
@ -994,7 +974,7 @@ $ git pull upstream next
``` ```
Before rebuilding the source code, it is safe (and recommended) to remove the Before rebuilding the source code, it is safe (and recommended) to remove the
remainders of old compilations: remainders of old compilations, _e.g._:
``` ```
$ rm -rf gnss-sdr/build/* $ rm -rf gnss-sdr/build/*

6
build/.gitignore vendored
View File

@ -1,6 +0,0 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades <carles.fernandez@cttc.es>
# Ignore everything in this directory
*
# Except this file
!.gitignore

6
data/.gitignore vendored
View File

@ -1,6 +0,0 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades <carles.fernandez@cttc.es>
# Ignore everything in this directory
*
# Except this file
!.gitignore

View File

@ -111,6 +111,16 @@ All notable changes to GNSS-SDR will be documented in this file.
- Tidy up the `conf/` folder. - Tidy up the `conf/` folder.
- Add `install` and `uninstall` targets to the `nav_msg_listener` utility. - Add `install` and `uninstall` targets to the `nav_msg_listener` utility.
- **Potential Breaking Change**: The source tree has been refactored to follow a
more conventional folder structure. This may disrupt user pipelines that
relied on the previous structure and could break development branches that
were branched off from `next` before this change. The key changes are:
- The `tests` and `utils` directories have been moved from the `src` folder to
the root of the source tree.
- The empty `build` and `data` folders have been removed. Users can create a
building folder using `mkdir build` or by having CMake handle it:
`cmake -S . -B build`.
See the definitions of concepts and metrics at See the definitions of concepts and metrics at
https://gnss-sdr.org/design-forces/ https://gnss-sdr.org/design-forces/

View File

@ -101,10 +101,8 @@ $ git clone https://github.com/gnss-sdr/gnss-sdr
This will create a folder named gnss-sdr with the following structure: This will create a folder named gnss-sdr with the following structure:
\verbatim \verbatim
|-gnss-sdr |-gnss-sdr
|---build <- where gnss-sdr is built
|---cmake <- CMake-related files |---cmake <- CMake-related files
|---conf <- Configuration files. Each file represents one receiver. |---conf <- Configuration files. Each file represents one receiver.
|---data <- Populate this folder with your captured data.
|---docs <- Contains documentation-related files |---docs <- Contains documentation-related files
|---install <- Executables |---install <- Executables
|---src <- Source code folder |---src <- Source code folder
@ -127,13 +125,13 @@ This will create a folder named gnss-sdr with the following structure:
|-------receiver |-------receiver
|-------system_parameters |-------system_parameters
|-----main |-----main
|-----tests |---tests
|-----utils <- some utilities (e.g. Matlab scripts) |---utils <- some utilities (e.g. Matlab scripts)
\endverbatim \endverbatim
You are now ready to build GNSS-SDR by using <a href="https://cmake.org/" target="_blank">CMake</a> as building tool: You are now ready to build GNSS-SDR by using <a href="https://cmake.org/" target="_blank">CMake</a> as building tool:
\verbatim \verbatim
$ cd gnss-sdr/build $ cd gnss-sdr && mkdir build && cd build
$ cmake .. $ cmake ..
$ make $ make
\endverbatim \endverbatim
@ -153,10 +151,10 @@ You can create the documentation by doing:
$ make doc $ make doc
\endverbatim \endverbatim
from the <tt>gnss-sdr/build</tt> folder. In both cases, <a href="https://www.doxygen.nl/" target="_blank">Doxygen</a> will generate HTML documentation that can be from the building folder. In both cases, <a href="https://www.doxygen.nl/" target="_blank">Doxygen</a> will generate HTML documentation that can be
retrieved pointing your browser of preference to <tt>gnss-sdr/docs/html/index.html</tt>. retrieved pointing your browser of preference to <tt>gnss-sdr/docs/html/index.html</tt>.
There are two more extra targets available. From the <tt>gnss-sdr/build</tt> folder: There are two more extra targets available. In the buiding folder:
\verbatim \verbatim
$ make doc-clean $ make doc-clean
\endverbatim \endverbatim
@ -177,10 +175,9 @@ By default, CMake will build the Release version, meaning that the compiler will
a RF front-end and you need to attain real time. If working with a file (and thus without real-time constraints), you may want to obtain more information about a RF front-end and you need to attain real time. If working with a file (and thus without real-time constraints), you may want to obtain more information about
the internals of the receiver, as well as more fine-grained logging. This can be done by building the Debug version, by doing: the internals of the receiver, as well as more fine-grained logging. This can be done by building the Debug version, by doing:
\verbatim \verbatim
$ cd gnss-sdr/build $ cd gnss-sdr && mkdir build-debug && cd build-debug
$ cmake -DCMAKE_BUILD_TYPE=Debug .. $ cmake -DCMAKE_BUILD_TYPE=Debug ..
$ make $ make
$ sudo make install
\endverbatim \endverbatim
\subsection updating_gnss-sdr Updating GNSS-SDR \subsection updating_gnss-sdr Updating GNSS-SDR
@ -191,8 +188,8 @@ $ git pull https://github.com/gnss-sdr/gnss-sdr next
\endverbatim \endverbatim
Before rebuiling the source code, it is safe (and recommended) to remove the remainders of old builds: Before rebuiling the source code, it is safe (and recommended) to remove the remainders of old builds:
\verbatim \verbatim
$ cd gnss-sdr/build $ cd <building folder>
$ sudo make uninstall $ sudo make uninstall ; if you installed it before
$ rm -rf * $ rm -rf *
\endverbatim \endverbatim

View File

@ -51,6 +51,6 @@ Please check https://gnss-sdr.org/docs/sp-blocks/global-parameters/ for more
information about the usage of XML files in GNSS-SDR. information about the usage of XML files in GNSS-SDR.
You could find useful the utility program You could find useful the utility program
[rinex2assist](https://github.com/gnss-sdr/gnss-sdr/tree/next/src/utils/rinex2assist) [rinex2assist](https://github.com/gnss-sdr/gnss-sdr/tree/next/utils/rinex2assist)
for the generation of compatible XML files from recent, publicly available RINEX for the generation of compatible XML files from recent, publicly available RINEX
navigation data files. navigation data files.

View File

@ -8,7 +8,3 @@
add_subdirectory(algorithms) add_subdirectory(algorithms)
add_subdirectory(core) add_subdirectory(core)
add_subdirectory(main) add_subdirectory(main)
if(ENABLE_UNIT_TESTING OR ENABLE_SYSTEM_TESTING)
add_subdirectory(tests)
endif()
add_subdirectory(utils)

View File

@ -3,16 +3,16 @@
*~ *~
*.pyc *.pyc
*.pyo *.pyo
html/ *.swp
build/ /*build*/
cmake_build/ /archives/
cmake-build-*/ /.DS_Store
out/ /gen/volk_gnsssdr_arch_defs.py
/html/
/out/
.project .project
.cproject .cproject
.vagrant/ .vagrant/
.vscode/ .vscode/
.vs/ .vs/
*.swp
/.DS_Store
/gen/volk_gnsssdr_arch_defs.py

View File

@ -366,14 +366,14 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
if(CMAKE_VERSION VERSION_GREATER 3.17.0) if(CMAKE_VERSION VERSION_GREATER 3.17.0)
set(GNSSTK_PATCH_COMMAND set(GNSSTK_PATCH_COMMAND
cd ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION} && cd ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION} &&
${Patch_EXECUTABLE} ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/CMakeLists.txt < ${GNSSSDR_SOURCE_DIR}/src/tests/data/gnsstk_static14.patch && ${Patch_EXECUTABLE} ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/CMakeLists.txt < ${GNSSSDR_SOURCE_DIR}/tests/data/gnsstk_static14.patch &&
${Patch_EXECUTABLE} ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/core/lib/GNSSCore/ObsID.hpp < ${GNSSSDR_SOURCE_DIR}/src/tests/data/gnsstk_gcc13.patch ${Patch_EXECUTABLE} ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/core/lib/GNSSCore/ObsID.hpp < ${GNSSSDR_SOURCE_DIR}/tests/data/gnsstk_gcc13.patch
) )
else() else()
set(GNSSTK_PATCH_COMMAND set(GNSSTK_PATCH_COMMAND
cd ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION} && cd ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION} &&
${Patch_EXECUTABLE} ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/CMakeLists.txt < ${GNSSSDR_SOURCE_DIR}/src/tests/data/gnsstk_static13.patch && ${Patch_EXECUTABLE} ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/CMakeLists.txt < ${GNSSSDR_SOURCE_DIR}/tests/data/gnsstk_static13.patch &&
${Patch_EXECUTABLE} ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/core/lib/GNSSCore/ObsID.hpp < ${GNSSSDR_SOURCE_DIR}/src/tests/data/gnsstk_gcc13.patch ${Patch_EXECUTABLE} ${GNSSSDR_BINARY_DIR}/thirdparty/gnsstk-${GNSSSDR_GNSSTK_LOCAL_VERSION}/core/lib/GNSSCore/ObsID.hpp < ${GNSSSDR_SOURCE_DIR}/tests/data/gnsstk_gcc13.patch
) )
endif() endif()
# Patch only once # Patch only once
@ -623,12 +623,12 @@ if(NOT ENABLE_PACKAGING)
install(FILES ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/Galileo_E1_ID_1_Fs_4Msps_8ms.dat DESTINATION share/gnss-sdr/signal_samples) install(FILES ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/Galileo_E1_ID_1_Fs_4Msps_8ms.dat DESTINATION share/gnss-sdr/signal_samples)
install(FILES ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat DESTINATION share/gnss-sdr/signal_samples) install(FILES ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat DESTINATION share/gnss-sdr/signal_samples)
install(FILES ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/NT1065_GLONASS_L1_20160831_fs6625e6_if0e3_4ms.bin DESTINATION share/gnss-sdr/signal_samples) install(FILES ${GNSSSDR_BINARY_DIR}/thirdparty/signal_samples/NT1065_GLONASS_L1_20160831_fs6625e6_if0e3_4ms.bin DESTINATION share/gnss-sdr/signal_samples)
install(FILES ${GNSSSDR_SOURCE_DIR}/src/tests/data/rtklib_test/obs_test1.xml DESTINATION share/gnss-sdr/data/rtklib_test) install(FILES ${GNSSSDR_SOURCE_DIR}/tests/data/rtklib_test/obs_test1.xml DESTINATION share/gnss-sdr/data/rtklib_test)
install(FILES ${GNSSSDR_SOURCE_DIR}/src/tests/data/rtklib_test/eph_GPS_L1CA_test1.xml DESTINATION share/gnss-sdr/data/rtklib_test) install(FILES ${GNSSSDR_SOURCE_DIR}/tests/data/rtklib_test/eph_GPS_L1CA_test1.xml DESTINATION share/gnss-sdr/data/rtklib_test)
add_definitions(-DTEST_PATH="${CMAKE_INSTALL_PREFIX}/share/gnss-sdr/") add_definitions(-DTEST_PATH="${CMAKE_INSTALL_PREFIX}/share/gnss-sdr/")
else() else()
file(COPY ${GNSSSDR_SOURCE_DIR}/src/tests/data/rtklib_test/obs_test1.xml DESTINATION ${GNSSSDR_BINARY_DIR}/thirdparty/data/rtklib_test) file(COPY ${GNSSSDR_SOURCE_DIR}/tests/data/rtklib_test/obs_test1.xml DESTINATION ${GNSSSDR_BINARY_DIR}/thirdparty/data/rtklib_test)
file(COPY ${GNSSSDR_SOURCE_DIR}/src/tests/data/rtklib_test/eph_GPS_L1CA_test1.xml DESTINATION ${GNSSSDR_BINARY_DIR}/thirdparty/data/rtklib_test) file(COPY ${GNSSSDR_SOURCE_DIR}/tests/data/rtklib_test/eph_GPS_L1CA_test1.xml DESTINATION ${GNSSSDR_BINARY_DIR}/thirdparty/data/rtklib_test)
add_definitions(-DTEST_PATH="${GNSSSDR_BINARY_DIR}/thirdparty/") add_definitions(-DTEST_PATH="${GNSSSDR_BINARY_DIR}/thirdparty/")
endif() endif()
endif() endif()
@ -687,7 +687,7 @@ if(ENABLE_UNIT_TESTING)
endif() endif()
target_include_directories(run_tests target_include_directories(run_tests
INTERFACE INTERFACE
${GNSSSDR_SOURCE_DIR}/src/tests/common-files ${GNSSSDR_SOURCE_DIR}/tests/common-files
) )
if(GNURADIO_USES_STD_POINTERS) if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(run_tests target_compile_definitions(run_tests
@ -838,7 +838,7 @@ if(ENABLE_FPGA)
target_link_libraries(gps_l1_ca_dll_pll_tracking_test_fpga INTERFACE "$<LINK_LIBRARY:WHOLE_ARCHIVE,absl::log_flags>") target_link_libraries(gps_l1_ca_dll_pll_tracking_test_fpga INTERFACE "$<LINK_LIBRARY:WHOLE_ARCHIVE,absl::log_flags>")
endif() endif()
target_include_directories(gps_l1_ca_dll_pll_tracking_test_fpga target_include_directories(gps_l1_ca_dll_pll_tracking_test_fpga
INTERFACE ${GNSSSDR_SOURCE_DIR}/src/tests/common-files INTERFACE ${GNSSSDR_SOURCE_DIR}/tests/common-files
) )
xcode_remove_warning_duplicates(gps_l1_ca_dll_pll_tracking_test_fpga) xcode_remove_warning_duplicates(gps_l1_ca_dll_pll_tracking_test_fpga)
install(TARGETS gps_l1_ca_dll_pll_tracking_test_fpga install(TARGETS gps_l1_ca_dll_pll_tracking_test_fpga
@ -873,7 +873,7 @@ function(add_system_test executable)
endif() endif()
target_include_directories(${executable} target_include_directories(${executable}
PRIVATE ${OPT_INCLUDES_} PRIVATE ${OPT_INCLUDES_}
INTERFACE ${GNSSSDR_SOURCE_DIR}/src/tests/common-files INTERFACE ${GNSSSDR_SOURCE_DIR}/tests/common-files
) )
target_link_libraries(${executable} PRIVATE ${OPT_LIBS_} algorithms_libs) target_link_libraries(${executable} PRIVATE ${OPT_LIBS_} algorithms_libs)
if(NOT ENABLE_GLOG_AND_GFLAGS) if(NOT ENABLE_GLOG_AND_GFLAGS)
@ -1098,7 +1098,7 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
target_include_directories(gnss_block_test target_include_directories(gnss_block_test
PRIVATE ${GNSSSDR_SOURCE_DIR}/src/algorithms/libs PRIVATE ${GNSSSDR_SOURCE_DIR}/src/algorithms/libs
INTERFACE ${GNSSSDR_SOURCE_DIR}/src/tests/common-files INTERFACE ${GNSSSDR_SOURCE_DIR}/tests/common-files
) )
if(ENABLE_FPGA) if(ENABLE_FPGA)
@ -1188,7 +1188,7 @@ endif()
target_include_directories(matio_test target_include_directories(matio_test
INTERFACE INTERFACE
${GNSSSDR_SOURCE_DIR}/src/tests/common-files ${GNSSSDR_SOURCE_DIR}/tests/common-files
) )
xcode_remove_warning_duplicates(matio_test) xcode_remove_warning_duplicates(matio_test)
@ -1238,7 +1238,7 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA)
endif() endif()
target_include_directories(acq_test target_include_directories(acq_test
INTERFACE INTERFACE
${GNSSSDR_SOURCE_DIR}/src/tests/common-files ${GNSSSDR_SOURCE_DIR}/tests/common-files
) )
if(PMT_USES_BOOST_ANY) if(PMT_USES_BOOST_ANY)
target_compile_definitions(acq_test target_compile_definitions(acq_test

View File

@ -55,7 +55,7 @@ target_include_directories(signal_processing_testing_lib
PUBLIC PUBLIC
${GNSSSDR_SOURCE_DIR}/src/core/interfaces ${GNSSSDR_SOURCE_DIR}/src/core/interfaces
INTERFACE INTERFACE
${GNSSSDR_SOURCE_DIR}/src/tests/common-files ${GNSSSDR_SOURCE_DIR}/tests/common-files
) )
if(USE_GENERIC_LAMBDAS) if(USE_GENERIC_LAMBDAS)

Some files were not shown because too many files have changed in this diff Show More