summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2018-11-21 20:50:16 +0100
committerRolf Eike Beer <eike@sf-mail.de>2018-11-21 20:50:16 +0100
commitf9c7f0a0f26670c2950dbfaef5a3424e697a2ed9 (patch)
treeec058fdb4ec1e4ed8992f8d9c014449e6cfe269c
parentc114bb9fb585e7d74158afa7afbe8c44922479de (diff)
downloadlibarchive-f9c7f0a0f26670c2950dbfaef5a3424e697a2ed9.tar.gz
reset CMAKE_REQUIRED_LIBRARIES before checking system headers
This fixes this CMake warning with CMake 3.12 and newer: CMake Warning (dev) at /usr/share/cmake/Modules/CheckIncludeFiles.cmake:110 (message): Policy CMP0075 is not set: Include file check macros honor CMAKE_REQUIRED_LIBRARIES. Run "cmake --help-policy CMP0075" for policy details. Use the cmake_policy command to set the policy and suppress this warning. CMAKE_REQUIRED_LIBRARIES is set to: /usr/lib/liblzma.so For compatibility with CMake 3.11 and below this check is ignoring it. Call Stack (most recent call first): CMakeLists.txt:602 (CHECK_INCLUDE_FILES) CMakeLists.txt:609 (LA_CHECK_INCLUDE_FILE)
-rw-r--r--CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a5641ade..4d225b32 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -592,6 +592,8 @@ ENDIF(ZSTD_FOUND)
MARK_AS_ADVANCED(CLEAR ZSTD_INCLUDE_DIR)
MARK_AS_ADVANCED(CLEAR ZSTD_LIBRARY)
+set(CMAKE_REQUIRED_LIBRARIES)
+
#
# Check headers
#