Commit 364ef52881f98293a5e454aab447bc7c2a3d3725

Jacques Germishuys 2014-04-18T19:13:18

Only disable deprecation warnings on Apple for OpenSSL

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5a87181..6305be8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -340,9 +340,11 @@ ELSE ()
 		SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function")
 	ENDIF()
 
-	CHECK_C_COMPILER_FLAG(-Wno-deprecated-declarations DEPRECATED_DECLARATIONS_WARNING)
-	IF(DEPRECATED_DECLARATIONS_WARNING)
-		SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations")
+	IF (APPLE) # Apple deprecated OpenSSL
+		CHECK_C_COMPILER_FLAG(-Wno-deprecated-declarations DEPRECATED_DECLARATIONS_WARNING)
+		IF(DEPRECATED_DECLARATIONS_WARNING)
+			SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations")
+		ENDIF()
 	ENDIF()
 
 	IF (PROFILE)