This avoids the need for string-ification and lets CMake deduplicate
potentially duplicate flags.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
One issue I've had in the past is that CMake "helpfully" deduplicates flags specified via target_compile_options (and I assume that'll happen for setting the COMPILE_OPTIONS property as well), which turns things like -isystem /foo -isystem /bar into -isystem /foo /bar and breaks things. Is that a risk here? See https://gitlab.kitware.com/cmake/cmake/-/issues/15826
Comment Actions
I haven't encountered any issues in my testing. The problem with COMPILE_FLAGS and LINK_FLAGS is that these don't seem to expand generator expressions while COMPILE_OPTIONS and LINK_OPTIONS do. I have a follow up change that revamps the use libc++ headers from compiler-rt and relies on generator expressions so this is a prerequisite.