From 0c59f34ab98662ce03548509b7d36f83de76f39b Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 5 Nov 2013 07:32:11 +0100 Subject: [PATCH] Fix compiler warnings when compiling with Clang. Fixes #4997 --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 977615223..78fb84193 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,6 +65,11 @@ if(APPLE) set(CMAKE_INSTALL_NAME_DIR "@executable_path/../lib/icinga2") endif(APPLE) +if("${CMAKE_C_COMPILER_ID}" MATCHES "Clang") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments") +endif() + if(MSVC) add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP") @@ -102,4 +107,4 @@ add_subdirectory(etc) add_subdirectory(itl) add_subdirectory(doc) add_subdirectory(test) -add_subdirectory(pki) \ No newline at end of file +add_subdirectory(pki)