From b52c6498753262549bcf088e7c7836ddd4d50ce1 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sun, 4 Nov 2018 19:48:11 +0300 Subject: [PATCH] cmake: do not detect _GNU_SOURCE/__GNU_LIBRARY__ if it is cached (cherry picked from commit 3ed93997387296e374d8a2dd770e43ddfa3328e9) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)