# CMAKE\_HOST\_SYSTEM\_PROCESSOR is filled with the current value only after the project() command

**URL:** https://discourse.cmake.org/t/cmake-host-system-processor-is-filled-with-the-current-value-only-after-the-project-command/15230
**Category:** Usage
**Created:** [October 9, 2025, 7:55am UTC](https://discourse.cmake.org/t/cmake-host-system-processor-is-filled-with-the-current-value-only-after-the-project-command/15230 "2025-10-09T07:55:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rumgot](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/r/919ad9/32.png) [@rumgot](https://discourse.cmake.org/u/rumgot)
#### Post date: [October 9, 2025, 7:55am UTC](https://discourse.cmake.org/t/cmake-host-system-processor-is-filled-with-the-current-value-only-after-the-project-command/15230/1 "2025-10-09T07:55:13Z")

</div>

I have a task that requires using the CMAKE\_HOST\_SYSTEM\_PROCESSOR variable when executing the project() command. I want to specify a value for the CMAKE\_OSX\_ARCHITECTURES variable, which, according to the documentation ([https://cmake.org/cmake/help/latest/variable/CMAKE\_OSX\_ARCHITECTURES.html#variable:CMAKE\_OSX\_ARCHITECTURES](https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_ARCHITECTURES.html#variable:CMAKE_OSX_ARCHITECTURES)), must be filled before calling project(). This means I’m facing a chicken-and-egg problem. Considering that the value for the CMAKE\_HOST\_SYSTEM\_PROCESSOR variable is assigned as a result of running external commands ([https://cmake.org/cmake/help/latest/variable/CMAKE\_HOST\_SYSTEM\_PROCESSOR.html](https://cmake.org/cmake/help/latest/variable/CMAKE_HOST_SYSTEM_PROCESSOR.html)) and, in the case of macOS, for example, this is the result of running the uname -m command, there is no need to fill this value after calling the project() command, since the result will be the same. Therefore, a change might be made to ensure that the CMAKE\_HOST\_SYSTEM\_PROCESSOR variable is populated before calling project() ?

Additional question: If CMAKE\_OSX\_ARCHITECTURES is not explicitly specified on macOS, is it correct to assume that the build will be performed for the current processor architecture?
