From 580ddfdff097ce6b329db15f0ffd9d7970cd40cc Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 22 Feb 2020 10:41:18 +0100 Subject: [PATCH] Inform user whether utility tools will be built or not. Shut down warnings raised by GPSTk --- src/utils/rinex-tools/CMakeLists.txt | 10 ++++++++-- src/utils/rinex2assist/CMakeLists.txt | 12 ++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/utils/rinex-tools/CMakeLists.txt b/src/utils/rinex-tools/CMakeLists.txt index bdd38fdf4..fac6682f4 100644 --- a/src/utils/rinex-tools/CMakeLists.txt +++ b/src/utils/rinex-tools/CMakeLists.txt @@ -8,6 +8,7 @@ # if("${ARMADILLO_VERSION_STRING}" VERSION_GREATER "9.800" OR (NOT ARMADILLO_FOUND) OR ENABLE_OWN_ARMADILLO) # requires back(), introduced in Armadillo 9.800 + message(STATUS "The obsdiff utility tool will be built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'") find_package(GPSTK QUIET) if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK) include(GNUInstallDirs) @@ -19,8 +20,13 @@ if("${ARMADILLO_VERSION_STRING}" VERSION_GREATER "9.800" OR (NOT ARMADILLO_FOUND source_group(Headers FILES ${obsdiff_HEADERS}) add_executable(obsdiff ${CMAKE_CURRENT_SOURCE_DIR}/obsdiff.cc ${obsdiff_HEADERS}) - set_property(TARGET obsdiff PROPERTY CXX_STANDARD 14) # Required by GPSTk 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(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO) add_dependencies(obsdiff armadillo-${armadillo_RELEASE}) @@ -61,5 +67,5 @@ if("${ARMADILLO_VERSION_STRING}" VERSION_GREATER "9.800" OR (NOT ARMADILLO_FOUND ) else() message(STATUS "The Armadillo library version found (${ARMADILLO_VERSION_STRING}) is older than 9.800.") - message(STATUS " obsdiff will not be built.") + message(STATUS "The obsdiff utility tool will not be built.") endif() diff --git a/src/utils/rinex2assist/CMakeLists.txt b/src/utils/rinex2assist/CMakeLists.txt index c045bc44a..412986229 100644 --- a/src/utils/rinex2assist/CMakeLists.txt +++ b/src/utils/rinex2assist/CMakeLists.txt @@ -46,10 +46,14 @@ find_program(UNCOMPRESS_EXECUTABLE uncompress ) if(Boost_FOUND) - set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated") + message(STATUS "The rinex2assist utility tool will be built when doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME}'") 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 + ) target_link_libraries(rinex2assist PUBLIC Boost::iostreams @@ -89,7 +93,7 @@ if(Boost_FOUND) ) else() message(STATUS "Boost Iostreams library not found.") - message(STATUS " rinex2assist will not be built.") + message(STATUS "The rinex2assist utility tool will not be built.") endif() set(Boost_FOUND TRUE) # trick for summary report