I just wrote my own macro append_property(type name value) for this.
append_property(SOURCE COMPILE_FLAGS "-x objective-c++"
append_property(TARGET COMPILE_FLAGS "foo" mytarget)
Would be nice to have that as an included macro, or at least a comment in
the documentation about what happens when you pass in a list.
On Sat, Aug 13, 2011 at 8:57 PM, Clifford Yapp <cliffy...@gmail.com> wrote:
> On Sat, Aug 13, 2011 at 5:14 AM, Glenn Coombs <glenn.coo...@gmail.com>
> > I haven't seen any discussion yet of my 2nd alternative of getting cmake
> > automatically convert lists to space separated strings for certain
> > like CMAKE_EXE_LINKER_FLAGS_RELEASE. If cmake did this then there would
> > less need for the concat version of set() as one could just use the
> > list(APPEND) functionality. Is this a realistic possibility, or are
> > implementation issues with this suggestion ?
> This surprised me as well - if you want to assemble a list of flags
> "on the fly" (I needed to assemble lists of lists of flags - we pass a
> lot of them) you have to take some care to either do the set trick
> correctly or convert the list to a string at the "end" (if you can be
> sure of where that is).
> Do I understand correctly that the main concern is the ability to pass
> args with ";' characters in these cases? Then the question becomes
> whether quoting ";" characters as needed in user-specified options is
> tricker than navigating the current behavior. To be honest, I can see
> where trying to specify an argument with a quoted ";" character from
> the command line would get a bit messy (in a "ok, how do I quote this
> from this enviornment" sort of way) - how common are ";" characters as
> components of variable values?
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> Please keep messages on-topic and check the CMake FAQ at:
> Follow this link to subscribe/unsubscribe:
Powered by www.kitware.com
Visit other Kitware open-source projects at
Please keep messages on-topic and check the CMake FAQ at:
Follow this link to subscribe/unsubscribe: