I am developing for an embedded system using a custom toolchain file. CMAKE_SYSTEM_NAME is set to "Generic", so the variables are WIN32, UNIX, etc. Cannot be used to check the operating system on which the project is configured. But I need to configure the project differently on different OSs.
How to determine the operating system on which cmake is running?
source share