Skip to content

cmake: set BUILD_ARCH with CMAKE_HOST_SYSTEM_PROCESSOR#7369

Open
nilason wants to merge 1 commit intoOSGeo:mainfrom
nilason:cmake_rm_custom_host_arch
Open

cmake: set BUILD_ARCH with CMAKE_HOST_SYSTEM_PROCESSOR#7369
nilason wants to merge 1 commit intoOSGeo:mainfrom
nilason:cmake_rm_custom_host_arch

Conversation

@nilason
Copy link
Copy Markdown
Contributor

@nilason nilason commented May 6, 2026

Set BUILD_ARCH with CMAKE_HOST_SYSTEM_PROCESSOR and remove custom function get_host_arch.

I see no reason to not use CMake's variable for setting this, after all that is deciding what/how to build anyway. The custom function requires maintenance, macOS is currently not supported and defaults to x86_64.

The only effect this has is the build_platform output of g.version -g. Otherwise BUILD_ARCH is mainly a remnant of Autotools builds, where build output directory is named after Autotool's host variable (e.g. dist.aarch64-apple-darwin25.3.0; note: this is not the same as just uname -m) and this is passed to various Python build scripts, in CMake it doesn't play any role.

Remove custom function 'get_host_arch'.
@nilason nilason added this to the 8.5.0 milestone May 6, 2026
@nilason nilason added the backport to 8.5 PR needs to be backported to release branch 8.5 label May 6, 2026
@github-actions github-actions Bot added the CMake label May 6, 2026
@nilason nilason requested a review from HuidaeCho May 6, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport to 8.5 PR needs to be backported to release branch 8.5 CMake

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant