Re: [CMake] Generator expressions containing spaces

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

Re: [CMake] Generator expressions containing spaces

2018-04-24 Thread Yves Frederix
> ) > > and of course 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+

Re: [CMake] Generator expressions containing spaces

2018-04-24 Thread Elvis Stansvik
stead. > > I can't depend on CMake 3.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, > E

Re: [CMake] Generator expressions containing spaces

2018-04-24 Thread Elvis Stansvik
d. I can't depend on CMake 3.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

Re: [CMake] Generator expressions containing spaces

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

Re: [CMake] Generator expressions containing spaces

2018-04-23 Thread CHEVRIER, Marc
POST_BUILD COMMAND $<1:echo> "$<1 :${args}>" COMMAND_EXPAND_LISTS ) From: CMake <cmake-boun...@cmake.org> on behalf of Yves Frederix <yves.frederix+cm...@gmail.com> Date: Monday 23 April 2018 at 13:08 To: "cmake@cmake.org" <cmake@cmake.org>

[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