[lldb/cmake] Temporarily revive LLDB_DISABLE_CURSES
authorPavel Labath <pavel@labath.sk>
Fri, 13 Dec 2019 09:20:35 +0000 (10:20 +0100)
committerPavel Labath <pavel@labath.sk>
Fri, 13 Dec 2019 09:23:35 +0000 (10:23 +0100)
At least one lldb bot still uses this cmake variable instead of
LLDB_ENABLE_CURSES. Add code to set the default value of the "enable"
variable based on the old value of the "disable" setting.

This should bring those bots back up, until we can update the master to
use the new setting.

lldb/cmake/modules/LLDBConfig.cmake

index 16d4d8c..d2ae1ba 100644 (file)
@@ -28,6 +28,15 @@ set(default_disable_python OFF)
 set(default_enable_libedit ON)
 set(default_enable_curses ON)
 
+# Temporary support the old LLDB_DISABLE_CURSES variable
+if (DEFINED LLDB_DISABLE_CURSES)
+  if (LLDB_DISABLE_CURSES)
+    set(default_enable_curses OFF)
+  else()
+    set(default_enable_curses ON)
+  endif()
+endif()
+
 if(DEFINED LLVM_ENABLE_LIBEDIT AND NOT LLVM_ENABLE_LIBEDIT)
   set(default_disable_libedit ON)
 endif()
@@ -44,8 +53,8 @@ elseif(IOS)
 endif()
 
 option(LLDB_DISABLE_PYTHON "Disable Python scripting integration." ${default_disable_python})
-option(LLDB_ENABLE_LIBEDIT "Disable the use of editline." ${default_enable_libedit})
-option(LLDB_ENABLE_CURSES "Disable Curses integration." ${default_enable_curses})
+option(LLDB_ENABLE_LIBEDIT "Enable the use of editline." ${default_enable_libedit})
+option(LLDB_ENABLE_CURSES "Enable 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)