]> granicus.if.org Git - libevent/commitdiff
Added -Qunused-arguments for clang on macosx
authorTrond Norbye <trond.norbye@gmail.com>
Fri, 14 Feb 2014 07:26:07 +0000 (08:26 +0100)
committerTrond Norbye <trond.norbye@gmail.com>
Fri, 14 Feb 2014 08:15:27 +0000 (09:15 +0100)
The CLang provided through Xcode on Mac OSX emits warnings for
all unused include paths making the compilation extremely verbose.

CMakeLists.txt

index 2602a6d3c3c75aad15ae35d713ae0a9801cfb404..71d96ec32bdde8582d1e1a986452fc5afed1d439 100644 (file)
@@ -119,6 +119,10 @@ endif()
 if (APPLE)
     # Get rid of deprecated warnings for OpenSSL on OSX 10.7 and greater.
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=deprecated-declarations")
+    # Get rid of "clang: warning: argument unused during compilation: -I etc
+    if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments")
+    endif()
 endif()
 
 # Winsock.