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

Hi,

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

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?

I have created issue #21185.