From 6195a457a79ef7307cd0d9231dc88bb65cd81f33 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Fri, 24 Mar 2023 15:37:57 +0100 Subject: [PATCH] Silence compiler warnings in code we don't maintain --- CMakeLists.txt | 12 ++++++------ icinga-app/CMakeLists.txt | 2 +- lib/base/CMakeLists.txt | 8 ++++---- lib/db_ido_mysql/CMakeLists.txt | 2 +- lib/db_ido_pgsql/CMakeLists.txt | 2 +- lib/icingadb/CMakeLists.txt | 2 +- lib/mysql_shim/CMakeLists.txt | 2 +- lib/pgsql_shim/CMakeLists.txt | 2 +- third-party/cmake/BoostTestTargets.cmake | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e531a0591f..117135113c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -186,21 +186,21 @@ add_definitions(-DBOOST_FILESYSTEM_NO_DEPRECATED) add_definitions(-DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) link_directories(${Boost_LIBRARY_DIRS}) -include_directories(${Boost_INCLUDE_DIRS}) +include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) find_package(OpenSSL REQUIRED) -include_directories(${OPENSSL_INCLUDE_DIR}) +include_directories(SYSTEM ${OPENSSL_INCLUDE_DIR}) set(base_DEPS ${CMAKE_DL_LIBS} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES}) set(base_OBJS $ $ $) # JSON find_package(JSON) -include_directories(${JSON_INCLUDE}) +include_directories(SYSTEM ${JSON_INCLUDE}) # UTF8CPP find_package(UTF8CPP) -include_directories(${UTF8CPP_INCLUDE}) +include_directories(SYSTEM ${UTF8CPP_INCLUDE}) find_package(Editline) set(HAVE_EDITLINE "${EDITLINE_FOUND}") @@ -223,12 +223,12 @@ endif() if(EDITLINE_FOUND) list(APPEND base_DEPS ${EDITLINE_LIBRARIES}) - include_directories(${EDITLINE_INCLUDE_DIR}) + include_directories(SYSTEM ${EDITLINE_INCLUDE_DIR}) endif() if(TERMCAP_FOUND) list(APPEND base_DEPS ${TERMCAP_LIBRARIES}) - include_directories(${TERMCAP_INCLUDE_DIR}) + include_directories(SYSTEM ${TERMCAP_INCLUDE_DIR}) endif() if(WIN32) diff --git a/icinga-app/CMakeLists.txt b/icinga-app/CMakeLists.txt index ef71ad99975..d5e120100a5 100644 --- a/icinga-app/CMakeLists.txt +++ b/icinga-app/CMakeLists.txt @@ -19,7 +19,7 @@ set_target_properties ( FOLDER Lib ) -include_directories(${Boost_INCLUDE_DIRS}) +include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) if(ICINGA2_WITH_CHECKER) list(APPEND icinga_app_SOURCES $) diff --git a/lib/base/CMakeLists.txt b/lib/base/CMakeLists.txt index e50e330e44e..a60d7eb3cb7 100644 --- a/lib/base/CMakeLists.txt +++ b/lib/base/CMakeLists.txt @@ -130,7 +130,7 @@ if(HAVE_SYSTEMD) find_path(SYSTEMD_INCLUDE_DIR NAMES systemd/sd-daemon.h HINTS ${SYSTEMD_ROOT_DIR}) - include_directories(${SYSTEMD_INCLUDE_DIR}) + include_directories(SYSTEM ${SYSTEMD_INCLUDE_DIR}) set_property( SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/journaldlogger.cpp APPEND PROPERTY COMPILE_DEFINITIONS @@ -140,13 +140,13 @@ endif() add_library(base OBJECT ${base_SOURCES}) -include_directories(${icinga2_SOURCE_DIR}/third-party/execvpe) +include_directories(SYSTEM ${icinga2_SOURCE_DIR}/third-party/execvpe) link_directories(${icinga2_BINARY_DIR}/third-party/execvpe) -include_directories(${icinga2_SOURCE_DIR}/third-party/mmatch) +include_directories(SYSTEM ${icinga2_SOURCE_DIR}/third-party/mmatch) link_directories(${icinga2_BINARY_DIR}/third-party/mmatch) -include_directories(${icinga2_SOURCE_DIR}/third-party/socketpair) +include_directories(SYSTEM ${icinga2_SOURCE_DIR}/third-party/socketpair) link_directories(${icinga2_BINARY_DIR}/third-party/socketpair) set_target_properties ( diff --git a/lib/db_ido_mysql/CMakeLists.txt b/lib/db_ido_mysql/CMakeLists.txt index 70cb90db164..d99edc53722 100644 --- a/lib/db_ido_mysql/CMakeLists.txt +++ b/lib/db_ido_mysql/CMakeLists.txt @@ -12,7 +12,7 @@ endif() add_library(db_ido_mysql OBJECT ${db_ido_mysql_SOURCES}) -include_directories(${MYSQL_INCLUDE_DIR}) +include_directories(SYSTEM ${MYSQL_INCLUDE_DIR}) add_dependencies(db_ido_mysql base config icinga db_ido) diff --git a/lib/db_ido_pgsql/CMakeLists.txt b/lib/db_ido_pgsql/CMakeLists.txt index e081a62789d..191a76a9be3 100644 --- a/lib/db_ido_pgsql/CMakeLists.txt +++ b/lib/db_ido_pgsql/CMakeLists.txt @@ -12,7 +12,7 @@ endif() add_library(db_ido_pgsql OBJECT ${db_ido_pgsql_SOURCES}) -include_directories(${PostgreSQL_INCLUDE_DIRS}) +include_directories(SYSTEM ${PostgreSQL_INCLUDE_DIRS}) add_dependencies(db_ido_pgsql base config icinga db_ido) diff --git a/lib/icingadb/CMakeLists.txt b/lib/icingadb/CMakeLists.txt index de8e4adaeec..133fb7d6dc3 100644 --- a/lib/icingadb/CMakeLists.txt +++ b/lib/icingadb/CMakeLists.txt @@ -15,7 +15,7 @@ endif() add_library(icingadb OBJECT ${icingadb_SOURCES}) -include_directories(${icinga2_SOURCE_DIR}/third-party) +include_directories(SYSTEM ${icinga2_SOURCE_DIR}/third-party) add_dependencies(icingadb base config icinga remote) diff --git a/lib/mysql_shim/CMakeLists.txt b/lib/mysql_shim/CMakeLists.txt index fc7dbeec3ce..8b982393a6d 100644 --- a/lib/mysql_shim/CMakeLists.txt +++ b/lib/mysql_shim/CMakeLists.txt @@ -1,6 +1,6 @@ # Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ -include_directories(${MYSQL_INCLUDE_DIR}) +include_directories(SYSTEM ${MYSQL_INCLUDE_DIR}) set(mysql_shim_SOURCES mysql_shim.def diff --git a/lib/pgsql_shim/CMakeLists.txt b/lib/pgsql_shim/CMakeLists.txt index 327b64a9d90..06395ac99cd 100644 --- a/lib/pgsql_shim/CMakeLists.txt +++ b/lib/pgsql_shim/CMakeLists.txt @@ -1,7 +1,7 @@ # Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ link_directories(${PostgreSQL_LIBRARY_DIRS}) -include_directories(${PostgreSQL_INCLUDE_DIRS}) +include_directories(SYSTEM ${PostgreSQL_INCLUDE_DIRS}) set(pgsql_shim_SOURCES pgsql_shim.def diff --git a/third-party/cmake/BoostTestTargets.cmake b/third-party/cmake/BoostTestTargets.cmake index 4555dff7229..13d6e808816 100644 --- a/third-party/cmake/BoostTestTargets.cmake +++ b/third-party/cmake/BoostTestTargets.cmake @@ -130,7 +130,7 @@ function(add_boost_test _name) if(Boost_FOUND) - include_directories(${Boost_INCLUDE_DIRS}) + include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) set(includeType) foreach(src ${SOURCES})