Skip to content

Commit

Permalink
apacheGH-36686: [C++] Pass CMAKE_OSX_SYSROOT to external projects (ap…
Browse files Browse the repository at this point in the history
…ache#36706)

### Rationale for this change

If we use different macOS SDK in Apache Arrow C++ and bundled projects, it will cause some problems such as a build error.

### What changes are included in this PR?

Pass `CMAKE_OSX_SYSROOT` explicitly to external projects.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
* Closes: apache#36686

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Dewey Dunnington <dewey@fishandwhistle.net>
  • Loading branch information
kou authored and chelseajonesr committed Jul 20, 2023
1 parent 3408c6d commit 802c77a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,7 @@ set(EP_COMMON_CMAKE_ARGS
-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=${CMAKE_EXPORT_NO_PACKAGE_REGISTRY}
-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=${CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY}
-DCMAKE_INSTALL_LIBDIR=lib
-DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}
-DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE_MAKEFILE})

# Enable s/ccache if set by parent.
Expand Down
7 changes: 4 additions & 3 deletions dev/tasks/macros.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,14 @@ on:
cp ../dev/tasks/homebrew-formulae/autobrew/apache-arrow*.rb tools/

# Pin the git commit in the formula to match
cd tools
pushd tools
if [ "{{ is_fork }}" == "true" ]; then
sed -i.bak -E -e 's/apache\/arrow.git"$/{{ arrow.github_repo.split("/") | join("\/") }}.git", :revision => "'"{{ arrow.head }}"'"/' apache-arrow*.rb
sed -i.bak -E -e 's/apache\/arrow.git", branch: "main"$/{{ arrow.github_repo.split("/") | join("\/") }}.git", :revision => "'"{{ arrow.head }}"'"/' apache-arrow*.rb
else
sed -i.bak -E -e 's/arrow.git"$/arrow.git", :revision => "'"{{ arrow.head }}"'"/' apache-arrow*.rb
sed -i.bak -E -e 's/arrow.git", branch: "main"$/arrow.git", :revision => "'"{{ arrow.head }}"'"/' apache-arrow*.rb
fi
rm -f apache-arrow*.rb.bak
popd
{% endmacro %}

{%- macro github_change_r_pkg_version(is_fork, version) -%}
Expand Down

0 comments on commit 802c77a

Please sign in to comment.