Files
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

69 lines
2.6 KiB
CMake

#.rst:
# FindCursesAndPanel
# -----------
#
# Find the curses, terminfo, and panel library as a whole.
include(CMakePushCheckState)
function(lldb_check_curses_tinfo CURSES_INCLUDE_DIRS CURSES_LIBRARIES CURSES_HAS_TINFO)
cmake_reset_check_state()
set(CMAKE_REQUIRED_INCLUDES "${CURSES_INCLUDE_DIRS}")
set(CMAKE_REQUIRED_LIBRARIES "${CURSES_LIBRARIES}")
# acs_map is one of many symbols that are part of tinfo but could
# be bundled in curses.
check_symbol_exists(acs_map "curses.h" CURSES_HAS_TINFO)
endfunction()
if(CURSES_INCLUDE_DIRS AND CURSES_LIBRARIES AND PANEL_LIBRARIES)
if(NOT HAS_TERMINFO_SYMBOLS)
lldb_check_curses_tinfo("${CURSES_INCLUDE_DIRS}"
"${CURSES_LIBRARIES}"
CURSES_HAS_TINFO)
if(NOT CURSES_HAS_TINFO)
message(WARNING "CURSES_LIBRARIES was provided manually but is missing terminfo symbols")
endif()
mark_as_advanced(CURSES_HAS_TINFO)
endif()
set(CURSESANDPANEL_FOUND TRUE)
else()
find_package(Curses QUIET)
find_library(PANEL_LIBRARIES NAMES panel DOC "The curses panel library" QUIET)
include(FindPackageHandleStandardArgs)
if(CURSES_FOUND AND PANEL_LIBRARIES)
# Sometimes the curses libraries define their own terminfo symbols,
# other times they're extern and are defined by a separate terminfo library.
# Auto-detect which.
lldb_check_curses_tinfo("${CURSES_INCLUDE_DIRS}"
"${CURSES_LIBRARIES}"
CURSES_HAS_TINFO)
if(NOT CURSES_HAS_TINFO)
message(STATUS "curses library missing terminfo symbols, looking for tinfo separately")
find_library(TINFO_LIBRARIES NAMES tinfo terminfo DOC "The curses tinfo library" QUIET)
list(APPEND CURSES_LIBRARIES "${TINFO_LIBRARIES}")
endif()
set(HAS_TERMINFO_SYMBOLS "$<OR:$<BOOL:${TERMINFO_LIBRARIES}>,$<BOOL:${CURSES_HAS_TINFO}>>")
endif()
find_package_handle_standard_args(CursesAndPanel
FOUND_VAR
CURSESANDPANEL_FOUND
REQUIRED_VARS
CURSES_INCLUDE_DIRS
CURSES_LIBRARIES
PANEL_LIBRARIES
HAS_TERMINFO_SYMBOLS)
if(CURSES_FOUND AND PANEL_LIBRARIES AND HAS_TERMINFO_SYMBOLS)
mark_as_advanced(CURSES_INCLUDE_DIRS
PANEL_LIBRARIES
HAS_TERMINFO_SYMBOLS
CURSES_HAS_TINFO)
endif()
if(TINFO_LIBRARIES)
mark_as_advanced(TINFO_LIBRARIES)
endif()
endif()