From 5b8b42bcad8743509c1ed4a42e49f432b1e6dfee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Vallv=C3=A9=20Navarro?= <jvallve@iri.upc.edu> Date: Thu, 15 Feb 2024 10:50:59 +0100 Subject: [PATCH] Main --- .gitlab-ci.yml | 6 +- CMakeLists.txt | 2 +- include/gnss_utils/gnss_utils.h | 2 +- include/gnss_utils/navigation.h | 2 +- include/gnss_utils/observations.h | 2 +- include/gnss_utils/range.h | 2 +- include/gnss_utils/receiver_raw_base.h | 2 +- include/gnss_utils/receivers/novatel_raw.h | 2 +- include/gnss_utils/receivers/ublox_raw.h | 2 +- include/gnss_utils/snapshot.h | 2 +- include/gnss_utils/tdcp.h | 2 +- include/gnss_utils/utils/chisquare_ci.h | 2 +- include/gnss_utils/utils/chisquare_ci_maps.h | 2 +- include/gnss_utils/utils/rcv_position.h | 2 +- include/gnss_utils/utils/satellite.h | 2 +- include/gnss_utils/utils/transformations.h | 2 +- include/gnss_utils/utils/utils.h | 2 +- ...eader_2022.txt => license_header_2024.txt} | 2 +- src/examples/gnss_utils_test.cpp | 2 +- src/navigation.cpp | 2 +- src/observations.cpp | 2 +- src/range.cpp | 2 +- src/receiver_raw_base.cpp | 2 +- src/receivers/novatel_raw.cpp | 2 +- src/receivers/ublox_raw.cpp | 2 +- src/snapshot.cpp | 2 +- src/tdcp.cpp | 2 +- src/utils/rcv_position.cpp | 2 +- src/utils/satellite.cpp | 2 +- src/utils/transformations.cpp | 2 +- src/utils/utils.cpp | 2 +- test/CMakeLists.txt | 12 +-- test/gtest/CMakeLists.txt | 76 +++---------------- test/gtest/utils_gtest.h | 2 +- test/gtest_chisquare.cpp | 2 +- test/gtest_example.cpp | 2 +- test/gtest_navigation.cpp | 2 +- test/gtest_observations.cpp | 2 +- test/gtest_tdcp.cpp | 3 +- test/gtest_transformations.cpp | 2 +- 40 files changed, 57 insertions(+), 112 deletions(-) rename scripts/{license_header_2022.txt => license_header_2024.txt} (88%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 59a1fc1..4db3503 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,9 +28,11 @@ stages: - cd $CI_PROJECT_DIR # configure git - - export CI_NEW_BRANCH=ci_processing$RANDOM + - if [ `git rev-parse --verify ci_processing 2>/dev/null` ]; then + - git branch --delete ci_processing + - fi + - export CI_NEW_BRANCH=ci_processing - echo creating new temporary branch... $CI_NEW_BRANCH - #- export CI_NEW_BRANCH=ci_processing$CI_COMMIT_SHORT_SHA - git config --global user.email "${CI_EMAIL}" - git config --global user.name "${CI_USERNAME}" - git checkout -b $CI_NEW_BRANCH # temporary branch diff --git a/CMakeLists.txt b/CMakeLists.txt index d24dbbd..2866fb9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ MESSAGE("Starting gnss-utils CMakeLists ...") # Pre-requisites about cmake itself -CMAKE_MINIMUM_REQUIRED(VERSION 3.10) +CMAKE_MINIMUM_REQUIRED(VERSION 3.16) # MAC OSX RPATH set(CMAKE_MACOSX_RPATH true) diff --git a/include/gnss_utils/gnss_utils.h b/include/gnss_utils/gnss_utils.h index f00d1be..45c2972 100644 --- a/include/gnss_utils/gnss_utils.h +++ b/include/gnss_utils/gnss_utils.h @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/include/gnss_utils/navigation.h b/include/gnss_utils/navigation.h index ca4580b..07535c4 100644 --- a/include/gnss_utils/navigation.h +++ b/include/gnss_utils/navigation.h @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/include/gnss_utils/observations.h b/include/gnss_utils/observations.h index 52b66bf..53ff2b8 100644 --- a/include/gnss_utils/observations.h +++ b/include/gnss_utils/observations.h @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/include/gnss_utils/range.h b/include/gnss_utils/range.h index d783793..54bfd9c 100644 --- a/include/gnss_utils/range.h +++ b/include/gnss_utils/range.h @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/include/gnss_utils/receiver_raw_base.h b/include/gnss_utils/receiver_raw_base.h index 01161ed..bf7c8e8 100644 --- a/include/gnss_utils/receiver_raw_base.h +++ b/include/gnss_utils/receiver_raw_base.h @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/include/gnss_utils/receivers/novatel_raw.h b/include/gnss_utils/receivers/novatel_raw.h index d276803..fe22227 100644 --- a/include/gnss_utils/receivers/novatel_raw.h +++ b/include/gnss_utils/receivers/novatel_raw.h @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/include/gnss_utils/receivers/ublox_raw.h b/include/gnss_utils/receivers/ublox_raw.h index 7cf92bb..25e1c6f 100644 --- a/include/gnss_utils/receivers/ublox_raw.h +++ b/include/gnss_utils/receivers/ublox_raw.h @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/include/gnss_utils/snapshot.h b/include/gnss_utils/snapshot.h index 2381038..2730748 100644 --- a/include/gnss_utils/snapshot.h +++ b/include/gnss_utils/snapshot.h @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/include/gnss_utils/tdcp.h b/include/gnss_utils/tdcp.h index 04a5748..fbf308a 100644 --- a/include/gnss_utils/tdcp.h +++ b/include/gnss_utils/tdcp.h @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/include/gnss_utils/utils/chisquare_ci.h b/include/gnss_utils/utils/chisquare_ci.h index 29e2d44..7ffabc1 100644 --- a/include/gnss_utils/utils/chisquare_ci.h +++ b/include/gnss_utils/utils/chisquare_ci.h @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/include/gnss_utils/utils/chisquare_ci_maps.h b/include/gnss_utils/utils/chisquare_ci_maps.h index c3413ff..18bac13 100644 --- a/include/gnss_utils/utils/chisquare_ci_maps.h +++ b/include/gnss_utils/utils/chisquare_ci_maps.h @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/include/gnss_utils/utils/rcv_position.h b/include/gnss_utils/utils/rcv_position.h index bf84a99..1b9eaee 100644 --- a/include/gnss_utils/utils/rcv_position.h +++ b/include/gnss_utils/utils/rcv_position.h @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/include/gnss_utils/utils/satellite.h b/include/gnss_utils/utils/satellite.h index 0162a11..cd5c5d6 100644 --- a/include/gnss_utils/utils/satellite.h +++ b/include/gnss_utils/utils/satellite.h @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/include/gnss_utils/utils/transformations.h b/include/gnss_utils/utils/transformations.h index 0f224d0..1ee133f 100644 --- a/include/gnss_utils/utils/transformations.h +++ b/include/gnss_utils/utils/transformations.h @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/include/gnss_utils/utils/utils.h b/include/gnss_utils/utils/utils.h index 7c29dd4..127ae38 100644 --- a/include/gnss_utils/utils/utils.h +++ b/include/gnss_utils/utils/utils.h @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/scripts/license_header_2022.txt b/scripts/license_header_2024.txt similarity index 88% rename from scripts/license_header_2022.txt rename to scripts/license_header_2024.txt index 3e36f9b..8658091 100644 --- a/scripts/license_header_2022.txt +++ b/scripts/license_header_2024.txt @@ -1,4 +1,4 @@ -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/src/examples/gnss_utils_test.cpp b/src/examples/gnss_utils_test.cpp index a486c5f..c60eb79 100644 --- a/src/examples/gnss_utils_test.cpp +++ b/src/examples/gnss_utils_test.cpp @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/src/navigation.cpp b/src/navigation.cpp index c9d86a9..20532be 100644 --- a/src/navigation.cpp +++ b/src/navigation.cpp @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/src/observations.cpp b/src/observations.cpp index 4df0dbb..9002dee 100644 --- a/src/observations.cpp +++ b/src/observations.cpp @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/src/range.cpp b/src/range.cpp index e52ee80..98a0887 100644 --- a/src/range.cpp +++ b/src/range.cpp @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/src/receiver_raw_base.cpp b/src/receiver_raw_base.cpp index f21b8e6..76f6960 100644 --- a/src/receiver_raw_base.cpp +++ b/src/receiver_raw_base.cpp @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/src/receivers/novatel_raw.cpp b/src/receivers/novatel_raw.cpp index aa4de46..34b6f7d 100644 --- a/src/receivers/novatel_raw.cpp +++ b/src/receivers/novatel_raw.cpp @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/src/receivers/ublox_raw.cpp b/src/receivers/ublox_raw.cpp index b6e03fe..22c57e3 100644 --- a/src/receivers/ublox_raw.cpp +++ b/src/receivers/ublox_raw.cpp @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/src/snapshot.cpp b/src/snapshot.cpp index 9de0e17..f6689a7 100644 --- a/src/snapshot.cpp +++ b/src/snapshot.cpp @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/src/tdcp.cpp b/src/tdcp.cpp index cb4fc40..6dca496 100644 --- a/src/tdcp.cpp +++ b/src/tdcp.cpp @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/src/utils/rcv_position.cpp b/src/utils/rcv_position.cpp index 77e66b7..4848c26 100644 --- a/src/utils/rcv_position.cpp +++ b/src/utils/rcv_position.cpp @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/src/utils/satellite.cpp b/src/utils/satellite.cpp index eff1d47..ff2e3af 100644 --- a/src/utils/satellite.cpp +++ b/src/utils/satellite.cpp @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/src/utils/transformations.cpp b/src/utils/transformations.cpp index b1e07d5..7b60bec 100644 --- a/src/utils/transformations.cpp +++ b/src/utils/transformations.cpp @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/src/utils/utils.cpp b/src/utils/utils.cpp index 954a53e..f603b2d 100644 --- a/src/utils/utils.cpp +++ b/src/utils/utils.cpp @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 03f45ca..bffa801 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -4,21 +4,21 @@ add_subdirectory(gtest) ############# USE THIS TEST AS AN EXAMPLE #################### # # # Create a specific test executable for gtest_example # -# gnss_utils_add_gtest(gtest_example gtest_example.cpp) # +# add_gtest(gtest_example gtest_example.cpp) # # # ############################################################## # Navigation test -gnss_utils_add_gtest(gtest_navigation gtest_navigation.cpp) +add_gtest(gtest_navigation gtest_navigation.cpp) # Observations test -gnss_utils_add_gtest(gtest_observations gtest_observations.cpp) +add_gtest(gtest_observations gtest_observations.cpp) # TDCP test -gnss_utils_add_gtest(gtest_tdcp gtest_tdcp.cpp) +add_gtest(gtest_tdcp gtest_tdcp.cpp) # Transformations test -gnss_utils_add_gtest(gtest_transformations gtest_transformations.cpp) +add_gtest(gtest_transformations gtest_transformations.cpp) # ChiSquare test -gnss_utils_add_gtest(gtest_chisquare gtest_chisquare.cpp) \ No newline at end of file +add_gtest(gtest_chisquare gtest_chisquare.cpp) \ No newline at end of file diff --git a/test/gtest/CMakeLists.txt b/test/gtest/CMakeLists.txt index df2f89d..3b52f51 100644 --- a/test/gtest/CMakeLists.txt +++ b/test/gtest/CMakeLists.txt @@ -1,73 +1,15 @@ -if(${CMAKE_VERSION} VERSION_LESS "3.11.0") - message("CMake version less than 3.11.0") +include(FetchContent) - # Enable ExternalProject CMake module - include(ExternalProject) +FetchContent_Declare( + googletest + GIT_REPOSITORY https://github.com/google/googletest.git + GIT_TAG main) - set(GTEST_FORCE_SHARED_CRT ON) - set(GTEST_DISABLE_PTHREADS ON) # without this in ubuntu 18.04 we get linking errors - - # Download GoogleTest - ExternalProject_Add(googletest - GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG v1.8.x - # TIMEOUT 1 # We'll try this - CMAKE_ARGS -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG:PATH=DebugLibs - -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=ReleaseLibs - -DCMAKE_CXX_FLAGS=${MSVC_COMPILER_DEFS} - -Dgtest_force_shared_crt=${GTEST_FORCE_SHARED_CRT} - -Dgtest_disable_pthreads=${GTEST_DISABLE_PTHREADS} - -DBUILD_GTEST=ON - PREFIX "${CMAKE_CURRENT_BINARY_DIR}" - # Disable install step - INSTALL_COMMAND "" - UPDATE_DISCONNECTED 1 # 1: do not update googletest; 0: update googletest via github - ) +SET(INSTALL_GTEST OFF) # Disable installation of googletest +FetchContent_MakeAvailable(googletest) - # Get GTest source and binary directories from CMake project - - # Specify include dir - ExternalProject_Get_Property(googletest source_dir) - set(GTEST_INCLUDE_DIRS ${source_dir}/googletest/include PARENT_SCOPE) - - # Specify MainTest's link libraries - ExternalProject_Get_Property(googletest binary_dir) - set(GTEST_LIBS_DIR ${binary_dir}/googlemock/gtest PARENT_SCOPE) - - # Create a libgtest target to be used as a dependency by test programs - add_library(libgtest IMPORTED STATIC GLOBAL) - add_dependencies(libgtest googletest) - - # Set libgtest properties - set_target_properties(libgtest PROPERTIES - "IMPORTED_LOCATION" "${binary_dir}/googlemock/gtest/libgtest.a" - "IMPORTED_LINK_INTERFACE_LIBRARIES" "${CMAKE_THREAD_LIBS_INIT}" - ) - -else() - - message("CMake version equal or greater than 3.11.0") - - include(FetchContent) - - FetchContent_Declare( - googletest - GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG v1.8.x) - - SET(INSTALL_GTEST OFF) # Disable installation of googletest - FetchContent_MakeAvailable(googletest) - -endif() - -function(gnss_utils_add_gtest target) +function(add_gtest target) add_executable(${target} ${ARGN}) - if(${CMAKE_VERSION} VERSION_LESS "3.11.0") - add_dependencies(${target} libgtest) - target_link_libraries(${target} PUBLIC libgtest ${PROJECT_NAME}) - target_include_directories(${target} PUBLIC ${GTEST_INCLUDE_DIRS}) - else() - target_link_libraries(${target} PUBLIC gtest_main ${PROJECT_NAME}) - endif() + target_link_libraries(${target} PUBLIC gtest_main ${PROJECT_NAME}) add_test(NAME ${target} COMMAND ${target}) endfunction() diff --git a/test/gtest/utils_gtest.h b/test/gtest/utils_gtest.h index c4cf21c..439b619 100644 --- a/test/gtest/utils_gtest.h +++ b/test/gtest/utils_gtest.h @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/test/gtest_chisquare.cpp b/test/gtest_chisquare.cpp index 1c07e12..b115cc7 100644 --- a/test/gtest_chisquare.cpp +++ b/test/gtest_chisquare.cpp @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/test/gtest_example.cpp b/test/gtest_example.cpp index c7059c8..fa8563d 100644 --- a/test/gtest_example.cpp +++ b/test/gtest_example.cpp @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/test/gtest_navigation.cpp b/test/gtest_navigation.cpp index be3de35..e5a623c 100644 --- a/test/gtest_navigation.cpp +++ b/test/gtest_navigation.cpp @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/test/gtest_observations.cpp b/test/gtest_observations.cpp index 6508d77..9bf34ad 100644 --- a/test/gtest_observations.cpp +++ b/test/gtest_observations.cpp @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // diff --git a/test/gtest_tdcp.cpp b/test/gtest_tdcp.cpp index 9db8f2b..5b1d152 100644 --- a/test/gtest_tdcp.cpp +++ b/test/gtest_tdcp.cpp @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // @@ -24,6 +24,7 @@ #include "gnss_utils/snapshot.h" #include "gnss_utils/utils/satellite.h" #include "gnss_utils/utils/transformations.h" +#include <iomanip> using namespace GnssUtils; using namespace Eigen; diff --git a/test/gtest_transformations.cpp b/test/gtest_transformations.cpp index e2c3d38..00848dc 100644 --- a/test/gtest_transformations.cpp +++ b/test/gtest_transformations.cpp @@ -1,6 +1,6 @@ //--------LICENSE_START-------- // -// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. +// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informà tica Industrial, CSIC-UPC. // Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu) // All rights reserved. // -- GitLab