]> granicus.if.org Git - libevent/commitdiff
Enable kqueue for APPLE targets
authorKeith Smiley <keithbsmiley@gmail.com>
Tue, 2 Jul 2019 17:47:47 +0000 (10:47 -0700)
committerAzat Khuzhin <a3at.mail@gmail.com>
Thu, 1 Aug 2019 21:08:41 +0000 (00:08 +0300)
The CMAKE_CROSSCOMPILING variable is not set for Apple targets seemingly
because of cmake implementation details (more info
https://cmake.org/cmake/help/latest/variable/CMAKE_CROSSCOMPILING.html).
Since Apple targets have working kqueue implementations this check makes
sure we enable it always when those are the targets, without users
having to explicitly set EVENT__HAVE_WORKING_KQUEUE

(cherry picked from commit 0d7d85c2083f7a4c9efe01c061486f332b576d28)

CMakeLists.txt

index 1762c2f741b438a26b62af41e1a2c637fa47b561..70948f1bf06b8ae0d2a1543aa6b7febd8711d789 100644 (file)
@@ -626,7 +626,7 @@ CHECK_TYPE_SIZE("time_t" EVENT__SIZEOF_TIME_T)
 
 # Verify kqueue works with pipes.
 if (EVENT__HAVE_KQUEUE)
-    if (CMAKE_CROSSCOMPILING AND NOT EVENT__FORCE_KQUEUE_CHECK)
+    if ((CMAKE_CROSSCOMPILING OR APPLE) AND NOT EVENT__FORCE_KQUEUE_CHECK)
         message(WARNING "Cannot check if kqueue works with pipes when crosscompiling, use EVENT__FORCE_KQUEUE_CHECK to be sure (this requires manually running a test program on the cross compilation target)")
         set(EVENT__HAVE_WORKING_KQUEUE 1)
     else()