Repository navigation
cmake: set BUILD_ARCH with CMAKE_HOST_SYSTEM_PROCESSOR - #7369
Conversation
Remove custom function 'get_host_arch'.
wenzeslaus
left a comment
There was a problem hiding this comment.
Change to CMAKE_SYSTEM_PROCESSOR because the idea of build_platform where this is used seems to be "platform it is build for", not "platform it was build on".
Use CMAKE_SYSTEM_PROCESSOR and CMAKE_SYSTEM_NAME (and CMAKE_SYSTEM_VERSION if set).
|
There's conflicts to solve |
# Conflicts: # cmake/modules/get_host_arch.cmake
Thanks for the heads-up, fixed. |
echoix
left a comment
There was a problem hiding this comment.
Looks good now, and there is still the grass --config arch to fix by using https://github.com/OSGeo/grass/blob/main/python/grass/app/resource_paths.py, as your comment #7369 (comment)
This should still be merged though, maybe track an issue in order to not forget to do that?
It is done with #7875 |
|
@wenzeslaus please take a look at this, your requested change is blocking this from merging. |
Implemented changes, let’s move forward.
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.