[Lldb-commits] [lldb] f83801f - [lldb/CMake] Print whether an optional dependency was enabled.

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 2 13:41:07 PST 2020


Author: Jonas Devlieghere
Date: 2020-01-02T13:40:01-08:00
New Revision: f83801fb2a4064d666cf8c17d716376a99e4a555

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

LOG: [lldb/CMake] Print whether an optional dependency was enabled.

Use a status message to convey whether an optional dependency was found
or not. With the auto-detection code it's not longer as simple as
checking the CMake cache.

Added: 
    

Modified: 
    lldb/cmake/modules/LLDBConfig.cmake

Removed: 
    


################################################################################
diff  --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
index b77880cc0af4..52b8257951be 100644
--- a/lldb/cmake/modules/LLDBConfig.cmake
+++ b/lldb/cmake/modules/LLDBConfig.cmake
@@ -36,19 +36,21 @@ macro(add_optional_dependency variable description package found)
     set(maybe_required REQUIRED)
   else()
     set(find_package FALSE)
-    set(${variable} FALSE PARENT_SCOPE)
+    set(${variable} FALSE)
   endif()
 
   if(${find_package})
     find_package(${package} ${maybe_required})
     set(${variable} "${${found}}")
   endif()
+
+  message(STATUS "${description}: ${${variable}}")
 endmacro()
 
-add_optional_dependency(LLDB_ENABLE_LIBEDIT "Enable editline support." LibEdit LibEdit_FOUND)
-add_optional_dependency(LLDB_ENABLE_CURSES "Enable curses support." CursesAndPanel CURSESANDPANEL_FOUND)
-add_optional_dependency(LLDB_ENABLE_LZMA "Enable LZMA compression support." LibLZMA LIBLZMA_FOUND)
-add_optional_dependency(LLDB_ENABLE_LUA "Enable Lua scripting support." Lua LUA_FOUND)
+add_optional_dependency(LLDB_ENABLE_LIBEDIT "Enable editline support in LLDB" LibEdit LibEdit_FOUND)
+add_optional_dependency(LLDB_ENABLE_CURSES "Enable curses support in LLDB" CursesAndPanel CURSESANDPANEL_FOUND)
+add_optional_dependency(LLDB_ENABLE_LZMA "Enable LZMA compression support in LLDB" LibLZMA LIBLZMA_FOUND)
+add_optional_dependency(LLDB_ENABLE_LUA "Enable Lua scripting support in LLDB" Lua LUA_FOUND)
 
 set(default_enable_python ON)
 


        


More information about the lldb-commits mailing list