[cmake-developers] Do all non-Windows host platforms support uname(3)

Gregor Jasny gjasny at googlemail.com
Tue Dec 27 11:14:30 EST 2016


Hello,

recently I realized that most pre-defined CMake variables are not
available in scripting context. In my use case I had to identify a Linux
host system. Unfortunately only CMAKE_HOST_{APPLE,SOLARIS,UNIX,WIN32}
are available in scripting context.

I wondered if all supported host operating systems support the uname(3)
function call? If yes we could also make CMAKE_HOST_SYSTEM_NAME in
scripting context.

A proof-of-concept patch is located here:
https://gitlab.kitware.com/gjasny/cmake/commits/cmake-host-system-name

Thanks,
Gregor


More information about the cmake-developers mailing list