[lldb/CMake] Print whether an optional dependency was enabled.
authorJonas Devlieghere <jonas@devlieghere.com>
Thu, 2 Jan 2020 21:36:05 +0000 (13:36 -0800)
committerJonas Devlieghere <jonas@devlieghere.com>
Thu, 2 Jan 2020 21:40:01 +0000 (13:40 -0800)
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.

lldb/cmake/modules/LLDBConfig.cmake

index b77880c..52b8257 100644 (file)
@@ -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)