From a06896104d32549c7222e5622f1f464eeca55edf Mon Sep 17 00:00:00 2001 From: Andrey Filipenkov Date: Mon, 21 Jul 2025 20:47:31 +0300 Subject: [PATCH 1/3] [XcodeBuild] document new method params --- reference/tools/apple/xcodebuild.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/reference/tools/apple/xcodebuild.rst b/reference/tools/apple/xcodebuild.rst index 7ff19cfc29e7..27f3a600129e 100644 --- a/reference/tools/apple/xcodebuild.rst +++ b/reference/tools/apple/xcodebuild.rst @@ -37,12 +37,12 @@ The ``Xcode.build()`` method internally implements a call to ``xcodebuild`` like .. code:: bash - $ xcodebuild -project app.xcodeproj -configuration -arch -target /-alltargets *_DEPLOYMENT_TARGET=settings.os.version + $ xcodebuild -project app.xcodeproj -configuration -arch -target /-alltargets *_DEPLOYMENT_TARGET=settings.os.version Where: - ``configuration`` is the configuration, typically *Release* or *Debug*, which will be obtained - from ``settings.build_type``. + from ``settings.build_type`` unless you pass it in the parameter. - ``architecture`` is the build architecture, a mapping from the ``settings.arch`` to the common architectures defined by Apple 'i386', 'x86_64', 'armv7', 'arm64', etc. - ``sdk`` is set based on the values of the ``os.sdk`` and ``os.sdk_version`` defining the @@ -54,11 +54,14 @@ Where: ``os.sdk_version`` settings values. - ``verbosity`` is the verbosity level for the build and can take value 'verbose' or 'quiet' if set by ``tools.build:verbosity`` in your **[conf]** +- ``custom_params`` is a list of arbitrary command line params that you can pass in the + ``build_options`` parameter which is a list of strings. -Additional parameters that are passed to ``xcodebuild``: +Additional parameters that are passed to ``xcodebuild`` (but before ``custom_params``): - deployment target setting according to the values of ``os`` and ``os.version`` from profile, e.g. ``MACOSX_DEPLOYMENT_TARGET=10.15`` or ``IPHONEOS_DEPLOYMENT_TARGET=15.0`` +- ``SYMROOT`` and ``OBJROOT`` pointing to the recipe build folder conf ++++ From b25426d646fef53b83fbb0f51a00baad23d0735a Mon Sep 17 00:00:00 2001 From: Carlos Zoido Date: Wed, 24 Sep 2025 12:45:18 +0200 Subject: [PATCH 2/3] update docs --- reference/tools/apple/xcodebuild.rst | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/reference/tools/apple/xcodebuild.rst b/reference/tools/apple/xcodebuild.rst index 27f3a600129e..76d844379895 100644 --- a/reference/tools/apple/xcodebuild.rst +++ b/reference/tools/apple/xcodebuild.rst @@ -33,16 +33,16 @@ Reference .. automethod:: XcodeBuild.build -The ``Xcode.build()`` method internally implements a call to ``xcodebuild`` like: +The ``XcodeBuild.build()`` method internally implements a call to ``xcodebuild`` like: .. code:: bash - $ xcodebuild -project app.xcodeproj -configuration -arch -target /-alltargets *_DEPLOYMENT_TARGET=settings.os.version + $ xcodebuild -project app.xcodeproj -configuration -arch -target /-alltargets *_DEPLOYMENT_TARGET=settings.os.version Where: - ``configuration`` is the configuration, typically *Release* or *Debug*, which will be obtained - from ``settings.build_type`` unless you pass it in the parameter. + from ``settings.build_type`` unless you pass it explicitly via the ``configuration`` parameter. - ``architecture`` is the build architecture, a mapping from the ``settings.arch`` to the common architectures defined by Apple 'i386', 'x86_64', 'armv7', 'arm64', etc. - ``sdk`` is set based on the values of the ``os.sdk`` and ``os.sdk_version`` defining the @@ -54,14 +54,20 @@ Where: ``os.sdk_version`` settings values. - ``verbosity`` is the verbosity level for the build and can take value 'verbose' or 'quiet' if set by ``tools.build:verbosity`` in your **[conf]** -- ``custom_params`` is a list of arbitrary command line params that you can pass in the - ``build_options`` parameter which is a list of strings. - -Additional parameters that are passed to ``xcodebuild`` (but before ``custom_params``): +- ``cli_args`` are the additional command line arguments passed via the ``cli_args`` parameter. + These can include Xcode-specific options like ``-xcconfig`` for configuration files or custom + build settings like ``BUILD_LIBRARY_FOR_DISTRIBUTION=YES``. You can also redirect build artifacts + to the Conan build folder by passing ``SYMROOT`` and ``OBJROOT`` settings: + + .. code:: python + + xb.build("app.xcodeproj", cli_args=[f"SYMROOT={self.build_folder}", + f"OBJROOT={self.build_folder}"]) + +Additional parameters that are passed to ``xcodebuild`` (but before ``cli_args``): - deployment target setting according to the values of ``os`` and ``os.version`` from profile, e.g. ``MACOSX_DEPLOYMENT_TARGET=10.15`` or ``IPHONEOS_DEPLOYMENT_TARGET=15.0`` -- ``SYMROOT`` and ``OBJROOT`` pointing to the recipe build folder conf ++++ From 9ecc7a5412c12cd8270c73c90ab9f9560e10a1a3 Mon Sep 17 00:00:00 2001 From: Carlos Zoido Date: Wed, 24 Sep 2025 12:49:11 +0200 Subject: [PATCH 3/3] minor changes --- reference/tools/apple/xcodebuild.rst | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/reference/tools/apple/xcodebuild.rst b/reference/tools/apple/xcodebuild.rst index 76d844379895..132035571c81 100644 --- a/reference/tools/apple/xcodebuild.rst +++ b/reference/tools/apple/xcodebuild.rst @@ -54,19 +54,21 @@ Where: ``os.sdk_version`` settings values. - ``verbosity`` is the verbosity level for the build and can take value 'verbose' or 'quiet' if set by ``tools.build:verbosity`` in your **[conf]** -- ``cli_args`` are the additional command line arguments passed via the ``cli_args`` parameter. - These can include Xcode-specific options like ``-xcconfig`` for configuration files or custom - build settings like ``BUILD_LIBRARY_FOR_DISTRIBUTION=YES``. You can also redirect build artifacts +- ``cli_args`` are the additional command line arguments passed via the + ``cli_args`` parameter. These can include custom build settings like + ``BUILD_LIBRARY_FOR_DISTRIBUTION=YES``. You can also redirect build artifacts to the Conan build folder by passing ``SYMROOT`` and ``OBJROOT`` settings: .. code:: python - xb.build("app.xcodeproj", cli_args=[f"SYMROOT={self.build_folder}", - f"OBJROOT={self.build_folder}"]) + def build(self): + xcodebuild = XcodeBuild(self) + xcodebuild.build("app.xcodeproj", cli_args=[f"SYMROOT={self.build_folder}", + f"OBJROOT={self.build_folder}"]) Additional parameters that are passed to ``xcodebuild`` (but before ``cli_args``): -- deployment target setting according to the values of ``os`` and ``os.version`` from profile, +- Deployment target setting according to the values of ``os`` and ``os.version`` from profile, e.g. ``MACOSX_DEPLOYMENT_TARGET=10.15`` or ``IPHONEOS_DEPLOYMENT_TARGET=15.0`` conf