<div dir="ltr">I'm attempting to use a generator expression to conditionally add compile options. No problem if it is a single option, but I can't figure out how to manage multiple options (in a single command). <div><br></div><div>For example, this works:<div><div>add_compile_options($<$<COMPILE_LANGUAGE:C>-Wall>)</div></div></div><div><br></div><div>As does this:</div><div>add_compile_options(-Wall -Wextra)</div><div><br></div><div>But not this:</div><div><div>add_compile_options($<$<COMPILE_LANGUAGE:C>-Wall -Wextra>)</div></div><div><br></div><div>Nor this:</div><div><div>add_compile_options($<$<COMPILE_LANGUAGE:C>"-Wall -Wextra">)</div></div><div><br></div><div>Or any other variation I could think of.  Either the space breaks the generator expression, or I get a quoted version of the options that the compiler sees as a single "option" it doesn't understand.</div><div><br></div><div>Is there some way of doing this?</div><div><br></div><div>PS: I'm trying to avoid using CMAKE_C_FLAGS. My understanding is that variable is meant for the end user's use.  Am I mistaken about that?</div><div><br></div></div>