[Lldb-commits] [lldb] a6d9b7b - [lldb] Don't cache lldb_find_python_module result

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 29 09:12:27 PST 2024


Author: Jonas Devlieghere
Date: 2024-02-29T09:12:20-08:00
New Revision: a6d9b7ba2722953960b83fbacda1757349f00156

URL: https://github.com/llvm/llvm-project/commit/a6d9b7ba2722953960b83fbacda1757349f00156
DIFF: https://github.com/llvm/llvm-project/commit/a6d9b7ba2722953960b83fbacda1757349f00156.diff

LOG: [lldb] Don't cache lldb_find_python_module result

Don't cache lldb_find_python_module result as that requires you to do a
clean build after installing the dependency.

Added: 
    

Modified: 
    lldb/cmake/modules/AddLLDB.cmake

Removed: 
    


################################################################################
diff  --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake
index 328e883ddbe5a6..fdc4ee0c05d755 100644
--- a/lldb/cmake/modules/AddLLDB.cmake
+++ b/lldb/cmake/modules/AddLLDB.cmake
@@ -383,7 +383,7 @@ endfunction()
 
 function(lldb_find_python_module module)
   set(MODULE_FOUND PY_${module}_FOUND)
-  if (DEFINED ${MODULE_FOUND})
+  if (${MODULE_FOUND})
     return()
   endif()
 
@@ -392,10 +392,10 @@ function(lldb_find_python_module module)
     ERROR_QUIET)
 
   if (status)
-    set(${MODULE_FOUND} OFF CACHE BOOL "Failed to find python module '${module}'")
+    set(${MODULE_FOUND} OFF PARENT_SCOPE)
     message(STATUS "Could NOT find Python module '${module}'")
   else()
-    set(${MODULE_FOUND} ON CACHE BOOL "Found python module '${module}'")
+    set(${MODULE_FOUND} ON PARENT_SCOPE)
     message(STATUS "Found Python module '${module}'")
   endif()
 endfunction()


        


More information about the lldb-commits mailing list