cmake: set BUILD_ARCH with CMAKE_HOST_SYSTEM_PROCESSOR#7369
Open
nilason wants to merge 1 commit intoOSGeo:mainfrom
Open
cmake: set BUILD_ARCH with CMAKE_HOST_SYSTEM_PROCESSOR#7369nilason wants to merge 1 commit intoOSGeo:mainfrom
nilason wants to merge 1 commit intoOSGeo:mainfrom
Conversation
Remove custom function 'get_host_arch'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Set
BUILD_ARCHwithCMAKE_HOST_SYSTEM_PROCESSORand remove custom functionget_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_platformoutput ofg.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 justuname -m) and this is passed to various Python build scripts, in CMake it doesn't play any role.