CMAKE_SYSTEM_NAME detect operating system
As noted by CMake staff the various OS flags like “APPLE” and “UNIX” are “soft deprecated” because they have overlapping meanings. The CMAKE_SYSTEM_NAME docs note that typical values include:
- Linux
- Windows
- Darwin