From 12a2fcadbe1b686db018481ac2f92c81e1582b95 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 10 Jul 2024 14:28:16 +0200 Subject: [PATCH] Bump max version of CMake to 3.30 --- CMakeLists.txt | 2 +- .../volk_gnsssdr/CMakeLists.txt | 2 +- src/main/CMakeLists.txt | 3 +- src/tests/CMakeLists.txt | 34 +++++++++++++------ src/utils/nav-listener/CMakeLists.txt | 2 +- src/utils/rinex-tools/CMakeLists.txt | 2 +- src/utils/rinex2assist/CMakeLists.txt | 2 +- 7 files changed, 30 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b03062db2..b3284dd91 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ endif() # Build type can still be overridden by setting -DCMAKE_BUILD_TYPE= set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") -cmake_minimum_required(VERSION 2.8.12...3.29) +cmake_minimum_required(VERSION 2.8.12...3.30) project(gnss-sdr CXX C) set(GNSSSDR_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) # Allows to be a sub-project diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt index a57544a7f..e567eab94 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt @@ -8,7 +8,7 @@ ######################################################################## # Project setup ######################################################################## -cmake_minimum_required(VERSION 2.8.12...3.29) +cmake_minimum_required(VERSION 2.8.12...3.30) set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose build type: None Debug Release RelWithDebInfo MinSizeRel") project(volk_gnsssdr) enable_language(CXX) diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt index 04b2a0622..c58266231 100644 --- a/src/main/CMakeLists.txt +++ b/src/main/CMakeLists.txt @@ -26,7 +26,8 @@ if(ENABLE_GLOG_AND_GFLAGS) target_link_libraries(gnss-sdr PRIVATE Gflags::gflags Glog::glog) target_compile_definitions(gnss-sdr PUBLIC -DUSE_GLOG_AND_GFLAGS=1) else() - target_link_libraries(gnss-sdr PRIVATE absl::flags absl::flags_parse absl::log $ absl::log_initialize absl::log_sink absl::log_sink_registry) + target_link_libraries(gnss-sdr PRIVATE absl::flags absl::flags_parse absl::log absl::log_initialize absl::log_sink absl::log_sink_registry) + target_link_libraries(gnss-sdr INTERFACE "$") endif() if(NOT ENABLE_LOG) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index ebc9e7ab3..160a3c32d 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -623,7 +623,8 @@ if(ENABLE_UNIT_TESTING) target_link_libraries(run_tests PRIVATE Gflags::gflags Glog::glog) target_compile_definitions(run_tests PRIVATE -DUSE_GLOG_AND_GFLAGS=1) else() - target_link_libraries(run_tests PRIVATE absl::flags absl::flags_parse absl::log $ absl::log_initialize) + target_link_libraries(run_tests PRIVATE absl::flags absl::flags_parse absl::log absl::log_initialize) + target_link_libraries(run_tests INTERFACE "$") endif() target_include_directories(run_tests INTERFACE @@ -773,7 +774,8 @@ if(ENABLE_FPGA) target_link_libraries(gps_l1_ca_dll_pll_tracking_test_fpga PRIVATE Gflags::gflags Glog::glog) target_compile_definitions(gps_l1_ca_dll_pll_tracking_test_fpga PRIVATE -DUSE_GLOG_AND_GFLAGS=1) else() - target_link_libraries(gps_l1_ca_dll_pll_tracking_test_fpga PRIVATE absl::flags absl::flags_parse absl::log $ absl::log_initialize) + target_link_libraries(gps_l1_ca_dll_pll_tracking_test_fpga PRIVATE absl::flags absl::flags_parse absl::log absl::log_initialize) + target_link_libraries(gps_l1_ca_dll_pll_tracking_test_fpga INTERFACE "$") endif() target_include_directories(gps_l1_ca_dll_pll_tracking_test_fpga INTERFACE ${GNSSSDR_SOURCE_DIR}/src/tests/common-files @@ -814,6 +816,9 @@ function(add_system_test executable) INTERFACE ${GNSSSDR_SOURCE_DIR}/src/tests/common-files ) target_link_libraries(${executable} PRIVATE ${OPT_LIBS_} algorithms_libs) + if(NOT ENABLE_GLOG_AND_GFLAGS) + target_link_libraries(${executable} INTERFACE "$") + endif() if(GNURADIO_USES_STD_POINTERS) target_compile_definitions(${executable} PRIVATE -DGNURADIO_USES_STD_POINTERS=1 @@ -872,7 +877,7 @@ if(ENABLE_SYSTEM_TESTING) if(ENABLE_GLOG_AND_GFLAGS) set(OPT_LIBS_ ${OPT_LIBS_} Gflags::gflags Glog::glog) else() - set(OPT_LIBS_ ${OPT_LIBS_} absl::flags_parse absl::flags absl::log $ absl::log_initialize absl::log_sink absl::log_sink_registry) + set(OPT_LIBS_ ${OPT_LIBS_} absl::flags_parse absl::flags absl::log absl::log_initialize absl::log_sink absl::log_sink_registry) endif() if(NOT ENABLE_PACKAGING) add_system_test(ttff @@ -896,7 +901,7 @@ if(ENABLE_SYSTEM_TESTING) if(ENABLE_GLOG_AND_GFLAGS) set(OPT_LIBS_ ${OPT_LIBS_} Gflags::gflags Glog::glog) else() - set(OPT_LIBS_ ${OPT_LIBS_} absl::flags_parse absl::log $ absl::log_initialize absl::log_sink absl::log_sink_registry) + set(OPT_LIBS_ ${OPT_LIBS_} absl::flags_parse absl::log absl::log_initialize absl::log_sink absl::log_sink_registry) endif() add_system_test(position_test CMAKE_ARGS -DCMAKE_BUILD_TYPE=$<$:Debug>$<$:Release>$<$:RelWithDebInfo>$<$:MinSizeRel>$<$:Debug>$<$:Debug>$<$:RelWithDebInfo>$<$:RelWithDebInfo>$<$:Debug> @@ -969,7 +974,8 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA) target_link_libraries(flowgraph_test PRIVATE Gflags::gflags Glog::glog) target_compile_definitions(flowgraph_test PRIVATE -DUSE_GLOG_AND_GFLAGS=1) else() - target_link_libraries(flowgraph_test PRIVATE absl::flags absl::flags_parse absl::log $ absl::log_initialize) + target_link_libraries(flowgraph_test PRIVATE absl::flags absl::flags_parse absl::log absl::log_initialize) + target_link_libraries(flowgraph_test INTERFACE "$") endif() target_include_directories(flowgraph_test @@ -1026,7 +1032,8 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA) target_link_libraries(gnss_block_test PRIVATE Gflags::gflags Glog::glog) target_compile_definitions(gnss_block_test PRIVATE -DUSE_GLOG_AND_GFLAGS=1) else() - target_link_libraries(gnss_block_test PRIVATE absl::flags absl::flags_parse absl::log $ absl::log_initialize) + target_link_libraries(gnss_block_test PRIVATE absl::flags absl::flags_parse absl::log absl::log_initialize) + target_link_libraries(gnss_block_test INTERFACE "$") endif() target_include_directories(gnss_block_test @@ -1078,7 +1085,8 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA) target_link_libraries(gnuradio_block_test PRIVATE Gflags::gflags Glog::glog) target_compile_definitions(gnuradio_block_test PRIVATE -DUSE_GLOG_AND_GFLAGS=1) else() - target_link_libraries(gnuradio_block_test PRIVATE absl::flags absl::flags_parse absl::log $ absl::log_initialize) + target_link_libraries(gnuradio_block_test PRIVATE absl::flags absl::flags_parse absl::log absl::log_initialize) + target_link_libraries(gnuradio_block_test INTERFACE "$") endif() xcode_remove_warning_duplicates(gnuradio_block_test) @@ -1114,7 +1122,8 @@ if(ENABLE_GLOG_AND_GFLAGS) target_link_libraries(matio_test PRIVATE Gflags::gflags Glog::glog) target_compile_definitions(matio_test PRIVATE -DUSE_GLOG_AND_GFLAGS=1) else() - target_link_libraries(matio_test PRIVATE absl::flags absl::flags_parse absl::log $ absl::log_initialize) + target_link_libraries(matio_test PRIVATE absl::flags absl::flags_parse absl::log absl::log_initialize) + target_link_libraries(matio_test INTERFACE "$") endif() target_include_directories(matio_test @@ -1164,7 +1173,8 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA) target_link_libraries(acq_test PRIVATE Gflags::gflags Glog::glog) target_compile_definitions(acq_test PRIVATE -DUSE_GLOG_AND_GFLAGS=1) else() - target_link_libraries(acq_test PRIVATE absl::flags absl::flags_parse absl::log $ absl::log_initialize) + target_link_libraries(acq_test PRIVATE absl::flags absl::flags_parse absl::log absl::log_initialize) + target_link_libraries(acq_test INTERFACE "$") endif() target_include_directories(acq_test INTERFACE @@ -1250,7 +1260,8 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA) target_link_libraries(trk_test PRIVATE Gflags::gflags Glog::glog) target_compile_definitions(trk_test PRIVATE -DUSE_GLOG_AND_GFLAGS=1) else() - target_link_libraries(trk_test PRIVATE absl::flags absl::flags_parse absl::log $ absl::log_initialize) + target_link_libraries(trk_test PRIVATE absl::flags absl::flags_parse absl::log absl::log_initialize) + target_link_libraries(trk_test INTERFACE "$") endif() if(USE_GENERIC_LAMBDAS) set(has_generic_lambdas HAS_GENERIC_LAMBDA=1) @@ -1313,7 +1324,8 @@ if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA) target_link_libraries(control_thread_test PRIVATE Gflags::gflags Glog::glog) target_compile_definitions(control_thread_test PRIVATE -DUSE_GLOG_AND_GFLAGS=1) else() - target_link_libraries(control_thread_test PRIVATE absl::flags absl::flags_parse absl::log $ absl::log_initialize) + target_link_libraries(control_thread_test PRIVATE absl::flags absl::flags_parse absl::log absl::log_initialize) + target_link_libraries(control_thread_test INTERFACE "$") endif() xcode_remove_warning_duplicates(control_thread_test) diff --git a/src/utils/nav-listener/CMakeLists.txt b/src/utils/nav-listener/CMakeLists.txt index 048a862f4..cc86a7bf4 100644 --- a/src/utils/nav-listener/CMakeLists.txt +++ b/src/utils/nav-listener/CMakeLists.txt @@ -4,7 +4,7 @@ # SPDX-FileCopyrightText: 2021 C. Fernandez-Prades cfernandez(at)cttc.es # SPDX-License-Identifier: BSD-3-Clause -cmake_minimum_required(VERSION 3.9...3.23) +cmake_minimum_required(VERSION 3.9...3.30) project(nav-msg-listener CXX) set(CMAKE_CXX_STANDARD 11) diff --git a/src/utils/rinex-tools/CMakeLists.txt b/src/utils/rinex-tools/CMakeLists.txt index 7dd0352c6..695c369ee 100644 --- a/src/utils/rinex-tools/CMakeLists.txt +++ b/src/utils/rinex-tools/CMakeLists.txt @@ -34,7 +34,7 @@ if("${ARMADILLO_VERSION_STRING}" VERSION_GREATER "9.800" OR (NOT ARMADILLO_FOUND endif() target_include_directories(obsdiff PUBLIC ${GNSSSDR_SOURCE_DIR}/src/tests/common-files) - if("${GNSSTK_VERSION}" VERSION_LESS 3.0.1) + if(GNSSTK_VERSION AND "${GNSSTK_VERSION}" VERSION_LESS 3.0.1) set_property(TARGET obsdiff PROPERTY CXX_STANDARD 14) # Required by GPSTk v3.0.0 endif() # Do not show warnings raised by GPSTk v3.0.0 diff --git a/src/utils/rinex2assist/CMakeLists.txt b/src/utils/rinex2assist/CMakeLists.txt index 39f690be5..e439672bc 100644 --- a/src/utils/rinex2assist/CMakeLists.txt +++ b/src/utils/rinex2assist/CMakeLists.txt @@ -59,7 +59,7 @@ if(Boost_FOUND) add_executable(rinex2assist ${CMAKE_CURRENT_SOURCE_DIR}/main.cc) endif() - if("${GNSSTK_VERSION}" VERSION_LESS 3.0.1) + if(GNSSTK_VERSION AND "${GNSSTK_VERSION}" VERSION_LESS 3.0.1) set_property(TARGET rinex2assist PROPERTY CXX_STANDARD 14) # Required by GPSTk v3.0.0 endif()