# The Lib Prefix
if (UNIX)
  set(LIB_PFX "lib")
  if (APPLE)
    set(LIB_EXT ".dylib")
  else ()
    set(LIB_EXT ".so")
  endif ()
else (UNIX)
  set(LIB_PFX "")
  set(LIB_EXT ".dll")
endif (UNIX)

message(STATUS "Detect Build Info")

# The System
if(CMAKE_SYSTEM_NAME MATCHES "^Android")
  set(SYSTEM.Android 1)
  message(STATUS "\tSystem: Android")
elseif(CMAKE_SYSTEM_NAME MATCHES "^Linux")
  set(SYSTEM.Linux 1)
  message(STATUS "\tSystem: Linux")
elseif(CMAKE_SYSTEM_NAME MATCHES "^Darwin")
  set(SYSTEM.Darwin 1)
  message(STATUS "\tSystem: Darwin")
endif()

if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
  set(PROCESSOR.arm 1)
  message(STATUS "\tArchitecture: arm")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
  set(PROCESSOR.aarch64 1)
  message(STATUS "\tArchitecture: aarch64")
else()
  message(STATUS "NOT SUPPORT ${CMAKE_SYSTEM_PROCESSOR}")
endif()

# The Compilter ID
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
  set(COMPILER.Clang 1)
  message(STATUS "\tCompiler: Clang")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
  set(COMPILER.gcc 1)
  message(STATUS "\tCompiler: gcc")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
  set(COMPILER.MSVC 1)
  message(STATUS "\tCompiler: MSVC")
endif()

macro(SET_OPTION option value)
    set(${option} ${value} CACHE INTERNAL "" FORCE)
endmacro()