[FASTFAT_NEW] Import again FastFAT from MS. This time from GitHub for license reasons.
[reactos.git] / toolchain-msvc.cmake
1
2 if(NOT ARCH)
3 set(ARCH i386)
4 endif()
5
6 # Default to Debug for the build type
7 if(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.")
10 endif()
11
12 # the name of the target operating system
13 set(CMAKE_SYSTEM_NAME Windows)
14 set(CMAKE_SYSTEM_PROCESSOR i686)
15
16 # which compilers to use for C and C++
17 if(USE_CLANG_CL)
18 set(CMAKE_C_COMPILER clang-cl)
19 else()
20 set(CMAKE_C_COMPILER cl)
21 endif()
22
23 if(ARCH STREQUAL "arm")
24 include(CMakeForceCompiler)
25 CMAKE_FORCE_CXX_COMPILER(cl MSVC)
26 else()
27 if(USE_CLANG_CL)
28 set(CMAKE_CXX_COMPILER clang-cl)
29 else()
30 set(CMAKE_CXX_COMPILER cl)
31 endif()
32 endif()
33
34 set(CMAKE_MC_COMPILER mc)
35 set(CMAKE_RC_COMPILER rc)
36 if(ARCH STREQUAL "amd64")
37 set(CMAKE_ASM_COMPILER ml64)
38 elseif(ARCH STREQUAL "arm")
39 set(CMAKE_ASM_COMPILER armasm)
40 else()
41 set(CMAKE_ASM_COMPILER ml)
42 endif()
43 set(CMAKE_ASM_COMPILER_ID "VISUAL")
44
45 set(CMAKE_C_STANDARD_LIBRARIES "" CACHE INTERNAL "")
46
47 if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86")
48 add_definitions(-D__i386__)
49 endif()