]> granicus.if.org Git - libevent/commitdiff
cmake: do not detect _GNU_SOURCE/__GNU_LIBRARY__ if it is cached
authorAzat Khuzhin <a3at.mail@gmail.com>
Sun, 4 Nov 2018 16:48:11 +0000 (19:48 +0300)
committerAzat Khuzhin <azat@libevent.org>
Sat, 2 Feb 2019 12:18:02 +0000 (15:18 +0300)
(cherry picked from commit 3ed93997387296e374d8a2dd770e43ddfa3328e9)

CMakeLists.txt

index 48885a325b8c1faa832c4e893023a95bef849d64..ae0be78de6f60b235052048906feec64b5b12832 100644 (file)
@@ -256,7 +256,7 @@ if (SOLARIS)
 endif()
 
 # Check if _GNU_SOURCE is available.
-if (NOT _GNU_SOURCE)
+if (NOT DEFINED _GNU_SOURCE)
   CHECK_SYMBOL_EXISTS(__GNU_LIBRARY__ "features.h" _GNU_SOURCE)
 
   if (NOT _GNU_SOURCE)