[lldb/CMake] Rename LLDB_DISABLE_CURSES to LLDB_ENABLE_CURSES

This matches the naming scheme used by LLVM.

Differential revision: https://reviews.llvm.org/D71377
This commit is contained in:
Jonas Devlieghere 2019-12-12 09:13:04 -08:00
parent 23bee0b0cf
commit a4304f96d6
7 changed files with 18 additions and 22 deletions

View File

@ -25,27 +25,27 @@ if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Darw
endif()
set(default_disable_python OFF)
set(default_disable_curses OFF)
set(default_disable_libedit OFF)
set(default_enable_curses ON)
if(DEFINED LLVM_ENABLE_LIBEDIT AND NOT LLVM_ENABLE_LIBEDIT)
set(default_disable_libedit ON)
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(default_disable_curses ON)
set(default_disable_libedit ON)
set(default_enable_curses OFF)
elseif(CMAKE_SYSTEM_NAME MATCHES "Android")
set(default_disable_python ON)
set(default_disable_curses ON)
set(default_disable_libedit ON)
set(default_enable_curses OFF)
elseif(IOS)
set(default_disable_python ON)
endif()
option(LLDB_DISABLE_PYTHON "Disable Python scripting integration." ${default_disable_python})
option(LLDB_DISABLE_CURSES "Disable Curses integration." ${default_disable_curses})
option(LLDB_DISABLE_LIBEDIT "Disable the use of editline." ${default_disable_libedit})
option(LLDB_ENABLE_CURSES "Disable Curses integration." ${default_enable_curses})
option(LLDB_RELOCATABLE_PYTHON "Use the PYTHONHOME environment variable to locate Python." OFF)
option(LLDB_USE_SYSTEM_SIX "Use six.py shipped with system and do not install a copy of it" OFF)
option(LLDB_USE_ENTITLEMENTS "When codesigning, use entitlements if available" ON)
@ -485,7 +485,7 @@ else()
set(LLDB_CAN_USE_DEBUGSERVER OFF)
endif()
if (NOT LLDB_DISABLE_CURSES)
if (LLDB_ENABLE_CURSES)
find_package(Curses REQUIRED)
find_library(CURSES_PANEL_LIBRARY NAMES panel DOC "The curses panel library")
if (NOT CURSES_PANEL_LIBRARY)

View File

@ -263,7 +263,7 @@ NetBSD
Current stable NetBSD release doesn't ship with libpanel(3), therefore it's
required to disable curses(3) support with the
``-DLLDB_DISABLE_CURSES:BOOL=TRUE`` option. To make sure check if
``-DLLDB_ENABLE_CURSES:BOOL=FALSE`` option. To make sure check if
``/usr/include/panel.h`` exists in your system.
macOS
@ -402,8 +402,8 @@ further by passing the appropriate cmake options, such as:
::
-DLLDB_DISABLE_LIBEDIT=1
-DLLDB_DISABLE_CURSES=1
-DLLDB_DISABLE_PYTHON=1
-DLLDB_ENABLE_CURSES=0
-DLLVM_ENABLE_TERMINFO=0
In this case you, will often not need anything other than the standard C and
@ -455,7 +455,7 @@ to prepare the cmake build with the following parameters:
-DCLANG_TABLEGEN=<path-to-host>/bin/clang-tblgen \
-DLLDB_DISABLE_PYTHON=1 \
-DLLDB_DISABLE_LIBEDIT=1 \
-DLLDB_DISABLE_CURSES=1
-DLLDB_ENABLE_CURSES=0
An alternative (and recommended) way to compile LLDB is with clang.
Unfortunately, clang is not able to find all the include paths necessary for a

View File

@ -35,9 +35,9 @@
#cmakedefine01 LLDB_ENABLE_LZMA
#cmakedefine LLDB_ENABLE_LIBXML2
#cmakedefine01 LLDB_ENABLE_CURSES
#cmakedefine LLDB_DISABLE_CURSES
#cmakedefine LLDB_ENABLE_LIBXML2
#cmakedefine LLDB_DISABLE_LIBEDIT

View File

@ -683,12 +683,8 @@ SBStructuredData SBDebugger::GetBuildConfiguration() {
AddBoolConfigEntry(
*config_up, "xml", XMLDocument::XMLEnabled(),
"A boolean value that indicates if XML support is enabled in LLDB");
bool have_curses = true;
#ifdef LLDB_DISABLE_CURSES
have_curses = false;
#endif
AddBoolConfigEntry(
*config_up, "curses", have_curses,
*config_up, "curses", LLDB_ENABLE_CURSES,
"A boolean value that indicates if curses support is enabled in LLDB");
AddLLVMTargets(*config_up);

View File

@ -26,7 +26,7 @@ CommandObjectGUI::CommandObjectGUI(CommandInterpreter &interpreter)
CommandObjectGUI::~CommandObjectGUI() {}
bool CommandObjectGUI::DoExecute(Args &args, CommandReturnObject &result) {
#ifndef LLDB_DISABLE_CURSES
#if LLDB_ENABLE_CURSES
if (args.GetArgumentCount() == 0) {
Debugger &debugger = GetDebugger();

View File

@ -9,7 +9,7 @@ lldb_tablegen(CorePropertiesEnum.inc -gen-lldb-property-enum-defs
set(LLDB_CURSES_LIBS)
set(LLDB_LIBEDIT_LIBS)
if (NOT LLDB_DISABLE_CURSES)
if (LLDB_ENABLE_CURSES)
list(APPEND LLDB_CURSES_LIBS ${CURSES_LIBRARIES} ${CURSES_PANEL_LIBRARY})
if(LLVM_ENABLE_TERMINFO AND HAVE_TERMINFO)
list(APPEND LLDB_CURSES_LIBS ${TERMINFO_LIBS})
@ -102,6 +102,6 @@ if (NOT LLDB_DISABLE_LIBEDIT)
target_include_directories(lldbCore PRIVATE ${libedit_INCLUDE_DIRS})
endif()
if (NOT LLDB_DISABLE_CURSES)
if (LLDB_ENABLE_CURSES)
target_include_directories(lldbCore PRIVATE ${CURSES_INCLUDE_DIR})
endif()

View File

@ -9,7 +9,7 @@
#include "lldb/Core/IOHandlerCursesGUI.h"
#include "lldb/Host/Config.h"
#ifndef LLDB_DISABLE_CURSES
#if LLDB_ENABLE_CURSES
#include <curses.h>
#include <panel.h>
#endif
@ -31,7 +31,7 @@
#include "lldb/Interpreter/CommandCompletions.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#ifndef LLDB_DISABLE_CURSES
#if LLDB_ENABLE_CURSES
#include "lldb/Breakpoint/BreakpointLocation.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/ValueObject.h"
@ -74,7 +74,7 @@ using llvm::Optional;
using llvm::StringRef;
// we may want curses to be disabled for some builds for instance, windows
#ifndef LLDB_DISABLE_CURSES
#if LLDB_ENABLE_CURSES
#define KEY_RETURN 10
#define KEY_ESCAPE 27
@ -4064,4 +4064,4 @@ bool IOHandlerCursesGUI::Interrupt() { return false; }
void IOHandlerCursesGUI::GotEOF() {}
#endif // LLDB_DISABLE_CURSES
#endif // LLDB_ENABLE_CURSES