Skip to content

Instantly share code, notes, and snippets.

@pppoe
Created April 29, 2014 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pppoe/fc3595158149f646d173 to your computer and use it in GitHub Desktop.
Save pppoe/fc3595158149f646d173 to your computer and use it in GitHub Desktop.
CMake check system OS
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# Mac OS X specific code
SET(OperatingSystem "Mac OS X")
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
SET(OperatingSystem "Linux")
ELSE()
SET(OperatingSystem "Others")
ENDIF()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment