Daily Shaarli

All links of one day in a single page.

July 24, 2014

OpenGuru Weblog: CMake: Detecting Platform/Operating Systems, Compiler Information

CMake actually defines several variables to identify the platform information. These variables will be assigned with the values based on the platform, operating system etc.

For example, In CMake version 2.6 following Variables are present to identify the Operating System Type.

UNIX is TRUE on all UNIX-like OS's, including Apple OS X and Cygwin.
WIN32 is TRUE on Windows, including Cygwin.
APPLE is TRUE on Apple systems.