# CMake's cross-compilation variables for the toolchain generator project

**URL:** https://discourse.cmake.org/t/cmakes-cross-compilation-variables-for-the-toolchain-generator-project/10861
**Category:** Usage
**Created:** [May 15, 2024, 3:11pm UTC](https://discourse.cmake.org/t/cmakes-cross-compilation-variables-for-the-toolchain-generator-project/10861 "2024-05-15T15:11:20Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Kentzo](https://discourse.cmake.org/user_avatar/discourse.cmake.org/kentzo/32/4122_2.png) [@Kentzo](https://discourse.cmake.org/u/Kentzo)
#### Post date: [May 15, 2024, 3:11pm UTC](https://discourse.cmake.org/t/cmakes-cross-compilation-variables-for-the-toolchain-generator-project/10861/1 "2024-05-15T15:11:20Z")

</div>

My CMake project generates the toolchain (tooling, libraries etc, including the toolchain file), for the downstream CMake projects.

Some of my dependencies are CMake projects, others use 3rd party systems. At this moment the project itself does not have targets other than `ExternalProject`s and for moving files. But it may have some in the future.

It’s not clear to me whether I should set CMake variables that are related to cross-compilation such as `CMAKE_SYSTEM_*` and `CMAKE_OSX_*`. Currently I use custom user-settable cache variables for SDK etc, but I’m somewhat conflicted whether I’m expected to `FORCE` set the aforementioned variables based on these values.

What would you suggest?
