* Sync up to trunk head (r64829).
[reactos.git] / CMakeLists.txt
index a6a48ac..a5f5645 100644 (file)
@@ -1,5 +1,5 @@
 
-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 2.8.12)
 
 if(POLICY CMP0017)
     # Shadow cmake provided modules
@@ -63,6 +63,9 @@ if(NOT CMAKE_CROSSCOMPILING)
         if(ARCH STREQUAL "i386")
             add_definitions(/D_X86_ /DWIN32 /D_WINDOWS)
         endif()
+        if(MSVC_VERSION GREATER 1699)
+            add_definitions(/D_ALLOW_KEYWORD_MACROS)
+        endif()
         add_definitions(/Dinline=__inline)
     else()
         add_compile_flags("-fshort-wchar -Wno-multichar")
@@ -134,10 +137,10 @@ else()
         add_definitions(-D_WINKD_=1)
     endif()
 
-    if((NOT DEFINED PCH) AND (CMAKE_VERSION STREQUAL "2.8.12.1-ReactOS") AND (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang"))
-        set(PCH 1)
+    if(CMAKE_VERSION STREQUAL "2.8.12.1-ReactOS")
+        set(PCH 1 CACHE BOOL "Whether to use precompiled headers")
     else()
-        set(PCH 0)
+        set(PCH 0 CACHE BOOL "Whether to use precompiled headers")
     endif()
 
     # Version Options
@@ -218,7 +221,11 @@ else()
     add_subdirectory(include/reactos/mc)
     add_subdirectory(include/asm)
 
-    include(cmake/baseaddress.cmake)
+    if(NO_ROSSYM)
+        include(cmake/baseaddress_dwarf.cmake)
+    else()
+        include(cmake/baseaddress.cmake)
+    endif()
 
     # For MSVC builds, this puts all debug symbols file in the same directory.
     set(CMAKE_PDB_OUTPUT_DIRECTORY "${REACTOS_BINARY_DIR}/msvc_pdb")