From: Azat Khuzhin Date: Sun, 4 Nov 2018 16:48:11 +0000 (+0300) Subject: cmake: do not detect _GNU_SOURCE/__GNU_LIBRARY__ if it is cached X-Git-Tag: release-2.1.9-beta^2~59 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b52c6498753262549bcf088e7c7836ddd4d50ce1;p=libevent cmake: do not detect _GNU_SOURCE/__GNU_LIBRARY__ if it is cached (cherry picked from commit 3ed93997387296e374d8a2dd770e43ddfa3328e9) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 48885a32..ae0be78d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)