[Lldb-commits] [lldb] 187f66b - [lldb/CMake] Always set a value for find_package when finding optional dependencies

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 23 13:39:20 PST 2019


Author: Alex Langford
Date: 2019-12-23T13:37:58-08:00
New Revision: 187f66bcac668dd2ea25244ed7d7711551275f9d

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

LOG: [lldb/CMake] Always set a value for find_package when finding optional dependencies

Because this is a macro, previous values of `find_package` persist
between calls. This means that if it is set to TRUE on any run, all
subsequent runs will have find_package set to TRUE regardles of whether
or not they should be.

Added: 
    

Modified: 
    lldb/cmake/modules/LLDBConfig.cmake

Removed: 
    


################################################################################
diff  --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
index 674b024492ef..64d0750239e8 100644
--- a/lldb/cmake/modules/LLDBConfig.cmake
+++ b/lldb/cmake/modules/LLDBConfig.cmake
@@ -35,6 +35,7 @@ macro(add_optional_dependency variable description package found)
     set(find_package TRUE)
     set(maybe_required REQUIRED)
   else()
+    set(find_package FALSE)
     set(${variable} FALSE PARENT_SCOPE)
   endif()
 


        


More information about the lldb-commits mailing list