# Platform QNX does not set UNIX to True when cross-compiling on Windows

**URL:** <https://discourse.cmake.org/t/platform-qnx-does-not-set-unix-to-true-when-cross-compiling-on-windows/1824>\
**Category:** Code\
**Tags:** os:windows\
**Created:** [September 11, 2020, 6:37pm UTC](https://discourse.cmake.org/t/platform-qnx-does-not-set-unix-to-true-when-cross-compiling-on-windows/1824 "2020-09-11T18:37:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pablo\_R](https://discourse.cmake.org/user_avatar/discourse.cmake.org/pablo_r/32/825_2.png) [@Pablo\_R](https://discourse.cmake.org/u/Pablo_R)\
**Post date:** [September 11, 2020, 6:37pm UTC](https://discourse.cmake.org/t/platform-qnx-does-not-set-unix-to-true-when-cross-compiling-on-windows/1824/1 "2020-09-11T18:37:41Z")

</div>

Hi,

I am cross-compiling to QNX on Windows. The first lines of my toolchain file look as follows.

```auto
include(Platform/QNX)
set(CMAKE_SYSTEM_NAME QNX)
set(CMAKE_CXX_COMPILER_ID QCC)

```

However, I observed that my CMakeLists does NOT detect QNX as a UNIX-like system and all the if(UNIX) statements are missed. In principle, I have checked that Platform/QNX refers to Platform/UnixPaths.cmake, which sets UNIX to 1.

I don’t understand then what’s happening because it’s still failing even though I type `set(UNIX 1)` in my toolchain file. I think, that’s because I am cross-compiling on Windows. And UNIX is overwritten to 0 somewhere. Can anybody please confirm that?

---

<div class="post-metadata">

**Author:** ![Pablo\_R](https://discourse.cmake.org/user_avatar/discourse.cmake.org/pablo_r/32/825_2.png) [@Pablo\_R](https://discourse.cmake.org/u/Pablo_R)\
**Post date:** [September 12, 2020, 11:24pm UTC](https://discourse.cmake.org/t/platform-qnx-does-not-set-unix-to-true-when-cross-compiling-on-windows/1824/2 "2020-09-12T23:24:14Z")

</div>

I have created issue [#21185](https://gitlab.kitware.com/cmake/cmake/-/issues/21185).
