فهرست منبع

curl: Disable warnings to avoid changing 3rd party code

Brad King 11 سال پیش
والد
کامیت
17b24d552b
1فایلهای تغییر یافته به همراه8 افزوده شده و 0 حذف شده
  1. 8 0
      Utilities/cmcurl/CMakeLists.txt

+ 8 - 0
Utilities/cmcurl/CMakeLists.txt

@@ -36,6 +36,14 @@ if(WIN32)
   set(HAVE_INET_PTON 0 CACHE INTERNAL "Do not use inet_pton")
   set(HAVE_INET_PTON 0 CACHE INTERNAL "Do not use inet_pton")
 endif()
 endif()
 
 
+# Disable warnings to avoid changing 3rd party code.
+if(CMAKE_C_COMPILER_ID MATCHES
+    "^(GNU|Clang|AppleClang|XL|VisualAge|SunPro|MIPSpro|HP|Intel)$")
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
+elseif(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
+endif()
+
 #***************************************************************************
 #***************************************************************************
 #                                  _   _ ____  _
 #                                  _   _ ____  _
 #  Project                     ___| | | |  _ \| |
 #  Project                     ___| | | |  _ \| |