[CMake] Changing "PROJECT" level build settings in Xcode

David Cole david.cole at kitware.com
Mon Jan 9 08:40:39 EST 2012


On Mon, Jan 9, 2012 at 6:49 AM, Eric Noulard <eric.noulard at gmail.com> wrote:
> 2012/1/9 Daniel Dekkers <d.dekkers at cthrough.nl>:
>> Hi,
>>
>> In Xcode, can I change build settings at "PROJECT" level via CMake?
>> SET_TARGET_PROPERTIES() always seems to work on "TARGETS" level.
>
> What kind of settings?
>
> Properties have a scope:
>    - global
>    - directories
>    - target
>    - tests
>    - source files
>
> see
> cmake --help-properties
>
> with the global ones you can use:
>
> set_property(GLOBAL ...)
>
> note that some properties are read-only, read the doc carefully.
>
>
> --
> Erk
> Membre de l'April - « promouvoir et défendre le logiciel libre » -
> http://www.april.org
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake

And for other properties, they are typically initialized from a
corresponding CMake variable with a name of CMAKE_${PROPERTY_NAME}.
Often, you just have to set that variable if you want it to apply to
all targets. It's property-specific, though, so definitely look at the
documentation for the property you're interested in.


HTH,
David


More information about the CMake mailing list