mysterymath added inline comments.

================
Comment at: clang/cmake/caches/Fuchsia.cmake:167
+if(FUCHSIA_ENABLE_LLDB)
+  list(APPEND _FUCHSIA_ENABLE_PROJECTS lldb)
+endif()
----------------
haowei wrote:
> You probably need a `string(REPLACE ";" "|" value 
> "${_FUCHSIA_ENABLE_PROJECTS}")` after append a value. As by default cmake use 
> `|` to separate items.
> But do you actually need a `_FUCHSIA_ENABLE_PROJECTS` variable, couldn't you 
> just append `lldb` at the end of `LLVM_ENABLE_PROJECTS` here?
> You probably need a `string(REPLACE ";" "|" value 
> "${_FUCHSIA_ENABLE_PROJECTS}")` after append a value. As by default cmake use 
> `|` to separate items.
Hm? CMake's list separator is the semicolon: 
https://cmake.org/cmake/help/latest/command/list.html

> But do you actually need a `_FUCHSIA_ENABLE_PROJECTS` variable, couldn't you 
> just append `lldb` at the end of `LLVM_ENABLE_PROJECTS` here?
`(list APPEND ...)` doesn't work on cache variables. If I were to use the (set 
CACHE FORCE) idiom instead, it would append lldb each time a configure occurs. 
The idea here is to have FUCHSIA_ENABLE_LLDB affect the defaults, but to 
respect whatever's already in the CMake cache otherwise.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145449/new/

https://reviews.llvm.org/D145449

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to