I'm using a customized clang/llvm to build my project. The customization is basically the addition of optimization passes. To pass options to my passes when compiling with clang I'm using:
clang [..] -mllvm -MyOption [..]
Now it happens that I need to pass multiple options this way:
clang [..] -mllvm -MyOption -mllvm -MyOption2=value [..]
This in combination with CMake's target_compile_options() stops working, CMake removes the second -mllvm because it seems to think it is duplicated.
target_compile_options(vslib INTERFACE -mllvm -MyOption)
target_compile_options(vslib INTERFACE -mllvm -MyOption2=val)
I tried putting " around both options, doesn't work.
Is there a way to achieve this with CMake?