Re: [CMake] Generator expressions containing spaces

2018-04-24 Thread Elvis Stansvik
gt; ) >> >> and of course wishing I could just write something like >> >> add_compile_options( >> $<$:-Wall -Wextra -Werror> >> $<$:-Wall -Wextra -Werror> >> $<$:-Wall -Wextra -Werror> >> ) >> >> instead. >>

Re: [CMake] Generator expressions containing spaces

2018-04-24 Thread Yves Frederix
wishing I could just write something like > > add_compile_options( > $<$:-Wall -Wextra -Werror> > $<$:-Wall -Wextra -Werror> > $<$:-Wall -Wextra -Werror> > ) > > instead. > > I can't depend on CMake 3.8+ just yet, but I'll reme

Re: [CMake] Generator expressions containing spaces

2018-04-24 Thread Elvis Stansvik
hing I could just write something like > > add_compile_options( > $<$:-Wall -Wextra -Werror> > $<$:-Wall -Wextra -Werror> > $<$:-Wall -Wextra -Werror> > ) > > instead. > > I can't depend on CMake 3.8+ just yet, but I'll remembe

Re: [CMake] Generator expressions containing spaces

2018-04-24 Thread Elvis Stansvik
.8+ just yet, but I'll remember your solution for when I can. I don't quite like having to introduce variables though. Is there no way to solve this without having to first stuff the elements in a list and use that? Cheers, Elvis > > > > > From: CMake on behalf of Yve

Re: [CMake] Generator expressions containing spaces

2018-04-23 Thread Yves Frederix
ot;$<1 :${args}>" > > COMMAND_EXPAND_LISTS > > ) > > > > > > *From: *CMake on behalf of Yves Frederix < > yves.frederix+cm...@gmail.com> > *Date: *Monday 23 April 2018 at 13:08 > *To: *"cmake@cmake.org" > *Subject: *[CMa

Re: [CMake] Generator expressions containing spaces

2018-04-23 Thread CHEVRIER, Marc
POST_BUILD COMMAND $<1:echo> "$<1 :${args}>" COMMAND_EXPAND_LISTS ) From: CMake on behalf of Yves Frederix Date: Monday 23 April 2018 at 13:08 To: "cmake@cmake.org" Subject: [CMake] Generator expressions containing spaces Hi, I recently learned that the

[CMake] Generator expressions containing spaces

2018-04-23 Thread Yves Frederix
Hi, I recently learned that the COMMAND line in a custom command supports generator expressions. In particular, what makes this powerful is that if the expression evaluates to the empty string, no corresponding code will be added to the target (as documented in the docs