1e1ad8c50SMark Nunberg# Gets string/platform information about the specific compiler
2e1ad8c50SMark Nunberg# Defines:
3e1ad8c50SMark Nunberg#  LCB_CC_STRING for the C compiler string (i.e. "msvc", "mingw")
4e1ad8c50SMark Nunberg#  LCB_ARCH_STRING for the target architecture, e.g. "x86"
5e1ad8c50SMark Nunberg
6e1ad8c50SMark Nunberg# Figure out how we're building!
7e1ad8c50SMark NunbergIF(MSVC)
8e1ad8c50SMark Nunberg    IF(CMAKE_CL_64)
9e1ad8c50SMark Nunberg        SET(LCB_ARCH_STRING "amd64")
10e1ad8c50SMark Nunberg    ELSE()
11e1ad8c50SMark Nunberg        SET(LCB_ARCH_STRING "x86")
12e1ad8c50SMark Nunberg    ENDIF(CMAKE_CL_64)
13e1ad8c50SMark Nunberg
14e1ad8c50SMark Nunberg    IF(MSVC80)
15e1ad8c50SMark Nunberg        SET(LCB_CC_STRING "vs8")
16e1ad8c50SMark Nunberg    ELSEIF(MSVC90)
17e1ad8c50SMark Nunberg        SET(LCB_CC_STRING "vc9")
18e1ad8c50SMark Nunberg    ELSEIF(MSVC_VERSION EQUAL 1600)
19e1ad8c50SMark Nunberg        SET(LCB_CC_STRING "vc10")
20e1ad8c50SMark Nunberg    ELSEIF(MSVC_VERSION EQUAL 1700)
21e1ad8c50SMark Nunberg        SET(LCB_CC_STRING "vc11")
22e1ad8c50SMark Nunberg    ENDIF()
23e1ad8c50SMark NunbergELSE()
24e1ad8c50SMark Nunberg    IF(UNIX)
25e1ad8c50SMark Nunberg        SET(LCB_CC_STRING "gcc")
26e1ad8c50SMark Nunberg        EXECUTE_PROCESS(
27e1ad8c50SMark Nunberg            COMMAND
28e1ad8c50SMark Nunberg                uname -m
29e1ad8c50SMark Nunberg            COMMAND
30e1ad8c50SMark Nunberg                tr -d '\n'
31e1ad8c50SMark Nunberg            OUTPUT_VARIABLE
32e1ad8c50SMark Nunberg                LCB_ARCH_STRING)
33e1ad8c50SMark Nunberg    ELSE()
34e1ad8c50SMark Nunberg        SET(LCB_ARCH_STRING "x86") #mingow
35e1ad8c50SMark Nunberg        SET(LCB_CC_STRING "mingw")
36e1ad8c50SMark Nunberg    ENDIF()
37e1ad8c50SMark NunbergENDIF()
38