From 193af050081b1d354e7ce02dd74c74f31cea28b5 Mon Sep 17 00:00:00 2001 From: lifegpc Date: Tue, 31 May 2022 00:35:22 +0000 Subject: [PATCH] Restore CMAKE_REQUIRED_DEFINITIONS after check fcloseall --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 68dafa7..44f2f18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,11 +51,13 @@ if (HAVE_STRERROR_R) test_strerror_r(HAVE_GNU_STRERROR_R) endif() if (NOT WIN32) + set(TMP "${CMAKE_REQUIRED_DEFINITIONS}") set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE) check_symbol_exists(fcloseall "stdio.h" HAVE_FCLOSEALL) if (HAVE_FCLOSEALL) add_compile_definitions(_GNU_SOURCE) endif() + set(CMAKE_REQUIRED_DEFINITIONS "${TMP}") endif() configure_file("${CMAKE_CURRENT_SOURCE_DIR}/utils_config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/utils_config.h")