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