1 2set(SARCH "pc" CACHE STRING 3"Sub-architecture to build for. Specify one of: 4 pc pc98 xbox") 5 6set(OARCH "pentium" CACHE STRING 7"Generate instructions for this CPU type. Specify one of: 8 pentium, pentiumpro") 9 10set(TUNE "i686" CACHE STRING 11"Which CPU ReactOS should be optimized for.") 12 13set(OPTIMIZE "4" CACHE STRING 14"What level of optimization to use. 15 0 = Off 16 1 = Optimize for size (-Os) with some additional options 17 2 = Optimize for size (-Os) 18 3 = Optimize debugging experience (-Og) 19 4 = Optimize (-O1) 20 5 = Optimize even more (-O2) 21 6 = Optimize yet more (-O3) 22 7 = Disregard strict standards compliance (-Ofast)") 23 24set(LTCG FALSE CACHE BOOL 25"Whether to build with link-time code generation") 26 27set(GDB FALSE CACHE BOOL 28"Whether to compile for debugging with GDB. 29If you don't use GDB, don't enable this.") 30 31if(CMAKE_BUILD_TYPE STREQUAL "Release") 32 set(DBG FALSE CACHE BOOL 33"Whether to compile for debugging.") 34else() 35 set(DBG TRUE CACHE BOOL 36"Whether to compile for debugging.") 37endif() 38 39if(CMAKE_C_COMPILER_ID STREQUAL "GNU") 40 set(GCC TRUE CACHE BOOL "The compiler is GCC") 41 set(CLANG FALSE CACHE BOOL "The compiler is LLVM Clang") 42elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang") 43 # We can use LLVM Clang mimicking CL or GCC. Account for this 44 if (MSVC) 45 set(GCC FALSE CACHE BOOL "The compiler is GCC") 46 else() 47 set(GCC TRUE CACHE BOOL "The compiler is GCC") 48 endif() 49 set(CLANG TRUE CACHE BOOL "The compiler is LLVM Clang") 50elseif(MSVC) # aka CMAKE_C_COMPILER_ID STEQUAL "MSVC" 51 set(GCC FALSE CACHE BOOL "The compiler is GCC") 52 set(CLANG FALSE CACHE BOOL "The compiler is LLVM Clang") 53 # MSVC variable is already set by cmake 54else() 55 message("WARNING: the compiler has not been recognized") 56endif() 57 58if(MSVC AND (NOT USE_CLANG_CL)) 59 set(KDBG FALSE CACHE BOOL 60"Whether to compile in the integrated kernel debugger.") 61 if(CMAKE_BUILD_TYPE STREQUAL "Release") 62 set(_WINKD_ FALSE CACHE BOOL "Whether to compile with the KD protocol.") 63 else() 64 set(_WINKD_ TRUE CACHE BOOL "Whether to compile with the KD protocol.") 65 endif() 66 67else() 68 if(CMAKE_BUILD_TYPE STREQUAL "Release") 69 set(KDBG FALSE CACHE BOOL "Whether to compile in the integrated kernel debugger.") 70 else() 71 set(KDBG TRUE CACHE BOOL "Whether to compile in the integrated kernel debugger.") 72 endif() 73 set(_WINKD_ FALSE CACHE BOOL "Whether to compile with the KD protocol.") 74endif() 75 76set(BUILD_MP TRUE CACHE BOOL 77"Whether to build the multiprocessor versions of NTOSKRNL and HAL.") 78 79set(GENERATE_DEPENDENCY_GRAPH FALSE CACHE BOOL 80"Whether to create a GraphML dependency graph of DLLs.") 81 82if(MSVC) 83set(_PREFAST_ FALSE CACHE BOOL 84"Whether to enable PREFAST while compiling.") 85set(_VS_ANALYZE_ FALSE CACHE BOOL 86"Whether to enable static analysis while compiling.") 87 # RTC are incompatible with compiler optimizations. 88 cmake_dependent_option(RUNTIME_CHECKS "Whether to enable runtime checks on MSVC" ON 89 "CMAKE_BUILD_TYPE STREQUAL Debug" OFF) 90endif() 91 92if(GCC) 93 option(STACK_PROTECTOR "Whether to enable the GCC stack checker while compiling" OFF) 94endif() 95 96set(USE_DUMMY_PSEH FALSE CACHE BOOL 97"Whether to disable PSEH support.") 98