You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add_definitions is meant to take multiple definitions in the form of
a parameter that is a list. LLVM_DEFINITIONS is a string variable
though. In practice, passing a string variable to add_definitions
mostly works, except for the case when it starts with not only a
plain -DFOO, but a define with a value, i.e. -DFOO=42. In the case
of LLVM_DEFINITIONS starting with `-DFOO=42 -DBAR`, cmake ends up
passing `-DFOO="42 -DBAR"` to the compiler, which isn't what was
intended.
See https://gitlab.kitware.com/cmake/cmake/-/issues/22162 for
discussions on the matter.
This matches the recently updated docs for how users of LLVM are
supposed to use LLVM_DEFINITIONS in CMake, see
llvm/llvm-project@a2a65a5.
0 commit comments