Skip to content

Commit

Permalink
Docs for xcodetoolchain global flags (#2471)
Browse files Browse the repository at this point in the history
* add docs

* Update reference/conanfile/tools/apple.rst

Co-authored-by: Francisco Ramírez <franchuti688@gmail.com>

* Update reference/conanfile/tools/apple.rst

Co-authored-by: Francisco Ramírez <franchuti688@gmail.com>

* Update reference/conanfile/tools/apple.rst

Co-authored-by: Francisco Ramírez <franchuti688@gmail.com>

* Update reference/conanfile/tools/apple.rst

Co-authored-by: Francisco Ramírez <franchuti688@gmail.com>

Co-authored-by: Francisco Ramírez <franchuti688@gmail.com>
  • Loading branch information
czoido and franramirez688 committed Mar 31, 2022
1 parent ead10f0 commit 79ad2a2
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion reference/conanfile/tools/apple.rst
Expand Up @@ -192,7 +192,8 @@ Will create these files:
├── conan_config.xcconfig
├── conantoolchain_release_x86_64.xcconfig
├── conantoolchain_debug_x86_64.xcconfig
└── conantoolchain.xcconfig
├── conantoolchain.xcconfig
└── conan_global_flags.xcconfig
Those files are:

Expand All @@ -204,6 +205,9 @@ Those files are:
conditional logic depending on the build configuration, architecture and sdk set.
- *conantoolchain.xcconfig*: aggregates all the *conantoolchain_<config>_<arch>.xcconfig*
files for the different installed configurations.
- *conan_global_flags.xcconfig*: this file will only be generated in case of any
configuration variables related to compiler or linker flags are set. Check :ref:`the
configuration section<xcodetoolchain_conf>` below for more details.


Every invocation to ``conan install`` with different configuration will create a new
Expand All @@ -224,6 +228,22 @@ The XcodeToolchain files can declare the following Xcode build settings based on
One of the advantages of using toolchains is that they can help to achieve the exact same build
with local development flows, than when the package is created in the cache.

.. _xcodetoolchain_conf:

conf
++++

This toolchain is also affected by these :ref:`[conf]<global_conf>` variables:

- ``tools.build:cxxflags`` list of C++ flags.
- ``tools.build:cflags`` list of pure C flags.
- ``tools.build:sharedlinkflags`` list of flags that will be used by the linker when creating a shared library.
- ``tools.build:exelinkflags`` list of flags that will be used by the linker when creating an executable.
- ``tools.build:defines`` list of preprocessor definitions.

If you set any of these variables, the toolchain will use them to generate the
``conan_global_flags.xcconfig`` file that will be included from the ``conan_config.xcconfig``
file.

XcodeBuild
----------
Expand Down

0 comments on commit 79ad2a2

Please sign in to comment.