1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-31 03:14:56 +00:00

Shut down warnings raised by GPSTk in GCC

This commit is contained in:
Carles Fernandez 2020-02-22 12:28:35 +01:00
parent 580ddfdff0
commit f193d5afb2
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 31 additions and 16 deletions

View File

@ -23,11 +23,19 @@ if("${ARMADILLO_VERSION_STRING}" VERSION_GREATER "9.800" OR (NOT ARMADILLO_FOUND
target_include_directories(obsdiff PUBLIC ${CMAKE_SOURCE_DIR}/src/tests/common-files)
set_property(TARGET obsdiff PROPERTY CXX_STANDARD 14) # Required by GPSTk v3.0.0
# Do not show warnings raised by GPSTk v3.0.0
target_compile_options(obsdiff
PUBLIC
-Wno-deprecated -Wno-unused-parameter -Wno-sign-compare -Wno-reorder
)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(obsdiff
PUBLIC
-Wno-deprecated -Wno-unused-parameter -Wno-sign-compare -Wno-reorder -Wno-deprecated-copy -Wno-extra -Wno-unused-but-set-variable -Wno-unknown-pragmas
)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(obsdiff
PUBLIC
-Wno-deprecated -Wno-unused-parameter -Wno-sign-compare -Wno-reorder
)
endif()
if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
add_dependencies(obsdiff armadillo-${armadillo_RELEASE})
endif()

View File

@ -1,16 +1,16 @@
# Copyright (C) 2012-2020 (see AUTHORS file for a list of contributors)
#Copyright(C) 2012 - 2020(see AUTHORS file for a list of contributors)
#
# GNSS-SDR is a software-defined Global Navigation Satellite Systems receiver
#GNSS - SDR is a software - defined Global Navigation Satellite Systems receiver
#
# This file is part of GNSS-SDR.
#This file is part of GNSS - SDR.
#
# SPDX-License-Identifier: GPL-3.0-or-later
#SPDX - License - Identifier : GPL - 3.0 - or -later
#
find_package(GPSTK QUIET)
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
include(GNUInstallDirs)
#string(REGEX REPLACE /[^/]*$ "" LIBDIR ${CMAKE_INSTALL_LIBDIR})
#string(REGEX REPLACE / [^ / ] * $ "" LIBDIR ${CMAKE_INSTALL_LIBDIR})
set(GPSTK_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/../../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_SHARED_LIBRARY_SUFFIX})
set(GPSTK_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../thirdparty/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/include)
endif()
@ -50,10 +50,19 @@ if(Boost_FOUND)
add_executable(rinex2assist ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
set_property(TARGET rinex2assist PROPERTY CXX_STANDARD 14) # Required by GPSTk
# Do not show warnings raised by GPSTk v3.0.0
target_compile_options(rinex2assist
PUBLIC
-Wno-deprecated -Wno-unused-parameter -Wno-sign-compare
)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(rinex2assist
PUBLIC
-Wno-deprecated -Wno-unused-parameter -Wno-sign-compare -Wno-type-limits -Wno-unused-but-set-variable -Wno-deprecated-copy -Wno-extra
)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(rinex2assist
PUBLIC
-Wno-deprecated -Wno-unused-parameter -Wno-sign-compare
)
endif()
target_link_libraries(rinex2assist
PUBLIC
Boost::iostreams
@ -61,8 +70,6 @@ if(Boost_FOUND)
${GPSTK_LIBRARY}
Gflags::gflags
Threads::Threads
algorithms_libs
core_receiver
core_system_parameters
)