summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-11-07 14:46:58 +0100
committerTom Stellard <tstellar@redhat.com>2022-11-10 16:57:19 -0800
commit58ba50a52edeff3cae9cfa3bdd0ee000873ffef9 (patch)
tree450ce3c0c78ac23c0750a9d99fbe677b20cdd186
parent931b6d51d84e2a5cbbdc925d546819d4d3b7c63e (diff)
downloadllvm-58ba50a52edeff3cae9cfa3bdd0ee000873ffef9.tar.gz
[cmake] Add missing CMakePushCheckState include to FindLibEdit.cmake
Add the missing include to fix an error when `cmake_push_check_state()` is called and incidentally the CMakePushCheckState module is not loaded by any other check running prior to `FindLibEdit.cmake`: CMake Error at /var/no-tmpfs/portage/dev-util/lldb-15.0.4/work/cmake/Modules/FindLibEdit.cmake:24 (cmake_push_check_state): Unknown CMake command "cmake_push_check_state". Call Stack (most recent call first): cmake/modules/LLDBConfig.cmake:52 (find_package) cmake/modules/LLDBConfig.cmake:59 (add_optional_dependency) CMakeLists.txt:28 (include) Gentoo Bug: https://bugs.gentoo.org/880065 Differential Revision: https://reviews.llvm.org/D137555 (cherry picked from commit 3676a86a4322e8c2b9c541f057b5d3704146b8f3)
-rw-r--r--cmake/Modules/FindLibEdit.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/Modules/FindLibEdit.cmake b/cmake/Modules/FindLibEdit.cmake
index 7e62d4d839ae..de8f5a2e7101 100644
--- a/cmake/Modules/FindLibEdit.cmake
+++ b/cmake/Modules/FindLibEdit.cmake
@@ -21,6 +21,7 @@ find_library(LibEdit_LIBRARIES NAMES edit HINTS ${PC_LIBEDIT_LIBRARY_DIRS})
include(CheckIncludeFile)
if(LibEdit_INCLUDE_DIRS AND EXISTS "${LibEdit_INCLUDE_DIRS}/histedit.h")
+ include(CMakePushCheckState)
cmake_push_check_state()
list(APPEND CMAKE_REQUIRED_INCLUDES ${LibEdit_INCLUDE_DIRS})
list(APPEND CMAKE_REQUIRED_LIBRARIES ${LibEdit_LIBRARIES})