# cmake --system-information ignores cross-compilation

**URL:** https://discourse.cmake.org/t/cmake-system-information-ignores-cross-compilation/1444
**Category:** Usage
**Created:** [June 25, 2020, 12:23pm UTC](https://discourse.cmake.org/t/cmake-system-information-ignores-cross-compilation/1444 "2020-06-25T12:23:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![magnus.grandin](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/a88e57/32.png) [@magnus.grandin](https://discourse.cmake.org/u/magnus.grandin)
#### Post date: [June 25, 2020, 12:23pm UTC](https://discourse.cmake.org/t/cmake-system-information-ignores-cross-compilation/1444/1 "2020-06-25T12:23:23Z")

</div>

I have been trying to use cmake on the command line with switch `--system-information` to dump system level information about a given configuration. In particular, I am interested in verifying that certain variables (e.g. CMAKE\_SYSTEM\_NAME) are set to the right values when cross-compiling against different targets. However, the information I get from `--system-information` ignores any cross-compilation settings and values set by toolchains.

The usage of `--system-information` is not very well documented, so I am a bit at loss exactly how it is supposed to be used. I have been trying it in various ways:

1. Passing --system-information on the command line together with my other cmake flags, e.g.  
cmake … -G Ninja -DCMAKE\_TOOLCHAIN\_FILE= --system-information sysinfo.txt
2. Generating my project first, the running cmake with --system-information, e.g.  
cmake … -G Ninja -DCMAKE\_TOOLCHAIN\_FILE=  
cmake -B . --system-information sysinfo.txt

I always only get host system information, never any target system information. I have tried it in Linux and on Windows. Am I doing it wrong or is `--system-information` not supposed to work the way I expect it to?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [November 11, 2020, 2:51pm UTC](https://discourse.cmake.org/t/cmake-system-information-ignores-cross-compilation/1444/2 "2020-11-11T14:51:40Z")

</div>

I think it always queries the host system.

Cc: @brad.king
