xref: /reactos/toolchain-msvc.cmake (revision d0ed4fdb)
1
2if(NOT ARCH)
3    set(ARCH i386)
4endif()
5
6# Default to Debug for the build type
7if(NOT DEFINED CMAKE_BUILD_TYPE)
8    set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
9        "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
10endif()
11
12# the name of the target operating system
13set(CMAKE_SYSTEM_NAME Windows)
14set(CMAKE_SYSTEM_PROCESSOR i686)
15
16if(USE_CLANG_CL)
17    set(CMAKE_C_COMPILER clang-cl)
18    set(CMAKE_CXX_COMPILER clang-cl)
19    # Clang now defaults to lld-link which we're not compatible with yet
20    set(CMAKE_LINKER link)
21else()
22    set(CMAKE_C_COMPILER cl)
23    set(CMAKE_CXX_COMPILER cl)
24endif()
25
26set(CMAKE_MC_COMPILER mc)
27set(CMAKE_RC_COMPILER rc)
28if(ARCH STREQUAL "amd64")
29    set(CMAKE_ASM_COMPILER ml64)
30elseif(ARCH STREQUAL "arm")
31    set(CMAKE_ASM_COMPILER armasm)
32elseif(ARCH STREQUAL "arm64")
33    set(CMAKE_ASM_COMPILER armasm64)
34else()
35    set(CMAKE_ASM_COMPILER ml)
36endif()
37
38set(CMAKE_C_STANDARD_LIBRARIES "" CACHE INTERNAL "")
39
40set(CMAKE_USER_MAKE_RULES_OVERRIDE "${CMAKE_CURRENT_LIST_DIR}/overrides-msvc.cmake")
41