]> granicus.if.org Git - libevent/commitdiff
cmake: set CMP0075 to NEW (for ws2_32.lib in win32)
authorAzat Khuzhin <a3at.mail@gmail.com>
Mon, 5 Nov 2018 15:30:38 +0000 (18:30 +0300)
committerAzat Khuzhin <azat@libevent.org>
Sat, 2 Feb 2019 12:18:03 +0000 (15:18 +0300)
Otherwise cmake complains:
  Policy CMP0075 is not set: Include file check macros honor
  CMAKE_REQUIRED_LIBRARIES.  Run "cmake --help-policy CMP0075" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  CMAKE_REQUIRED_LIBRARIES is set to:
    ws2_32.lib

  For compatibility with CMake 3.11 and below this check is ignoring it.

(cherry picked from commit 6d3a53966bc822fd580a6a02301838aca601391b)

CMakeLists.txt

index ac128ed6a9a43f9db570089f6100a2efa5f7cfc0..a82d6f57ed1b309bee0c213e17ee31d0d59d3f48 100644 (file)
@@ -30,6 +30,9 @@ endif()
 if (POLICY CMP0074)
     cmake_policy(SET CMP0074 NEW)
 endif()
+if (POLICY CMP0075)
+    cmake_policy(SET CMP0075 NEW)
+endif()
 
 if(NOT CMAKE_BUILD_TYPE)
     set(CMAKE_BUILD_TYPE Release