Fix compiler warnings when compiling with Clang.

Fixes #4997
This commit is contained in:
Gunnar Beutner 2013-11-05 07:32:11 +01:00
parent 264fdf40d5
commit 0c59f34ab9
1 changed files with 6 additions and 1 deletions

View File

@ -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)
add_subdirectory(pki)