
if (UNIX AND NOT APPLE)
  set(DASH_PLATFORM_IS_POSIX TRUE CACHE BOOL
      "Platform: POSIX compatible")
endif()

string(REGEX MATCH 
       "FreeBSD"
       FREEBSD_PLATFORM_NAME
       ${CMAKE_SYSTEM_NAME})
string(REGEX MATCH 
       "Linux"
       LINUX_PLATFORM_NAME
       ${CMAKE_SYSTEM_NAME})
string(REGEX MATCH 
       "OSX"
       OSX_PLATFORM_NAME
       ${CMAKE_SYSTEM_NAME})

if (NOT "${FREEBSD_PLATFORM_NAME}" STREQUAL "")
  set(DASH_PLATFORM_NAME ${FREEBSD_PLATFORM_NAME}
      CACHE STRING INTERNAL FORCE)
  set(DASH_PLATFORM_IS_FREEBSD TRUE CACHE BOOL
      "FreeBSD platform: " ${FREEBSD_PLATFORM_NAME})
endif()

if (NOT "${LINUX_PLATFORM_NAME}" STREQUAL "")
  set(DASH_PLATFORM_NAME ${LINUX_PLATFORM_NAME}
      CACHE STRING INTERNAL FORCE)
  set(DASH_PLATFORM_IS_LINUX TRUE CACHE BOOL
      "Linux platform: " ${LINUX_PLATFORM_NAME})
endif()

if (NOT "${OSX_PLATFORM_NAME}" STREQUAL "")
  set(DASH_PLATFORM_NAME ${OSX_PLATFORM_NAME}
      CACHE STRING INTERNAL FORCE)
  set(DASH_PLATFORM_IS_OSX TRUE CACHE BOOL
      "OSX platform name: " ${OSX_PLATFORM_NAME})
endif()

