summaryrefslogtreecommitdiffstats
path: root/lldb/cmake/modules
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-12-13 10:37:33 -0800
committerJonas Devlieghere <jonas@devlieghere.com>2019-12-13 13:41:11 -0800
commit4e26cf2cfb2b140a33ec236153cb2f23b5c44127 (patch)
tree466e768fef375dd038474f91abc4eb255dca93ec /lldb/cmake/modules
parent9cb7a1be2a430a50fb5644b3f48d4a1544034fb9 (diff)
downloadbcm5719-llvm-4e26cf2cfb2b140a33ec236153cb2f23b5c44127.tar.gz
bcm5719-llvm-4e26cf2cfb2b140a33ec236153cb2f23b5c44127.zip
[lldb/CMake] Rename LLDB_DISABLE_PYTHON to LLDB_ENABLE_PYTHON
This matches the naming scheme used by LLVM and all the other optional dependencies in LLDB. Differential revision: https://reviews.llvm.org/D71482
Diffstat (limited to 'lldb/cmake/modules')
-rw-r--r--lldb/cmake/modules/LLDBConfig.cmake39
1 files changed, 21 insertions, 18 deletions
diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
index d2ae1ba2014..da006039b26 100644
--- a/lldb/cmake/modules/LLDBConfig.cmake
+++ b/lldb/cmake/modules/LLDBConfig.cmake
@@ -24,16 +24,19 @@ if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Darw
set(LLDB_LINKER_SUPPORTS_GROUPS ON)
endif()
-set(default_disable_python OFF)
+set(default_enable_python ON)
set(default_enable_libedit ON)
set(default_enable_curses ON)
-# Temporary support the old LLDB_DISABLE_CURSES variable
+# Temporary support the old LLDB_DISABLE_* variables
if (DEFINED LLDB_DISABLE_CURSES)
if (LLDB_DISABLE_CURSES)
set(default_enable_curses OFF)
- else()
- set(default_enable_curses ON)
+ endif()
+endif()
+if (DEFINED LLDB_DISABLE_PYTHON)
+ if (LLDB_DISABLE_PYTHON)
+ set(default_enable_python OFF)
endif()
endif()
@@ -45,14 +48,14 @@ if(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(default_enable_libedit OFF)
set(default_enable_curses OFF)
elseif(CMAKE_SYSTEM_NAME MATCHES "Android")
- set(default_disable_python ON)
+ set(default_enable_python OFF)
set(default_enable_libedit OFF)
set(default_enable_curses OFF)
elseif(IOS)
- set(default_disable_python ON)
+ set(default_enable_python OFF)
endif()
-option(LLDB_DISABLE_PYTHON "Disable Python scripting integration." ${default_disable_python})
+option(LLDB_ENABLE_PYTHON "Enable Python scripting integration." ${default_enable_python})
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)
@@ -172,7 +175,7 @@ function(find_python_libs_windows_helper LOOKUP_DEBUG OUT_EXE_PATH_VARNAME OUT_L
if (NOT PYTHON_EXE OR NOT PYTHON_LIB OR NOT PYTHON_DLL)
message(WARNING "Unable to find all Python components. Python support will be disabled for this build.")
- set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
+ set(LLDB_ENABLE_PYTHON 0 PARENT_SCOPE)
return()
endif()
@@ -197,7 +200,7 @@ endfunction()
function(find_python_libs_windows)
if ("${PYTHON_HOME}" STREQUAL "")
message(WARNING "LLDB embedded Python on Windows requires specifying a value for PYTHON_HOME. Python support disabled.")
- set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
+ set(LLDB_ENABLE_PYTHON 0 PARENT_SCOPE)
return()
endif()
@@ -214,7 +217,7 @@ function(find_python_libs_windows)
else()
message(WARNING "Unable to find ${PYTHON_INCLUDE_DIR}/patchlevel.h, Python installation is corrupt.")
message(WARNING "Python support will be disabled for this build.")
- set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
+ set(LLDB_ENABLE_PYTHON 0 PARENT_SCOPE)
return()
endif()
@@ -226,8 +229,8 @@ function(find_python_libs_windows)
# Lookup for both debug and release python installations
find_python_libs_windows_helper(TRUE PYTHON_DEBUG_EXE PYTHON_DEBUG_LIB PYTHON_DEBUG_DLL PYTHON_DEBUG_VERSION_STRING)
find_python_libs_windows_helper(FALSE PYTHON_RELEASE_EXE PYTHON_RELEASE_LIB PYTHON_RELEASE_DLL PYTHON_RELEASE_VERSION_STRING)
- if(LLDB_DISABLE_PYTHON)
- set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
+ if(NOT LLDB_ENABLE_PYTHON)
+ set(LLDB_ENABLE_PYTHON 0 PARENT_SCOPE)
return()
endif()
@@ -250,8 +253,8 @@ function(find_python_libs_windows)
set(LOOKUP_DEBUG_PYTHON FALSE)
endif()
find_python_libs_windows_helper(${LOOKUP_DEBUG_PYTHON} PYTHON_EXECUTABLE PYTHON_LIBRARY PYTHON_DLL PYTHON_VERSION_STRING)
- if(LLDB_DISABLE_PYTHON)
- set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
+ if(NOT LLDB_ENABLE_PYTHON)
+ set(LLDB_ENABLE_PYTHON 0 PARENT_SCOPE)
return()
endif()
endif()
@@ -286,12 +289,12 @@ endfunction(find_python_libs_windows)
# Call find_python_libs_windows ahead of the rest of the python configuration.
# It's possible that it won't find a python installation and will then set
-# LLDB_DISABLE_PYTHON to ON.
-if (NOT LLDB_DISABLE_PYTHON AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
+# LLDB_ENABLE_PYTHON to OFF.
+if (LLDB_ENABLE_PYTHON AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
find_python_libs_windows()
endif()
-if (NOT LLDB_DISABLE_PYTHON)
+if (LLDB_ENABLE_PYTHON)
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
if (NOT LLDB_RELOCATABLE_PYTHON)
file(TO_CMAKE_PATH "${PYTHON_HOME}" LLDB_PYTHON_HOME)
@@ -320,7 +323,7 @@ if (NOT LLDB_DISABLE_PYTHON)
endif()
endif()
-if (LLDB_DISABLE_PYTHON)
+if (NOT LLDB_ENABLE_PYTHON)
unset(PYTHON_INCLUDE_DIR)
unset(PYTHON_LIBRARY)
unset(PYTHON_EXECUTABLE)
OpenPOWER on IntegriCloud