[cmake-developers] Ability to iterate over all targets?

Johan Björk phb at spotify.com
Wed Feb 9 11:58:58 EST 2011


On Wed, Feb 9, 2011 at 4:48 PM, Brad King <brad.king at kitware.com> wrote:

> On 02/09/2011 10:30 AM, Michael Wild wrote:
> > Then don't override it, wrap it in a function instead. This is
> > semantically clearer (if you give it a good name) and has the advantage
> > that it's clear what's going on. Iterating over a list of targets to
> > modify properties in a possibly distant part of the build system isn't
> > very transparent IMHO.
>
> well, this is exactly what I normally would use a toolchain.cmake file to
specify, ie, build-tool specific settings. However, my mac developers are
really hesitant to switch to CMake if all settings are specified as
custom-compiler flags instead of checkboxes in the UI.

This is exactly the reason I'm hesitant to add a feature like this.
> When someone says "all" targets they really want "DWIM".  There will
> always be cases of certain targets being excluded (custom targets,
> generator executables, etc.) that require target-local decisions.
> The set of "all" targets only works in toy cases.  It is better for
> targets participating in the DWIM set to be recorded explicitly where
> they are defined.
>
> Fair enough. My case could be solved by adding more mappings between
CMAKE_C{XX}_FLAGS and XCode attributes.

> -Brad
> _______________________________________________
> cmake-developers mailing list
> cmake-developers at cmake.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20110209/19ba0673/attachment.html>


More information about the cmake-developers mailing list