[CMAKE] Implement PCH builds with target_precompile_headers. CORE-16905 2764/head
authorAmine Khaldi <amine.khaldi@reactos.org>
Sat, 9 May 2020 21:37:40 +0000 (22:37 +0100)
committerVictor Perevertkin <victor.perevertkin@reactos.org>
Sat, 6 Jun 2020 18:58:41 +0000 (21:58 +0300)
123 files changed:
CMakeLists.txt
base/applications/winhlp32/CMakeLists.txt
base/services/dhcpcsvc/CMakeLists.txt
base/services/svchost/CMakeLists.txt
dll/cpl/desk/CMakeLists.txt
dll/directx/wine/d3d8/CMakeLists.txt
dll/directx/wine/d3d9/CMakeLists.txt
dll/directx/wine/d3dcompiler_43/CMakeLists.txt
dll/directx/wine/d3dx9_36/d3dx9.cmake
dll/directx/wine/d3dxof/CMakeLists.txt
dll/directx/wine/dxdiagn/CMakeLists.txt
dll/directx/wine/msdmo/CMakeLists.txt
dll/directx/wine/quartz/CMakeLists.txt
dll/ntdll/CMakeLists.txt
dll/opengl/glu32/CMakeLists.txt
dll/shellext/netshell/CMakeLists.txt
dll/shellext/shellbtrfs/CMakeLists.txt
dll/win32/aclui/CMakeLists.txt
dll/win32/advapi32/CMakeLists.txt
dll/win32/avifil32/CMakeLists.txt
dll/win32/browseui/CMakeLists.txt
dll/win32/cabinet/CMakeLists.txt
dll/win32/comctl32/CMakeLists.txt
dll/win32/crypt32/CMakeLists.txt
dll/win32/fmifs/CMakeLists.txt
dll/win32/gdiplus/CMakeLists.txt
dll/win32/hhctrl.ocx/CMakeLists.txt
dll/win32/hlink/CMakeLists.txt
dll/win32/imagehlp/CMakeLists.txt
dll/win32/inetcomm/CMakeLists.txt
dll/win32/inseng/CMakeLists.txt
dll/win32/itss/CMakeLists.txt
dll/win32/jscript/CMakeLists.txt
dll/win32/mapi32/CMakeLists.txt
dll/win32/mscoree/CMakeLists.txt
dll/win32/msgina/CMakeLists.txt
dll/win32/mshtml/CMakeLists.txt
dll/win32/msi/CMakeLists.txt
dll/win32/msxml3/CMakeLists.txt
dll/win32/netapi32/CMakeLists.txt
dll/win32/ole32/CMakeLists.txt
dll/win32/oleacc/CMakeLists.txt
dll/win32/oleaut32/CMakeLists.txt
dll/win32/rpcrt4/CMakeLists.txt
dll/win32/scrrun/CMakeLists.txt
dll/win32/setupapi/CMakeLists.txt
dll/win32/shell32/CMakeLists.txt
dll/win32/shlwapi/CMakeLists.txt
dll/win32/sti/CMakeLists.txt
dll/win32/sxs/CMakeLists.txt
dll/win32/urlmon/CMakeLists.txt
dll/win32/userenv/CMakeLists.txt
dll/win32/vbscript/CMakeLists.txt
dll/win32/wbemdisp/CMakeLists.txt
dll/win32/wbemprox/CMakeLists.txt
dll/win32/windowscodecs/CMakeLists.txt
dll/win32/wininet/CMakeLists.txt
dll/win32/wldap32/CMakeLists.txt
dll/win32/wshom.ocx/CMakeLists.txt
drivers/bus/acpi/CMakeLists.txt
drivers/bus/acpi/cmbatt/CMakeLists.txt
drivers/bus/acpi/compbatt/CMakeLists.txt
drivers/bus/pcix/CMakeLists.txt
drivers/hid/hidclass/CMakeLists.txt
drivers/input/kbdclass/CMakeLists.txt
drivers/input/mouclass/CMakeLists.txt
drivers/serial/serenum/CMakeLists.txt
drivers/serial/serial/CMakeLists.txt
drivers/storage/class/classpnp/CMakeLists.txt
drivers/storage/port/storport/CMakeLists.txt
drivers/usb/usbccgp/CMakeLists.txt
drivers/usb/usbhub/CMakeLists.txt
drivers/usb/usbport/CMakeLists.txt
drivers/usb/usbstor/CMakeLists.txt
drivers/wdm/audio/backpln/portcls/CMakeLists.txt
drivers/wdm/audio/drivers/CMIDriver/CMakeLists.txt
modules/rosapps/applications/explorer-old/CMakeLists.txt
modules/rostests/apitests/advapi32/CMakeLists.txt
modules/rostests/apitests/afd/CMakeLists.txt
modules/rostests/apitests/atl/CMakeLists.txt
modules/rostests/apitests/cmd/CMakeLists.txt
modules/rostests/apitests/com/CMakeLists.txt
modules/rostests/apitests/gdi32/CMakeLists.txt
modules/rostests/apitests/kernel32/CMakeLists.txt
modules/rostests/apitests/mountmgr/CMakeLists.txt
modules/rostests/apitests/ntdll/CMakeLists.txt
modules/rostests/apitests/shell32/CMakeLists.txt
modules/rostests/apitests/user32/CMakeLists.txt
modules/rostests/apitests/win32nt/CMakeLists.txt
modules/rostests/apitests/ws2_32/CMakeLists.txt
modules/rostests/apitests/zipfldr/CMakeLists.txt
modules/rostests/winetests/advapi32/CMakeLists.txt
modules/rostests/winetests/comctl32/CMakeLists.txt
modules/rostests/winetests/comdlg32/CMakeLists.txt
modules/rostests/winetests/crypt32/CMakeLists.txt
modules/rostests/winetests/dinput/CMakeLists.txt
modules/rostests/winetests/dinput8/CMakeLists.txt
modules/rostests/winetests/dsound/CMakeLists.txt
modules/rostests/winetests/gdi32/CMakeLists.txt
modules/rostests/winetests/gdiplus/CMakeLists.txt
modules/rostests/winetests/kernel32/CMakeLists.txt
modules/rostests/winetests/mshtml/CMakeLists.txt
modules/rostests/winetests/msi/CMakeLists.txt
modules/rostests/winetests/msvcrt/CMakeLists.txt
modules/rostests/winetests/msxml3/CMakeLists.txt
modules/rostests/winetests/ntdll/CMakeLists.txt
modules/rostests/winetests/ole32/CMakeLists.txt
modules/rostests/winetests/oleaut32/CMakeLists.txt
modules/rostests/winetests/shell32/CMakeLists.txt
modules/rostests/winetests/shlwapi/CMakeLists.txt
modules/rostests/winetests/user32/CMakeLists.txt
modules/rostests/winetests/windowscodecs/CMakeLists.txt
ntoskrnl/CMakeLists.txt
ntoskrnl/ntkrnlmp/CMakeLists.txt
ntoskrnl/ntos.cmake
sdk/cmake/CMakeMacros.cmake
sdk/cmake/gcc.cmake
sdk/cmake/msvc.cmake
sdk/lib/3rdparty/libmpg123/CMakeLists.txt
win32ss/drivers/font/ftfd/CMakeLists.txt
win32ss/drivers/videoprt/CMakeLists.txt
win32ss/printing/base/spoolss/CMakeLists.txt
win32ss/printing/base/winspool/CMakeLists.txt

index c361321..d2c5fcf 100644 (file)
@@ -139,10 +139,17 @@ else()
         add_definitions(-D_WINKD_)
     endif()
 
-    if(CMAKE_VERSION MATCHES "ReactOS" AND CMAKE_VERSION VERSION_LESS 3.3.0)
-        set(PCH 1 CACHE BOOL "Whether to use precompiled headers")
+    if(ENABLE_CCACHE)
+        message(WARNING "-- Disabling precompiled headers support (ccache).")
+        option(PCH "Whether to use precompiled headers" OFF)
+    elseif(CMAKE_VERSION VERSION_LESS 3.16.0)
+        message(WARNING "-- Disabling precompiled headers support due to this unsupported CMake version: ${CMAKE_VERSION}.")
+        option(PCH "Whether to use precompiled headers" OFF)
+    elseif(GCC)
+        message(WARNING "-- Disabling precompiled headers on GCC by default CORE-17108.")
+        option(PCH "Whether to use precompiled headers" OFF)
     else()
-        set(PCH 0 CACHE BOOL "Whether to use precompiled headers")
+        option(PCH "Whether to use precompiled headers" ON)
     endif()
 
     # Version Options
index 0deaeaf..2e0b06b 100644 (file)
@@ -11,16 +11,24 @@ list(APPEND SOURCE
     callback.c
     hlpfile.c
     macro.c
-    winhelp.c
-    precomp.h)
+    winhelp.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    macro.lex.yy.c
+    string.c)
 
 # macro.lex.yy.c has been generated with relative file paths...
 set_source_files_properties(macro.lex.yy.c PROPERTIES COMPILE_FLAGS "-UREACTOS_SOURCE_DIR -DREACTOS_SOURCE_DIR=\"\\\".\\\"\"")
 
 add_rc_deps(rsrc.rc ${CMAKE_CURRENT_SOURCE_DIR}/res/winhelp.ico)
-add_executable(winhlp32 ${SOURCE} macro.lex.yy.c string.c rsrc.rc)
+
+add_executable(winhlp32
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE}
+    rsrc.rc)
+
 set_module_type(winhlp32 win32gui)
 target_link_libraries(winhlp32 wine)
 add_importlibs(winhlp32 user32 gdi32 shell32 comctl32 comdlg32 msvcrt kernel32 ntdll)
-add_pch(winhlp32 precomp.h SOURCE)
+add_pch(winhlp32 precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET winhlp32 DESTINATION reactos FOR all)
index e559f15..604d215 100644 (file)
@@ -16,16 +16,18 @@ list(APPEND SOURCE
     dhcp/socket.c
     dhcp/tables.c
     dhcp/util.c
-    dhcpcsvc.c
-    include/rosdhcp.h)
+    dhcpcsvc.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    ${CMAKE_CURRENT_BINARY_DIR}/dhcpcsvc_stubs.c)
 
 add_library(dhcpcsvc MODULE
     ${SOURCE}
+    ${PCH_SKIP_SOURCE}
     dhcpcsvc.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/dhcpcsvc_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/dhcpcsvc.def)
 
 set_module_type(dhcpcsvc win32dll)
 add_importlibs(dhcpcsvc ws2_32 iphlpapi advapi32 msvcrt kernel32 ntdll)
-add_pch(dhcpcsvc include/rosdhcp.h SOURCE)
+add_pch(dhcpcsvc include/rosdhcp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET dhcpcsvc DESTINATION reactos/system32 FOR all)
index ee6f64f..9a9af07 100644 (file)
@@ -4,17 +4,19 @@ list(APPEND SOURCE
     registry.c
     rpcsrv.c
     netbios.c
-    svchost.c
-    svchost.h)
+    svchost.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    security.cxx)
 
 add_executable(svchost
     ${SOURCE}
-    security.cxx
+    ${PCH_SKIP_SOURCE}
     svchost.rc)
 
 target_link_libraries(svchost uuid)
 set_module_type(svchost win32cui UNICODE)
 add_delay_importlibs(svchost netapi32 ole32)
 add_importlibs(svchost advapi32 rpcrt4 kernel32 ntdll)
-add_pch(svchost svchost.h SOURCE)
+add_pch(svchost svchost.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET svchost DESTINATION reactos/system32 FOR all)
index 597679b..b67c167 100644 (file)
@@ -20,20 +20,22 @@ list(APPEND SOURCE
     general.c
     draw.c
     theme.c
-    muireg.c
-    desk.h)
+    muireg.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 file(GLOB desk_rc_deps resources/*.*)
 add_rc_deps(desk.rc ${desk_rc_deps})
 
 add_library(desk MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     desk.rc
     ${CMAKE_CURRENT_BINARY_DIR}/desk.def)
 
 set_module_type(desk cpl UNICODE)
 target_link_libraries(desk uuid)
 add_importlibs(desk user32 advapi32 gdi32 comctl32 comdlg32 ole32 setupapi shell32 shlwapi uxtheme gdiplus msvcrt kernel32 ntdll)
-add_pch(desk desk.h SOURCE)
+add_pch(desk desk.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET desk DESTINATION reactos/system32 FOR all)
index 98a24bb..9160e2a 100644 (file)
@@ -17,17 +17,19 @@ list(APPEND SOURCE
     swapchain.c
     texture.c
     vertexdeclaration.c
-    volume.c
-    precomp.h)
+    volume.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(d3d8 MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     version.rc
     ${CMAKE_CURRENT_BINARY_DIR}/d3d8.def)
 
 set_module_type(d3d8 win32dll UNICODE)
 target_link_libraries(d3d8 uuid wine)
 add_importlibs(d3d8 d3dwine msvcrt kernel32 ntdll)
-add_pch(d3d8 precomp.h SOURCE)
+add_pch(d3d8 precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET d3d8 DESTINATION reactos/system32 FOR all)
index 14dd3e6..5c729ad 100644 (file)
@@ -18,12 +18,14 @@ list(APPEND SOURCE
     swapchain.c
     texture.c
     vertexdeclaration.c
-    volume.c
-    precomp.h)
+    volume.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(d3d9 MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     version.rc
     ${CMAKE_CURRENT_BINARY_DIR}/d3d9_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/d3d9.def)
@@ -31,5 +33,5 @@ add_library(d3d9 MODULE
 set_module_type(d3d9 win32dll UNICODE)
 target_link_libraries(d3d9 wine)
 add_importlibs(d3d9 d3dwine user32 msvcrt kernel32 ntdll)
-add_pch(d3d9 precomp.h SOURCE)
+add_pch(d3d9 precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET d3d9 DESTINATION reactos/system32 FOR all)
index c651fb5..899b51e 100644 (file)
@@ -15,19 +15,21 @@ list(APPEND SOURCE
     main.c
     preproc.c
     reflection.c
-    utils.c
-    precomp.h
-    ${CMAKE_CURRENT_BINARY_DIR}/d3dcompiler_43_stubs.c)
+    utils.c)
 
-add_library(d3dcompiler_43 MODULE
-    ${SOURCE}
+list(APPEND PCH_SKIP_SOURCE
     asmshader.tab.c
     asmshader.yy.c
     hlsl.tab.c
     hlsl.yy.c
     ppy.tab.c
-    ppl.yy.c
+    ppl.yy.c)
+
+add_library(d3dcompiler_43 MODULE
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE}
     version.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/d3dcompiler_43_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/d3dcompiler_43.def)
 
 # some files have been generated with relative file paths...
@@ -44,5 +46,5 @@ set_module_type(d3dcompiler_43 win32dll)
 target_link_libraries(d3dcompiler_43 dx10guid uuid wine wpp)
 add_importlibs(d3dcompiler_43 msvcrt kernel32 ntdll)
 add_dependencies(d3dcompiler_43 d3d_idl_headers)
-add_pch(d3dcompiler_43 precomp.h SOURCE)
+add_pch(d3dcompiler_43 precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET d3dcompiler_43 DESTINATION reactos/system32 FOR all)
index 80fb5d8..5fcdb96 100644 (file)
@@ -22,14 +22,16 @@ function(add_d3dx9_target __version)
         ../d3dx9_36/texture.c
         ../d3dx9_36/util.c
         ../d3dx9_36/volume.c
-        ../d3dx9_36/xfile.c
-        ../d3dx9_36/precomp.h)
+        ../d3dx9_36/xfile.c)
+
+    list(APPEND PCH_SKIP_SOURCE
+        ../d3dx9_36/guid.c
+        ${CMAKE_CURRENT_BINARY_DIR}/${module}_stubs.c)
 
     add_library(${module} MODULE
         ${SOURCE}
-        ../d3dx9_36/guid.c
+        ${PCH_SKIP_SOURCE}
         version.rc
-        ${CMAKE_CURRENT_BINARY_DIR}/${module}_stubs.c
         ${CMAKE_CURRENT_BINARY_DIR}/${module}.def)
     
     add_definitions(-D__ROS_LONG64__)
@@ -38,7 +40,7 @@ function(add_d3dx9_target __version)
     target_link_libraries(${module} dxguid wine)
     add_importlibs(${module} d3dcompiler_43 d3dxof d3dwine user32 ole32 gdi32 msvcrt kernel32 ntdll)
     add_delay_importlibs(${module} windowscodecs)
-    add_pch(${module} ../d3dx9_36/precomp.h SOURCE)
+    add_pch(${module} ../d3dx9_36/precomp.h "${PCH_SKIP_SOURCE}")
     add_cd_file(TARGET ${module} DESTINATION reactos/system32 FOR all)
     
     target_compile_definitions(${module} PRIVATE -DD3DX_SDK_VERSION=${__version} -D__WINESRC__ -Dcopysignf=_copysignf)
index 21b97cd..98fdae1 100644 (file)
@@ -6,17 +6,19 @@ spec2def(d3dxof.dll d3dxof.spec ADD_IMPORTLIB)
 list(APPEND SOURCE
     d3dxof.c
     main.c
-    parsing.c
-    precomp.h)
+    parsing.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    mszip.c)
 
 add_library(d3dxof MODULE
     ${SOURCE}
-    mszip.c
+    ${PCH_SKIP_SOURCE}
     version.rc
     ${CMAKE_CURRENT_BINARY_DIR}/d3dxof.def)
 
 set_module_type(d3dxof win32dll)
 target_link_libraries(d3dxof dxguid uuid wine)
 add_importlibs(d3dxof msvcrt kernel32 ntdll)
-add_pch(d3dxof precomp.h SOURCE)
+add_pch(d3dxof precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET d3dxof DESTINATION reactos/system32 FOR all)
index 16fdc1f..41adda0 100644 (file)
@@ -6,12 +6,14 @@ spec2def(dxdiagn.dll dxdiagn.spec)
 list(APPEND SOURCE
     container.c
     dxdiag_main.c
-    provider.c
-    precomp.h)
+    provider.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(dxdiagn MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     dxdiagn.rc
     ${CMAKE_CURRENT_BINARY_DIR}/dxdiagn.def)
 
@@ -19,5 +21,5 @@ set_module_type(dxdiagn win32dll)
 target_link_libraries(dxdiagn strmiids dxguid uuid wine)
 add_dependencies(dxdiagn wineheaders)
 add_importlibs(dxdiagn d3d9 ddraw version ole32 oleaut32 psapi user32 dsound msvcrt kernel32 ntdll)
-add_pch(dxdiagn precomp.h SOURCE)
+add_pch(dxdiagn precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET dxdiagn DESTINATION reactos/system32 FOR all)
index d8d1d34..03475b1 100644 (file)
@@ -5,17 +5,19 @@ spec2def(msdmo.dll msdmo.spec ADD_IMPORTLIB)
 
 list(APPEND SOURCE
     dmoreg.c
-    dmort.c
-    precomp.h)
+    dmort.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    stubs.c)
 
 add_library(msdmo MODULE
     ${SOURCE}
-    stubs.c
+    ${PCH_SKIP_SOURCE}
     rsrc.rc
     ${CMAKE_CURRENT_BINARY_DIR}/msdmo.def)
 
 set_module_type(msdmo win32dll)
 target_link_libraries(msdmo uuid wine mediaobj_guid)
 add_importlibs(msdmo user32 advapi32 ole32 msvcrt kernel32 ntdll)
-add_pch(msdmo precomp.h SOURCE)
+add_pch(msdmo precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET msdmo DESTINATION reactos/system32 FOR all)
index e0996b8..716edfd 100644 (file)
@@ -34,13 +34,15 @@ list(APPEND SOURCE
     systemclock.c
     videorenderer.c
     vmr9.c
-    waveparser.c
-    precomp.h)
+    waveparser.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
+    ${CMAKE_CURRENT_BINARY_DIR}/quartz_strmif_p.c)
 
 add_library(quartz MODULE
     ${SOURCE}
-    ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
-    ${CMAKE_CURRENT_BINARY_DIR}/quartz_strmif_p.c
+    ${PCH_SKIP_SOURCE}
     ${CMAKE_CURRENT_BINARY_DIR}/quartz.def
     version.rc)
 
@@ -57,5 +59,5 @@ set_module_type(quartz win32dll)
 target_link_libraries(quartz strmbase strmiids uuid dxguid wine ${PSEH_LIB})
 add_importlibs(quartz dsound msacm32 msvfw32 ole32 oleaut32 rpcrt4 user32 gdi32 advapi32 advapi32_vista shlwapi msvcrt kernel32 ntdll)
 add_dependencies(quartz dxsdk quartz_idlheader stdole2)
-add_pch(quartz precomp.h SOURCE)
+add_pch(quartz precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET quartz DESTINATION reactos/system32 FOR all)
index 5ea6ca5..6ad60fd 100644 (file)
@@ -23,8 +23,7 @@ list(APPEND SOURCE
     rtl/libsupp.c
     rtl/uilist.c
     rtl/version.c
-    etw/trace.c
-    include/ntdll.h)
+    etw/trace.c)
 
 if(ARCH STREQUAL "i386")
     list(APPEND ASM_SOURCE dispatch/i386/dispatch.S)
@@ -38,11 +37,14 @@ endif()
 
 add_asm_files(ntdll_asm ${ASM_SOURCE})
 
+list(APPEND PCH_SKIP_SOURCE
+    ${CMAKE_CURRENT_BINARY_DIR}/ntdll_stubs.c)
+
 add_library(ntdll MODULE
     ${SOURCE}
     ${ntdll_asm}
+    ${PCH_SKIP_SOURCE}
     def/ntdll.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/ntdll_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/ntdll.def)
 
 set_module_type(ntdll win32dll ENTRYPOINT 0)
@@ -56,6 +58,6 @@ if(MSVC)
 endif()
 
 target_link_libraries(ntdll rtl ntdllsys libcntpr uuid ${PSEH_LIB})
-add_pch(ntdll include/ntdll.h SOURCE)
+add_pch(ntdll include/ntdll.h "${PCH_SKIP_SOURCE}")
 add_dependencies(ntdll ntstatus asm)
 add_cd_file(TARGET ntdll DESTINATION reactos/system32 NO_CAB FOR all)
index b0caa74..b2e6de9 100644 (file)
@@ -107,13 +107,15 @@ list(APPEND LIBNURBS_SOURCE
     src/libnurbs/nurbtess/sampleCompTop.cc
     src/libnurbs/nurbtess/sampleMonoPoly.cc
     src/libnurbs/nurbtess/sampledLine.cc
-    src/libnurbs/nurbtess/searchTree.cc
-    precomp.h)
+    src/libnurbs/nurbtess/searchTree.cc)
+
+list(APPEND PCH_SKIP_SOURCE
+    src/libnurbs/nurbtess/polyDBG.cc
+    ${SOURCE})
 
 add_library(glu32 MODULE
     ${LIBNURBS_SOURCE}
-    src/libnurbs/nurbtess/polyDBG.cc
-    ${SOURCE}
+    ${PCH_SKIP_SOURCE}
     glu32.rc
     ${CMAKE_CURRENT_BINARY_DIR}/glu32.def)
 
@@ -129,5 +131,5 @@ elseif(USE_CLANG_CL)
 endif()
 
 add_importlibs(glu32 opengl32 gdi32 msvcrt kernel32 ntdll)
-add_pch(glu32 precomp.h LIBNURBS_SOURCE)
+add_pch(glu32 precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET glu32 DESTINATION reactos/system32 FOR all)
index dc4a260..2ed3173 100644 (file)
@@ -26,21 +26,23 @@ list(APPEND SOURCE
     connectmanager.cpp
     lanconnectui.cpp
     lanstatusui.cpp
-    setup.cpp
-    precomp.h)
+    setup.cpp)
+
+list(APPEND PCH_SKIP_SOURCE
+    ${CMAKE_CURRENT_BINARY_DIR}/netshell_stubs.c)
 
 file(GLOB netshell_rc_deps res/*.*)
 add_rc_deps(netshell.rc ${netshell_rc_deps})
 
 add_library(netshell MODULE
     ${SOURCE}
+    ${PCH_SKIP_SOURCE}
     netshell.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/netshell_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/netshell.def)
 
 set_module_type(netshell win32dll UNICODE)
 target_link_libraries(netshell uuid wine)
 add_delay_importlibs(netshell ole32 oleaut32 shlwapi shell32)
 add_importlibs(netshell version iphlpapi gdi32 user32 advapi32 setupapi ws2_32 comctl32 msvcrt kernel32 ntdll)
-add_pch(netshell precomp.h SOURCE)
+add_pch(netshell precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET netshell DESTINATION reactos/system32 FOR all)
index 7022dc0..c8fdc85 100644 (file)
@@ -24,12 +24,14 @@ list(APPEND SOURCE
     recv.cpp
     scrub.cpp
     send.cpp
-    volpropsheet.cpp
-    precomp.h)
+    volpropsheet.cpp)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(shellbtrfs MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     shellbtrfs.rc
     ${CMAKE_CURRENT_BINARY_DIR}/shellbtrfs.def)
 
@@ -39,5 +41,5 @@ add_rc_deps(shellbtrfs.rc ${shellbtrfs_rc_deps})
 set_module_type(shellbtrfs win32dll UNICODE)
 target_link_libraries(shellbtrfs uuid)
 add_importlibs(shellbtrfs advapi32 advapi32_vista ole32 shell32 shlwapi user32 comctl32 uxtheme setupapi comdlg32 gdi32 msvcrt kernel32_vista kernel32 ntdll)
-add_pch(shellbtrfs precomp.h SOURCE)
+add_pch(shellbtrfs precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET shellbtrfs DESTINATION reactos/system32 FOR all)
index 24d43d5..b7def50 100644 (file)
@@ -6,16 +6,18 @@ list(APPEND SOURCE
     aclui.c
     checklist.c
     misc.c
-    sidcache.c
-    precomp.h)
+    sidcache.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(aclui MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     aclui.rc
     ${CMAKE_CURRENT_BINARY_DIR}/aclui.def)
 
 set_module_type(aclui win32dll UNICODE)
 add_importlibs(aclui user32 gdi32 comctl32 ole32 oleaut32 advapi32 uxtheme msvcrt kernel32 ntdll)
-add_pch(aclui precomp.h SOURCE)
+add_pch(aclui precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET aclui DESTINATION reactos/system32 FOR all)
index 4a366ba..3e0d816 100644 (file)
@@ -43,22 +43,24 @@ list(APPEND SOURCE
     wine/crypt.c
     wine/crypt_des.c
     wine/crypt_lmhash.c
-    wine/security.c
-    advapi32.h)
+    wine/security.c)
 
-add_library(advapi32 MODULE
-    ${SOURCE}
-    advapi32.rc
+list(APPEND PCH_SKIP_SOURCE
     ${CMAKE_CURRENT_BINARY_DIR}/advapi32_stubs.c
-    ${CMAKE_CURRENT_BINARY_DIR}/advapi32.def
     ${CMAKE_CURRENT_BINARY_DIR}/eventlogrpc_c.c
     ${CMAKE_CURRENT_BINARY_DIR}/lsa_c.c
     ${CMAKE_CURRENT_BINARY_DIR}/svcctl_c.c
     ${CMAKE_CURRENT_BINARY_DIR}/winreg_c.c)
 
+add_library(advapi32 MODULE
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE}
+    advapi32.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/advapi32.def)
+
 set_module_type(advapi32 win32dll UNICODE ENTRYPOINT DllMain 12)
 target_link_libraries(advapi32 cryptlib wine ${PSEH_LIB})
 add_delay_importlibs(advapi32 secur32)
 add_importlibs(advapi32 advapi32_vista rpcrt4 kernel32 ntdll)
-add_pch(advapi32 advapi32.h SOURCE)
+add_pch(advapi32 advapi32.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET advapi32 DESTINATION reactos/system32 FOR all)
index 62daabf..c1a9e84 100644 (file)
@@ -17,19 +17,21 @@ list(APPEND SOURCE
     getframe.c
     icmstream.c
     tmpfile.c
-    wavfile.c
-    ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
-    precomp.h)
+    wavfile.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c
+    ${CMAKE_CURRENT_BINARY_DIR}/avifil32_p.c)
 
 add_library(avifil32 MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     rsrc.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/avifil32_p.c
+    ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
     ${CMAKE_CURRENT_BINARY_DIR}/avifil32.def)
 
 set_module_type(avifil32 win32dll)
 target_link_libraries(avifil32 wine ${PSEH_LIB})
 add_importlibs(avifil32 msacm32 msvfw32 winmm ole32 user32 advapi32 rpcrt4 msvcrt kernel32 ntdll)
-add_pch(avifil32 precomp.h SOURCE)
+add_pch(avifil32 precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET avifil32 DESTINATION reactos/system32 FOR all)
index 5626932..5c136cd 100644 (file)
@@ -37,19 +37,21 @@ list(APPEND SOURCE
     toolsband.cpp
     travellog.cpp
     utility.cpp
-    CProgressDialog.cpp
-    precomp.h)
+    CProgressDialog.cpp)
+
+list(APPEND PCH_SKIP_SOURCE
+    dllinstall.c)
 
 add_library(browseui MODULE
     ${SOURCE}
-    dllinstall.c
+    ${PCH_SKIP_SOURCE}
     browseui.rc
     ${CMAKE_CURRENT_BINARY_DIR}/browseui.def)
 
 set_module_type(browseui win32dll UNICODE)
 target_link_libraries(browseui shellbars shellfind uuid wine)
 add_importlibs(browseui uxtheme shlwapi shell32 comctl32 gdi32 ole32 oleaut32 user32 advapi32 mpr msvcrt kernel32 ntdll)
-add_pch(browseui precomp.h SOURCE)
+add_pch(browseui precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET browseui DESTINATION reactos/system32 FOR all)
 
 if(NOT MSVC)
index f770a50..042d0aa 100644 (file)
@@ -12,17 +12,19 @@ spec2def(cabinet.dll cabinet.spec ADD_IMPORTLIB)
 list(APPEND SOURCE
     cabinet_main.c
     fci.c
-    fdi.c
-    precomp.h)
+    fdi.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    stubs.c)
 
 add_library(cabinet MODULE
     ${SOURCE}
-    stubs.c
+    ${PCH_SKIP_SOURCE}
     cabinet.rc
     ${CMAKE_CURRENT_BINARY_DIR}/cabinet.def)
 
 set_module_type(cabinet win32dll)
 target_link_libraries(cabinet wine zlib)
 add_importlibs(cabinet msvcrt kernel32 ntdll)
-add_pch(cabinet precomp.h SOURCE)
+add_pch(cabinet precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET cabinet DESTINATION reactos/system32 FOR all)
index b47f764..d60f18a 100644 (file)
@@ -54,12 +54,14 @@ list(APPEND SOURCE
     tooltips.c
     trackbar.c
     treeview.c
-    updown.c
-    precomp.h)
+    updown.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    stubs.c)
 
 add_library(comctl32 MODULE
     ${SOURCE}
-    stubs.c
+    ${PCH_SKIP_SOURCE}
     rsrc.rc
     ${CMAKE_CURRENT_BINARY_DIR}/comctl32.def)
 
@@ -67,9 +69,9 @@ set_module_type(comctl32 win32dll UNICODE)
 target_link_libraries(comctl32 uuid wine ${PSEH_LIB})
 add_delay_importlibs(comctl32 winmm uxtheme)
 add_importlibs(comctl32 user32 gdi32 advapi32 usp10 imm32 msvcrt kernel32 ntdll)
-add_pch(comctl32 precomp.h SOURCE)
+add_pch(comctl32 precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET comctl32 DESTINATION reactos/system32 FOR all)
 add_cd_file(TARGET comctl32 DESTINATION reactos/winsxs/x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.2600.2982_none_deadbeef FOR all)
 add_cd_file(TARGET comctl32 DESTINATION reactos/winsxs/x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef FOR all)
 add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.2600.2982_none_deadbeef.manifest DESTINATION reactos/winsxs/manifests FOR all)
-add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef.manifest DESTINATION reactos/winsxs/manifests FOR all)
\ No newline at end of file
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef.manifest DESTINATION reactos/winsxs/manifests FOR all)
index 5c2a93c..b9ccf7b 100644 (file)
@@ -40,18 +40,20 @@ list(APPEND SOURCE
     serialize.c
     sip.c
     store.c
-    str.c
-    precomp.h)
+    str.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    ${CMAKE_CURRENT_BINARY_DIR}/crypt32_stubs.c)
 
 add_library(crypt32 MODULE
     ${SOURCE}
+    ${PCH_SKIP_SOURCE}
     crypt32.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/crypt32_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/crypt32.def)
 
 set_module_type(crypt32 win32dll)
 target_link_libraries(crypt32 wine ${PSEH_LIB} oldnames)
 add_delay_importlibs(crypt32 cryptnet)
 add_importlibs(crypt32 bcrypt user32 advapi32 advapi32_vista msvcrt kernel32 ntdll)
-add_pch(crypt32 precomp.h SOURCE)
+add_pch(crypt32 precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET crypt32 DESTINATION reactos/system32 FOR all)
index 41cac28..9a75621 100644 (file)
@@ -9,17 +9,19 @@ list(APPEND SOURCE
     format.c
     init.c
     media.c
-    query.c
-    precomp.h)
+    query.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    ${CMAKE_CURRENT_BINARY_DIR}/fmifs_stubs.c)
 
 add_library(fmifs MODULE
     ${SOURCE}
+    ${PCH_SKIP_SOURCE}
     fmifs.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/fmifs_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/fmifs.def)
 
 set_module_type(fmifs win32dll UNICODE ENTRYPOINT InitializeFmIfs 12)
 add_importlibs(fmifs kernel32 ntdll)
-add_pch(fmifs precomp.h SOURCE)
+add_pch(fmifs precomp.h "${PCH_SKIP_SOURCE}")
 add_dependencies(fmifs psdk)
 add_cd_file(TARGET fmifs DESTINATION reactos/system32 FOR all)
index 11fe7ee..a3ea0e3 100644 (file)
@@ -21,21 +21,23 @@ list(APPEND SOURCE
     pathiterator.c
     pen.c
     region.c
-    stringformat.c
-    precomp.h)
+    stringformat.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c
+    ${CMAKE_CURRENT_BINARY_DIR}/gdiplus_stubs.c)
 
 add_library(gdiplus MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     gdiplus.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/gdiplus_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/gdiplus.def)
 
 set_module_type(gdiplus win32dll)
 target_link_libraries(gdiplus wine)
 add_delay_importlibs(gdiplus windowscodecs)
 add_importlibs(gdiplus msvcrt shlwapi oleaut32 ole32 user32 gdi32 kernel32 ntdll)
-add_pch(gdiplus precomp.h SOURCE)
+add_pch(gdiplus precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET gdiplus DESTINATION reactos/system32 FOR all)
 
 add_cd_file(TARGET gdiplus DESTINATION reactos/winsxs/x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.23038_none_deadbeef FOR all)
@@ -43,4 +45,3 @@ add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/x86_microsoft.windows.gdiplus_6595b
 
 add_cd_file(TARGET gdiplus DESTINATION reactos/winsxs/x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.14393.0_none_deadbeef FOR all)
 add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.14393.0_none_deadbeef.manifest DESTINATION reactos/winsxs/manifests FOR all)
-
index 103e58e..32b6f02 100644 (file)
@@ -14,12 +14,14 @@ list(APPEND SOURCE
     index.c
     search.c
     stream.c
-    webbrowser.c
-    precomp.h)
+    webbrowser.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(hhctrl MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     hhctrl.rc
     ${CMAKE_CURRENT_BINARY_DIR}/hhctrl.def)
 
@@ -34,5 +36,5 @@ set_module_type(hhctrl win32ocx)
 target_link_libraries(hhctrl uuid wine)
 add_importlibs(hhctrl advapi32 comctl32 shlwapi ole32 oleaut32 user32 gdi32 msvcrt kernel32 ntdll)
 add_dependencies(hhctrl stdole2 wineheaders)
-add_pch(hhctrl precomp.h SOURCE)
+add_pch(hhctrl precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET hhctrl DESTINATION reactos/system32 FOR all)
index 29ae5f9..86e5e1a 100644 (file)
@@ -7,18 +7,20 @@ list(APPEND SOURCE
     browse_ctx.c
     extserv.c
     hlink_main.c
-    link.c
-    precomp.h)
+    link.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    ${CMAKE_CURRENT_BINARY_DIR}/hlink_stubs.c)
 
 add_library(hlink MODULE
     ${SOURCE}
+    ${PCH_SKIP_SOURCE}
     hlink.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/hlink_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/hlink.def)
 
 set_module_type(hlink win32dll)
 target_link_libraries(hlink uuid wine)
 add_delay_importlibs(hlink urlmon)
 add_importlibs(hlink shell32 ole32 advapi32 msvcrt kernel32 ntdll)
-add_pch(hlink precomp.h SOURCE)
+add_pch(hlink precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET hlink DESTINATION reactos/system32 FOR all)
index d39f1b4..717ebf7 100644 (file)
@@ -7,17 +7,19 @@ list(APPEND SOURCE
     access.c
     imagehlp_main.c
     integrity.c
-    modify.c
-    precomp.h)
+    modify.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    ${CMAKE_CURRENT_BINARY_DIR}/imagehlp_stubs.c)
 
 add_library(imagehlp MODULE
     ${SOURCE}
+    ${PCH_SKIP_SOURCE}
     imagehlp.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/imagehlp_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/imagehlp.def)
 
 set_module_type(imagehlp win32dll)
 target_link_libraries(imagehlp wine ${PSEH_LIB})
 add_importlibs(imagehlp dbghelp msvcrt kernel32 ntdll)
-add_pch(imagehlp precomp.h SOURCE)
+add_pch(imagehlp precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET imagehlp DESTINATION reactos/system32 FOR all)
index 3e60b99..90ff851 100644 (file)
@@ -11,18 +11,20 @@ list(APPEND SOURCE
     mimeole.c
     pop3transport.c
     protocol.c
-    smtptransport.c
-    precomp.h)
+    smtptransport.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c
+    ${CMAKE_CURRENT_BINARY_DIR}/inetcomm_stubs.c)
 
 add_library(inetcomm MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     inetcomm.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/inetcomm_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/inetcomm.def)
 
 set_module_type(inetcomm win32dll)
 target_link_libraries(inetcomm uuid wine)
 add_importlibs(inetcomm ole32 oleaut32 ws2_32 user32 propsys urlmon msvcrt kernel32 ntdll)
-add_pch(inetcomm precomp.h SOURCE)
+add_pch(inetcomm precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET inetcomm DESTINATION reactos/system32 FOR all)
index 1ee71e5..af11eea 100644 (file)
@@ -9,14 +9,20 @@ spec2def(inseng.dll inseng.spec)
 list(APPEND SOURCE
     icif.c
     inf.c
-    inseng_main.c
-    precomp.h
+    inseng_main.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
+
+add_library(inseng MODULE
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE}
+    inseng.rc
     ${CMAKE_CURRENT_BINARY_DIR}/inseng_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/inseng.def)
 
-add_library(inseng MODULE ${SOURCE} guid.c inseng.rc)
 set_module_type(inseng win32dll)
 target_link_libraries(inseng uuid wine)
 add_importlibs(inseng ole32 urlmon kernel32_vista msvcrt kernel32 ntdll)
-add_pch(inseng precomp.h SOURCE)
+add_pch(inseng precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET inseng DESTINATION reactos/system32 FOR all)
index 92a01fe..eb2f50c 100644 (file)
@@ -9,19 +9,21 @@ list(APPEND SOURCE
     itss.c
     moniker.c
     protocol.c
-    storage.c
-    precomp.h)
+    storage.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c
+    ${CMAKE_CURRENT_BINARY_DIR}/itss_stubs.c)
 
 add_library(itss MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     rsrc.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/itss_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/itss.def)
 
 set_module_type(itss win32dll)
 target_link_libraries(itss uuid wine)
 add_importlibs(itss urlmon shlwapi ole32 msvcrt kernel32 ntdll)
-add_pch(itss precomp.h SOURCE)
+add_pch(itss precomp.h "${PCH_SKIP_SOURCE}")
 add_dependencies(itss wineheaders)
 add_cd_file(TARGET itss DESTINATION reactos/system32 FOR all)
index b6f5c42..39f5001 100644 (file)
@@ -32,8 +32,11 @@ list(APPEND SOURCE
     object.c
     regexp.c
     string.c
-    vbarray.c
-    precomp.h)
+    vbarray.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    cc_parser.tab.c
+    parser.tab.c)
 
 # cc_parser.tab.c/parser.tab.c have been generated with relative file paths...
 set_source_files_properties(cc_parser.tab.c parser.tab.c PROPERTIES COMPILE_FLAGS "-UREACTOS_SOURCE_DIR -DREACTOS_SOURCE_DIR=\"\\\".\\\"\"")
@@ -48,8 +51,7 @@ set_source_files_properties(rsrc.rc PROPERTIES OBJECT_DEPENDS "${jscript_rc_deps
 
 add_library(jscript MODULE
     ${SOURCE}
-    cc_parser.tab.c
-    parser.tab.c
+    ${PCH_SKIP_SOURCE}
     rsrc.rc
     ${CMAKE_CURRENT_BINARY_DIR}/jscript.def)
 
@@ -59,5 +61,5 @@ add_dependencies(jscript jscript_idlheader stdole2)
 set_module_type(jscript win32dll)
 target_link_libraries(jscript uuid wine)
 add_importlibs(jscript user32 ole32 oleaut32 advapi32 msvcrt kernel32 ntdll)
-add_pch(jscript precomp.h SOURCE)
+add_pch(jscript precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET jscript DESTINATION reactos/system32 FOR all)
index 18da64d..35ba1de 100644 (file)
@@ -9,18 +9,20 @@ list(APPEND SOURCE
     prop.c
     sendmail.c
     stubs.c
-    util.c
-    precomp.h)
+    util.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c
+    ${CMAKE_CURRENT_BINARY_DIR}/mapi32_stubs.c)
 
 add_library(mapi32 MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     version.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/mapi32_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/mapi32.def)
 
 set_module_type(mapi32 win32dll)
 target_link_libraries(mapi32 uuid wine)
 add_importlibs(mapi32 shlwapi user32 advapi32 msvcrt kernel32 ntdll)
-add_pch(mapi32 precomp.h SOURCE)
+add_pch(mapi32 precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET mapi32 DESTINATION reactos/system32 FOR all)
index 8cba945..2671d7a 100644 (file)
@@ -13,18 +13,20 @@ list(APPEND SOURCE
     corruntimehost.c
     metadata.c
     metahost.c
-    mscoree_main.c
-    mscoree_private.h)
+    mscoree_main.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c
+    ${CMAKE_CURRENT_BINARY_DIR}/mscoree_stubs.c)
 
 add_library(mscoree MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     mscoree.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/mscoree_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/mscoree.def)
 
 set_module_type(mscoree win32dll)
 target_link_libraries(mscoree uuid wine)
 add_importlibs(mscoree dbghelp advapi32 shell32 ole32 shlwapi msvcrt kernel32 ntdll)
-add_pch(mscoree mscoree_private.h SOURCE)
+add_pch(mscoree mscoree_private.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET mscoree DESTINATION reactos/system32 FOR all)
index ca47e6c..5f3fa9e 100644 (file)
@@ -10,28 +10,27 @@ include_directories(
 
 spec2def(msgina.dll msgina.spec)
 
-list(APPEND C_SOURCE
+list(APPEND SOURCE
     gui.c
     lsa.c
     msgina.c
     shutdown.c
     stubs.c
-    tui.c
-    msgina.h)
+    tui.c)
 
-list(APPEND CPP_SOURCE
-    dimmedwindow.cpp)
+list(APPEND PCH_SKIP_SOURCE
+    dimmedwindow.cpp
+    ${CMAKE_CURRENT_BINARY_DIR}/msgina_stubs.c)
 
 add_library(msgina MODULE
-    ${C_SOURCE}
-    ${CPP_SOURCE}
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE}
     msgina.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/msgina_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/msgina.def)
 
 set_module_type(msgina win32dll UNICODE)
 target_link_libraries(msgina wine uuid ${PSEH_LIB})
 add_delay_importlibs(msgina secur32)
 add_importlibs(msgina advapi32 user32 gdi32 powrprof userenv msvcrt kernel32 ntdll)
-add_pch(msgina msgina.h CPP_SOURCE)
+add_pch(msgina msgina.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET msgina DESTINATION reactos/system32 FOR all)
index 05ad532..a225f25 100644 (file)
@@ -88,19 +88,21 @@ list(APPEND SOURCE
     task.c
     txtrange.c
     view.c
-    xmlhttprequest.c
-    mshtml_private.h)
+    xmlhttprequest.c)
 
 if(MSVC)
     add_asm_files(mshtml_asm msvc.S)
 endif()
 
+list(APPEND PCH_SKIP_SOURCE
+    guid.c
+    ${CMAKE_CURRENT_BINARY_DIR}/mshtml_stubs.c)
+
 add_library(mshtml MODULE
     ${SOURCE}
     ${mshtml_asm}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     rsrc.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/mshtml_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/mshtml.def)
 
 list(APPEND mshtml_rc_deps
@@ -114,5 +116,5 @@ target_link_libraries(mshtml uuid wine strmiids oldnames)
 add_delay_importlibs(mshtml wininet)
 add_importlibs(mshtml urlmon shlwapi shell32 ole32 oleaut32 user32 gdi32 advapi32 msvcrt kernel32 ntdll)
 add_dependencies(mshtml mshtml_nsiface_header)
-add_pch(mshtml mshtml_private.h SOURCE)
+add_pch(mshtml mshtml_private.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET mshtml DESTINATION reactos/system32 FOR all)
index 10306ca..106f681 100644 (file)
@@ -54,18 +54,20 @@ list(APPEND SOURCE
     tokenize.c
     update.c
     upgrade.c
-    where.c
-    precomp.h)
+    where.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    cond.tab.c
+    sql.tab.c
+    ${CMAKE_CURRENT_BINARY_DIR}/msiserver_i.c
+    ${CMAKE_CURRENT_BINARY_DIR}/msi_stubs.c)
 
 # cond.tab.c/sql.tab.c have been generated with relative file paths...
 set_source_files_properties(cond.tab.c sql.tab.c PROPERTIES COMPILE_FLAGS "-UREACTOS_SOURCE_DIR -DREACTOS_SOURCE_DIR=\"\\\".\\\"\"")
 
 add_library(msi MODULE
     ${SOURCE}
-    cond.tab.c
-    sql.tab.c
-    ${CMAKE_CURRENT_BINARY_DIR}/msiserver_i.c
-    ${CMAKE_CURRENT_BINARY_DIR}/msi_stubs.c
+    ${PCH_SKIP_SOURCE}
     msi.rc
     ${CMAKE_CURRENT_BINARY_DIR}/msi.def)
 
@@ -84,5 +86,5 @@ add_importlibs(msi advapi32 advapi32_vista cabinet comctl32 gdi32 ole32 oleaut32
     kernel32
     ntdll)
 
-add_pch(msi precomp.h SOURCE)
+add_pch(msi precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET msi DESTINATION reactos/system32 FOR all)
index 3cb5997..b11bdf3 100644 (file)
@@ -47,9 +47,13 @@ list(APPEND SOURCE
     xmldoc.c
     xmlelem.c
     xmlparser.c
-    xmlview.c
-    precomp.h
-    ${CMAKE_CURRENT_BINARY_DIR}/msxml3_stubs.c)
+    xmlview.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    factory.c
+    uuid.c
+    xslpattern.tab.c
+    xslpattern.yy.c)
 
 # xslpattern.tab.c/xslpattern.yy.c have been generated with relative file paths...
 set_source_files_properties(xslpattern.tab.c xslpattern.yy.c PROPERTIES COMPILE_FLAGS "-UREACTOS_SOURCE_DIR -DREACTOS_SOURCE_DIR=\"\\\".\\\"\"")
@@ -64,11 +68,9 @@ set_source_files_properties(version.rc PROPERTIES OBJECT_DEPENDS "${msxml3_rc_de
 
 add_library(msxml3 MODULE
     ${SOURCE}
-    xslpattern.tab.c
-    xslpattern.yy.c
-    factory.c
-    uuid.c
+    ${PCH_SKIP_SOURCE}
     version.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/msxml3_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/msxml3.def)
 
 add_idl_headers(xmlparser_idlheader xmlparser.idl)
@@ -76,5 +78,5 @@ set_module_type(msxml3 win32dll)
 target_link_libraries(msxml3 libxml2 iconv-static uuid wine zlib)
 add_importlibs(msxml3 urlmon ws2_32 shlwapi oleaut32 ole32 user32 msvcrt kernel32 ntdll)
 add_dependencies(msxml3 xmlparser_idlheader stdole2) # msxml3_v1.tlb needs stdole2.tlb
-add_pch(msxml3 precomp.h SOURCE)
+add_pch(msxml3 precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET msxml3 DESTINATION reactos/system32 FOR all)
index 046e372..bbc27a4 100644 (file)
@@ -35,24 +35,26 @@ list(APPEND SOURCE
     user.c
     utils.c
     wksta.c
-    wksta_new.c
-    netapi32.h
+    wksta_new.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    ${CMAKE_CURRENT_BINARY_DIR}/netapi32_stubs.c)
+
+add_library(netapi32 MODULE
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE}
     ${CMAKE_CURRENT_BINARY_DIR}/atsvc_c.c
     ${CMAKE_CURRENT_BINARY_DIR}/browser_c.c
     ${CMAKE_CURRENT_BINARY_DIR}/dssetup_c.c
     ${CMAKE_CURRENT_BINARY_DIR}/netdfs_c.c
     ${CMAKE_CURRENT_BINARY_DIR}/netlogon_c.c
     ${CMAKE_CURRENT_BINARY_DIR}/srvsvc_c.c
-    ${CMAKE_CURRENT_BINARY_DIR}/wkssvc_c.c)
-
-add_library(netapi32 MODULE
-    ${SOURCE}
-    ${CMAKE_CURRENT_BINARY_DIR}/netapi32_stubs.c
+    ${CMAKE_CURRENT_BINARY_DIR}/wkssvc_c.c
     ${CMAKE_CURRENT_BINARY_DIR}/netapi32.def)
 
 set_module_type(netapi32 win32dll)
 target_link_libraries(netapi32 wine ${PSEH_LIB})
 add_delay_importlibs(netapi32 samlib secur32)
 add_importlibs(netapi32 iphlpapi ws2_32 advapi32 rpcrt4 msvcrt kernel32 ntdll)
-add_pch(netapi32 netapi32.h SOURCE)
+add_pch(netapi32 netapi32.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET netapi32 DESTINATION reactos/system32 FOR all)
index 6ef97f4..61310a2 100644 (file)
@@ -58,25 +58,27 @@ list(APPEND SOURCE
     stg_stream.c
     storage32.c
     stubmanager.c
-    usrmarshal.c
-    precomp.h
-    ${CMAKE_CURRENT_BINARY_DIR}/dcom_i.c
-    ${CMAKE_CURRENT_BINARY_DIR}/irot_c.c)
+    usrmarshal.c)
 
 if(MSVC AND (ARCH STREQUAL "i386"))
     list(APPEND SOURCE msvc-thiscall.c)
 endif()
 
-add_library(ole32 MODULE
-    ${SOURCE}
+list(APPEND PCH_SKIP_SOURCE
     guid.c
-    ole32res.rc
     ${CMAKE_CURRENT_BINARY_DIR}/dcom_p.c
     ${CMAKE_CURRENT_BINARY_DIR}/ole32_objidl_p.c
     ${CMAKE_CURRENT_BINARY_DIR}/ole32_oleidl_p.c
     ${CMAKE_CURRENT_BINARY_DIR}/ole32_unknwn_p.c
     ${CMAKE_CURRENT_BINARY_DIR}/ole32_stubs.c
-    ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
+    ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c)
+
+add_library(ole32 MODULE
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE}
+    ole32res.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/dcom_i.c
+    ${CMAKE_CURRENT_BINARY_DIR}/irot_c.c
     ${CMAKE_CURRENT_BINARY_DIR}/ole32.def)
 
 set_module_type(ole32 win32dll)
@@ -84,5 +86,5 @@ target_link_libraries(ole32 wine uuid ${PSEH_LIB})
 add_delay_importlibs(ole32 oleaut32)
 add_importlibs(ole32 advapi32 user32 gdi32 rpcrt4 msvcrt kernel32 kernel32_vista ntdll)
 add_dependencies(ole32 ole32idl)
-add_pch(ole32 precomp.h SOURCE)
+add_pch(ole32 precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET ole32 DESTINATION reactos/system32 FOR all)
index bea28fa..5d58a0b 100644 (file)
@@ -12,9 +12,12 @@ list(APPEND SOURCE
     client.c
     main.c
     propservice.c
-    window.c
-    precomp.h
-    ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c)
+    window.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c
+    ${CMAKE_CURRENT_BINARY_DIR}/oleacc_classes_p.c
+    ${CMAKE_CURRENT_BINARY_DIR}/oleacc_stubs.c)
 
 add_idl_headers(oleacc_idlheader oleacc_classes.idl)
 add_typelib(oleacc_classes.idl)
@@ -29,15 +32,14 @@ set_source_files_properties(oleacc.rc PROPERTIES OBJECT_DEPENDS "${oleacc_rc_dep
 
 add_library(oleacc MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     oleacc.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/oleacc_classes_p.c
-    ${CMAKE_CURRENT_BINARY_DIR}/oleacc_stubs.c
+    ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
     ${CMAKE_CURRENT_BINARY_DIR}/oleacc.def)
 
 add_dependencies(oleacc oleacc_idlheader stdole2)
 set_module_type(oleacc win32dll)
 target_link_libraries(oleacc uuid wine ${PSEH_LIB})
 add_importlibs(oleacc oleaut32 ole32 user32 rpcrt4 msvcrt kernel32 ntdll)
-add_pch(oleacc precomp.h SOURCE)
+add_pch(oleacc precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET oleacc DESTINATION reactos/system32 FOR all)
index 6a15230..44bdb0a 100644 (file)
@@ -30,21 +30,23 @@ list(APPEND SOURCE
     usrmarshal.c
     varformat.c
     variant.c
-    vartype.c
-    precomp.h)
+    vartype.c)
 
 if(MSVC)
     add_asm_files(oleaut32_asm msvc.S)
 endif()
 
+list(APPEND PCH_SKIP_SOURCE
+    ${CMAKE_CURRENT_BINARY_DIR}/oleaut32_stubs.c
+    ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
+    ${CMAKE_CURRENT_BINARY_DIR}/oleaut32_oaidl_p.c
+    ${CMAKE_CURRENT_BINARY_DIR}/oleaut32_ocidl_p.c)
+
 add_library(oleaut32 MODULE
     ${SOURCE}
     ${oleaut32_asm}
+    ${PCH_SKIP_SOURCE}
     oleaut32.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/oleaut32_stubs.c
-    ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
-    ${CMAKE_CURRENT_BINARY_DIR}/oleaut32_oaidl_p.c
-    ${CMAKE_CURRENT_BINARY_DIR}/oleaut32_ocidl_p.c
     ${CMAKE_CURRENT_BINARY_DIR}/oleaut32.def)
 
 add_idl_headers(oleaut32_idlheader oleaut32_oaidl.idl)
@@ -53,5 +55,5 @@ set_module_type(oleaut32 win32dll)
 target_link_libraries(oleaut32 wine wineldr uuid ${PSEH_LIB})
 add_delay_importlibs(oleaut32 comctl32 urlmon windowscodecs)
 add_importlibs(oleaut32 ole32 rpcrt4 user32 gdi32 advapi32 kernel32_vista msvcrt kernel32 ntdll)
-add_pch(oleaut32 precomp.h SOURCE)
+add_pch(oleaut32 precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET oleaut32 DESTINATION reactos/system32 FOR all)
index a3d6826..c1f8de9 100644 (file)
@@ -39,21 +39,23 @@ list(APPEND SOURCE
     rpc_server.c
     rpc_transport.c
     unix_func.c
-    precomp.h
     ${CMAKE_CURRENT_BINARY_DIR}/epm_c.c)
 
 if(MSVC AND NOT ARCH STREQUAL "arm")
     add_asm_files(rpcrt4_asm msvc.S)
 endif()
 
-add_library(rpcrt4 MODULE
-    ${SOURCE}
+list(APPEND PCH_SKIP_SOURCE
     ndr_typelib.c
     ${CMAKE_CURRENT_BINARY_DIR}/ndr_types_p.c
     ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
+    ${CMAKE_CURRENT_BINARY_DIR}/rpcrt4_stubs.c)
+
+add_library(rpcrt4 MODULE
+    ${SOURCE}
     ${rpcrt4_asm}
+    ${PCH_SKIP_SOURCE}
     rpcrt4.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/rpcrt4_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/rpcrt4.def)
 
 set_module_type(rpcrt4 win32dll)
@@ -61,5 +63,5 @@ target_link_libraries(rpcrt4 wine uuid ${PSEH_LIB})
 add_delay_importlibs(rpcrt4 iphlpapi wininet secur32 user32 oleaut32)
 add_importlibs(rpcrt4 advapi32 advapi32_vista kernel32_vista ws2_32 msvcrt kernel32 ntdll)
 add_dependencies(rpcrt4 ndr_types_header)
-add_pch(rpcrt4 precomp.h SOURCE)
+add_pch(rpcrt4 precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET rpcrt4 DESTINATION reactos/system32 FOR all)
index 7dbc453..ae3dd17 100644 (file)
@@ -8,9 +8,10 @@ add_typelib(scrrun.idl)
 list(APPEND SOURCE
     dictionary.c
     filesystem.c
-    scrrun.c
-    precomp.h
-    ${CMAKE_CURRENT_BINARY_DIR}/scrrun_stubs.c)
+    scrrun.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 list(APPEND scrrun_rc_deps
     ${CMAKE_CURRENT_SOURCE_DIR}/scrrun.rgs
@@ -21,13 +22,14 @@ set_source_files_properties(scrrun.rc PROPERTIES OBJECT_DEPENDS "${scrrun_rc_dep
 
 add_library(scrrun MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     scrrun.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/scrrun_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/scrrun.def)
 
 add_dependencies(scrrun scrrun_idlheader stdole2)
 set_module_type(scrrun win32dll)
 target_link_libraries(scrrun uuid wine)
 add_importlibs(scrrun oleaut32 version advapi32 msvcrt kernel32 ntdll)
-add_pch(scrrun precomp.h SOURCE)
+add_pch(scrrun precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET scrrun DESTINATION reactos/system32 FOR all)
index 9646140..cd9feba 100644 (file)
@@ -29,19 +29,21 @@ list(APPEND SOURCE
     setupcab.c
     stringtable.c
     stubs.c
-    rpc.c
-    setupapi_private.h
-    ${CMAKE_CURRENT_BINARY_DIR}/pnp_c.c)
+    rpc.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    ${CMAKE_CURRENT_BINARY_DIR}/setupapi_stubs.c)
 
 add_library(setupapi MODULE
     ${SOURCE}
+    ${PCH_SKIP_SOURCE}
+    ${CMAKE_CURRENT_BINARY_DIR}/pnp_c.c
     setupapi.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/setupapi_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/setupapi.def)
 
 set_module_type(setupapi win32dll UNICODE)
 target_link_libraries(setupapi uuid wine ${PSEH_LIB})
 add_delay_importlibs(setupapi comdlg32 shell32 winspool.drv wintrust)
 add_importlibs(setupapi gdi32 comctl32 advapi32 user32 rpcrt4 version msvcrt kernel32 ntdll)
-add_pch(setupapi setupapi_private.h SOURCE)
+add_pch(setupapi setupapi_private.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET setupapi DESTINATION reactos/system32 FOR all)
index 1bd5265..e0a84c9 100644 (file)
@@ -86,15 +86,9 @@ list(APPEND SOURCE
     CShellDispatch.cpp
     CFolder.cpp
     CFolderItems.cpp
-    CFolderItemVerbs.cpp
-    precomp.h)
+    CFolderItemVerbs.cpp)
 
-file(GLOB_RECURSE shell32_rc_deps res/*.*)
-list(APPEND shell32_rc_deps ${CMAKE_CURRENT_BINARY_DIR}/shell32_shldisp.tlb)
-add_rc_deps(shell32.rc ${shell32_rc_deps})
-
-add_library(shell32 MODULE
-    ${SOURCE}
+list(APPEND PCH_SKIP_SOURCE
     wine/appbar.c
     wine/brsfolder.c
     wine/classes.c
@@ -110,11 +104,18 @@ add_library(shell32 MODULE
     wine/shlmenu.c
     wine/shpolicy.c
     vista.c
+    ${CMAKE_CURRENT_BINARY_DIR}/shell32_stubs.c)
+
+file(GLOB_RECURSE shell32_rc_deps res/*.*)
+list(APPEND shell32_rc_deps ${CMAKE_CURRENT_BINARY_DIR}/shell32_shldisp.tlb)
+add_rc_deps(shell32.rc ${shell32_rc_deps})
+
+add_library(shell32 MODULE
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE}
     shell32.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/shell32_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/shell32.def)
 
-
 add_typelib(shell32_shldisp.idl)
 set_source_files_properties(shell32.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/shell32_shldisp.tlb)
 
@@ -123,5 +124,5 @@ target_link_libraries(shell32 shellmenu shelldesktop wine uuid recyclebin)
 add_delay_importlibs(shell32 powrprof shdocvw devmgr winspool.drv winmm mpr uxtheme ole32 oleaut32 userenv browseui version fmifs)
 add_importlibs(shell32 advapi32 gdi32 user32 comctl32 comdlg32 shlwapi msvcrt kernel32 ntdll)
 add_dependencies(shell32 stdole2) # shell32_shldisp.tlb needs stdole2.tlb
-add_pch(shell32 precomp.h SOURCE)
+add_pch(shell32 precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET shell32 DESTINATION reactos/system32 FOR all)
index 78fe1d1..472eceb 100644 (file)
@@ -25,19 +25,21 @@ list(APPEND SOURCE
     stopwatch.c
     string.c
     thread.c
-    url.c
-    precomp.h)
+    url.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    wsprintf.c
+    ${CMAKE_CURRENT_BINARY_DIR}/shlwapi_stubs.c)
 
 add_library(shlwapi MODULE
     ${SOURCE}
+    ${PCH_SKIP_SOURCE}
     shlwapi.rc
-    wsprintf.c
-    ${CMAKE_CURRENT_BINARY_DIR}/shlwapi_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/shlwapi.def)
 
 set_module_type(shlwapi win32dll)
 target_link_libraries(shlwapi uuid wine)
 add_delay_importlibs(shlwapi userenv oleaut32 ole32 comdlg32 mpr mlang urlmon shell32 winmm version)
 add_importlibs(shlwapi user32 gdi32 advapi32 wininet msvcrt kernel32 ntdll)
-add_pch(shlwapi precomp.h SOURCE)
+add_pch(shlwapi precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET shlwapi DESTINATION reactos/system32 FOR all)
index e751fda..2b5f49b 100644 (file)
@@ -11,19 +11,21 @@ add_rpcproxy_files(sti_wia.idl)
 
 list(APPEND SOURCE
     sti.c
-    sti_main.c
-    precomp.h
-    ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
-    ${CMAKE_CURRENT_BINARY_DIR}/sti_wia_p.c)
+    sti_main.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(sti MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     sti.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
+    ${CMAKE_CURRENT_BINARY_DIR}/sti_wia_p.c
     ${CMAKE_CURRENT_BINARY_DIR}/sti.def)
 
 set_module_type(sti win32dll)
 target_link_libraries(sti wine uuid ${PSEH_LIB})
 add_importlibs(sti ole32 oleaut32 rpcrt4 advapi32 msvcrt kernel32 ntdll)
-add_pch(sti precomp.h SOURCE)
+add_pch(sti precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET sti DESTINATION reactos/system32 FOR all)
index 5df9744..6ed421e 100644 (file)
@@ -6,17 +6,19 @@ spec2def(sxs.dll sxs.spec ADD_IMPORTLIB)
 list(APPEND SOURCE
     cache.c
     name.c
-    sxs.c
-    precomp.h
-    ${CMAKE_CURRENT_BINARY_DIR}/sxs_stubs.c)
+    sxs.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(sxs MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
+    ${CMAKE_CURRENT_BINARY_DIR}/sxs_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/sxs.def)
 
 set_module_type(sxs win32dll)
 target_link_libraries(sxs wine)
 add_importlibs(sxs oleaut32 ole32 msvcrt kernel32 ntdll)
-add_pch(sxs precomp.h SOURCE)
+add_pch(sxs precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET sxs DESTINATION reactos/system32 FOR all)
index 4021d1e..7608fd9 100644 (file)
@@ -41,20 +41,22 @@ list(APPEND SOURCE
     umstream.c
     uri.c
     urlmon_main.c
-    usrmarshal.c
-    precomp.h)
+    usrmarshal.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
+    ${CMAKE_CURRENT_BINARY_DIR}/urlmon_urlmon_p.c
+    ${CMAKE_CURRENT_BINARY_DIR}/urlmon_stubs.c)
 
 add_library(urlmon MODULE
     ${SOURCE}
+    ${PCH_SKIP_SOURCE}
     urlmon.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
-    ${CMAKE_CURRENT_BINARY_DIR}/urlmon_urlmon_p.c
-    ${CMAKE_CURRENT_BINARY_DIR}/urlmon_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/urlmon.def)
 
 set_module_type(urlmon win32dll)
 target_link_libraries(urlmon uuid wine ${PSEH_LIB})
 add_delay_importlibs(urlmon advpack)
 add_importlibs(urlmon rpcrt4 propsys ole32 oleaut32 shlwapi shell32 wininet user32 advapi32 kernel32_vista msvcrt kernel32 ntdll)
-add_pch(urlmon precomp.h SOURCE)
+add_pch(urlmon precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET urlmon DESTINATION reactos/system32 FOR all)
index d30c243..28b2726 100644 (file)
@@ -11,17 +11,19 @@ list(APPEND SOURCE
     registry.c
     setup.c
     sid.c
-    userenv.c
-    precomp.h)
+    userenv.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    ${CMAKE_CURRENT_BINARY_DIR}/userenv_stubs.c)
 
 add_library(userenv MODULE
     ${SOURCE}
+    ${PCH_SKIP_SOURCE}
     userenv.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/userenv_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/userenv.def)
 
 set_module_type(userenv win32dll)
 target_link_libraries(userenv uuid)
 add_importlibs(userenv advapi32 user32 msvcrt kernel32 ntdll)
-add_pch(userenv precomp.h SOURCE)
+add_pch(userenv precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET userenv DESTINATION reactos/system32 FOR all)
index 63b9719..82b70c2 100644 (file)
@@ -13,8 +13,10 @@ list(APPEND SOURCE
     vbdisp.c
     vbregexp.c
     vbscript.c
-    vbscript_main.c
-    precomp.h)
+    vbscript_main.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    parser.tab.c)
 
 # parser.tab.c has been generated with relative file paths...
 set_source_files_properties(parser.tab.c PROPERTIES COMPILE_FLAGS "-UREACTOS_SOURCE_DIR -DREACTOS_SOURCE_DIR=\"\\\".\\\"\"")
@@ -34,7 +36,7 @@ add_typelib(vbsglobal.idl vbsregexp10.idl vbsregexp55.idl)
 
 add_library(vbscript MODULE
     ${SOURCE}
-    parser.tab.c
+    ${PCH_SKIP_SOURCE}
     vbscript.rc
     ${CMAKE_CURRENT_BINARY_DIR}/vbscript.def)
 
@@ -42,5 +44,5 @@ set_module_type(vbscript win32dll)
 target_link_libraries(vbscript uuid wine)
 add_importlibs(vbscript oleaut32 ole32 user32 msvcrt kernel32 ntdll)
 add_dependencies(vbscript vbscript_idlheader stdole2)
-add_pch(vbscript precomp.h SOURCE)
+add_pch(vbscript precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET vbscript DESTINATION reactos/system32 FOR all)
index 9744465..9ce0d0f 100644 (file)
@@ -5,8 +5,10 @@ spec2def(wbemdisp.dll wbemdisp.spec)
 
 list(APPEND SOURCE
     locator.c
-    main.c
-    precomp.h)
+    main.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_idl_headers(wbemdisp_idlheader wbemdisp_classes.idl)
 add_typelib(wbemdisp_tlb.idl)
@@ -20,7 +22,7 @@ set_source_files_properties(wbemdisp.rc PROPERTIES OBJECT_DEPENDS "${wbemdisp_rc
 
 add_library(wbemdisp MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     wbemdisp.rc
     ${CMAKE_CURRENT_BINARY_DIR}/wbemdisp.def)
 
@@ -28,5 +30,5 @@ set_module_type(wbemdisp win32dll)
 target_link_libraries(wbemdisp uuid wine)
 add_dependencies(wbemdisp stdole2 wbemdisp_idlheader)
 add_importlibs(wbemdisp oleaut32 ole32 msvcrt kernel32 ntdll)
-add_pch(wbemdisp precomp.h SOURCE)
+add_pch(wbemdisp precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET wbemdisp DESTINATION reactos/system32/wbem FOR all)
index 5d477df..de69823 100644 (file)
@@ -18,16 +18,18 @@ list(APPEND SOURCE
     service.c
     services.c
     table.c
-    wbemlocator.c
-    precomp.h)
+    wbemlocator.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c
+    wql.tab.c)
 
 # wql.tab.c has been generated with relative file paths...
 set_source_files_properties(wql.tab.c PROPERTIES COMPILE_FLAGS "-UREACTOS_SOURCE_DIR -DREACTOS_SOURCE_DIR=\"\\\".\\\"\"")
 
 add_library(wbemprox MODULE
     ${SOURCE}
-    wql.tab.c
-    guid.c
+    ${PCH_SKIP_SOURCE}
     wbemprox.rc
     ${CMAKE_CURRENT_BINARY_DIR}/wbemprox.def)
 
@@ -36,5 +38,5 @@ set_module_type(wbemprox win32dll)
 target_link_libraries(wbemprox uuid wine)
 add_importlibs(wbemprox iphlpapi oleaut32 advapi32 user32 gdi32 version winspool ws2_32 rpcrt4 setupapi msvcrt kernel32 ntdll)
 add_dependencies(wbemprox d3d_idl_headers)
-add_pch(wbemprox precomp.h SOURCE)
+add_pch(wbemprox precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET wbemprox DESTINATION reactos/system32/wbem FOR all)
index e17a657..ff726c8 100644 (file)
@@ -55,33 +55,32 @@ list(APPEND SOURCE
     stream.c
     tgaformat.c
     tiffformat.c
-    ungif.c
-    precomp.h)
+    ungif.c)
 
 if(MSVC)
     if(ARCH STREQUAL "i386")
         list(APPEND SOURCE msvc-thiscall.c)
     endif()
     set_source_files_properties(bitmap.c PROPERTIES COMPILE_FLAGS "/FImsvc.h")
-    list(APPEND ADDITIONAL_SOURCE bitmap.c)
+    list(APPEND PCH_SKIP_SOURCE bitmap.c)
 else()
     list(APPEND SOURCE bitmap.c)
 endif()
 
-list(APPEND ADDITIONAL_SOURCE
+list(APPEND PCH_SKIP_SOURCE
     guid.c
-    version.rc
     ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
     ${CMAKE_CURRENT_BINARY_DIR}/windowscodecs_stubs.c
-    ${CMAKE_CURRENT_BINARY_DIR}/windowscodecs.def
     ${CMAKE_CURRENT_BINARY_DIR}/windowscodecs_wincodec_p.c)
 
 add_library(windowscodecs MODULE
     ${SOURCE}
-    ${ADDITIONAL_SOURCE})
+    ${PCH_SKIP_SOURCE}
+    version.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/windowscodecs.def)
 
 set_module_type(windowscodecs win32dll)
 target_link_libraries(windowscodecs wine uuid ${PSEH_LIB})
 add_importlibs(windowscodecs ole32 oleaut32 rpcrt4 shlwapi user32 gdi32 advapi32 advapi32_vista propsys msvcrt kernel32 ntdll)
-add_pch(windowscodecs precomp.h SOURCE)
+add_pch(windowscodecs precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET windowscodecs DESTINATION reactos/system32 FOR all)
index 3389140..ef7693f 100644 (file)
@@ -21,18 +21,20 @@ list(APPEND SOURCE
     internet.c
     netconnection.c
     urlcache.c
-    utility.c
-    precomp.h)
+    utility.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    ${CMAKE_CURRENT_BINARY_DIR}/wininet_stubs.c)
 
 add_library(wininet MODULE
     ${SOURCE}
+    ${PCH_SKIP_SOURCE}
     rsrc.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/wininet_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/wininet.def)
 
 set_module_type(wininet win32dll)
 target_link_libraries(wininet wine ${PSEH_LIB} zlib)
 add_delay_importlibs(wininet secur32 crypt32 cryptui)
 add_importlibs(wininet mpr shlwapi shell32 user32 advapi32 ws2_32 normaliz kernel32_vista msvcrt kernel32 ntdll)
-add_pch(wininet precomp.h SOURCE)
+add_pch(wininet precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET wininet DESTINATION reactos/system32 FOR all)
index b0b0b21..4a94f6b 100644 (file)
@@ -22,18 +22,20 @@ list(APPEND SOURCE
     parse.c
     rename.c
     search.c
-    value.c
-    precomp.h
-    ${CMAKE_CURRENT_BINARY_DIR}/wldap32_stubs.c)
+    value.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    ber.c)
 
 add_library(wldap32 MODULE
     ${SOURCE}
-    ber.c
+    ${PCH_SKIP_SOURCE}
     wldap32.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/wldap32_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/wldap32.def)
 
 set_module_type(wldap32 win32dll)
 target_link_libraries(wldap32 wine)
 add_importlibs(wldap32 user32 msvcrt kernel32 ntdll)
-add_pch(wldap32 precomp.h SOURCE)
+add_pch(wldap32 precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET wldap32 DESTINATION reactos/system32 FOR all)
index 27c99b2..c790331 100644 (file)
@@ -11,12 +11,14 @@ add_typelib(wshom.idl)
 
 list(APPEND SOURCE
     shell.c
-    wshom_main.c
-    precomp.h)
+    wshom_main.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(wshom MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     wshom.rc
     ${CMAKE_CURRENT_BINARY_DIR}/wshom.def)
 
@@ -30,5 +32,5 @@ set_module_type(wshom win32ocx)
 target_link_libraries(wshom uuid wine)
 add_importlibs(wshom oleaut32 ole32 shell32 advapi32 advapi32_vista user32 msvcrt kernel32 ntdll)
 add_dependencies(wshom stdole2 wshom_idlheader)
-add_pch(wshom precomp.h SOURCE)
+add_pch(wshom precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET wshom DESTINATION reactos/system32 FOR all)
index 69d26a1..f7a3a19 100644 (file)
@@ -169,15 +169,17 @@ list(APPEND ACPICA_SOURCE
     acpica/utilities/utxface.c
     acpica/utilities/utxferror.c
     acpica/utilities/utxfinit.c
-    acpica/utilities/utxfmutex.c
-    acpica/include/acpi.h)
+    acpica/utilities/utxfmutex.c)
 
-add_library(acpica
-    ${ACPICA_SOURCE}
+list(APPEND ACPICA_PCH_SKIP_SOURCE
     acpica/utilities/utexcep.c
     acpica/utilities/utglobal.c)
 
-add_pch(acpica acpica/include/acpi.h ACPICA_SOURCE)
+add_library(acpica
+    ${ACPICA_SOURCE}
+    ${ACPICA_PCH_SKIP_SOURCE})
+
+add_pch(acpica acpica/include/acpi.h "${ACPICA_PCH_SKIP_SOURCE}")
 set_target_properties(acpica PROPERTIES COMPILE_DEFINITIONS "ACPI_USE_LOCAL_CACHE;ACPI_USE_SYSTEM_INTTYPES")
 add_dependencies(acpica bugcodes xdk)
 
@@ -194,8 +196,7 @@ list(APPEND ACPI_SOURCE
     pnp.c
     power.c
     buspdo.c
-    main.c
-    precomp.h)
+    main.c)
 
 add_library(acpi MODULE ${ACPI_SOURCE})
 set_module_type(acpi kernelmodedriver)
index 6375342..e43ea20 100644 (file)
@@ -3,15 +3,17 @@ list(APPEND SOURCE
     cmbatt.c
     cmexec.c
     cmbpnp.c
-    cmbwmi.c
-    cmbatt.h)
+    cmbwmi.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(cmbatt MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     cmbatt.rc)
 
 set_module_type(cmbatt kernelmodedriver)
 add_importlibs(cmbatt ntoskrnl hal battc wmilib)
-add_pch(cmbatt cmbatt.h SOURCE)
+add_pch(cmbatt cmbatt.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET cmbatt DESTINATION reactos/system32/drivers FOR all)
index 65743fc..b2e43d7 100644 (file)
@@ -2,15 +2,17 @@
 list(APPEND SOURCE
     compbatt.c
     compmisc.c
-    comppnp.c
-    compbatt.h)
+    comppnp.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(compbatt MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     compbatt.rc)
 
 set_module_type(compbatt kernelmodedriver)
 add_importlibs(compbatt ntoskrnl hal battc)
-add_pch(compbatt compbatt.h SOURCE)
+add_pch(compbatt compbatt.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET compbatt DESTINATION reactos/system32/drivers FOR all)
index cdbcf5f..4a27ae9 100644 (file)
@@ -36,17 +36,19 @@ list(APPEND SOURCE
     pdo.c
     power.c
     usage.c
-    utils.c
-    pci.h)
+    utils.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(pcix MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     pci.rc)
 
 set_module_type(pcix kernelmodedriver)
 target_link_libraries(pcix arbiter)
 add_importlibs(pcix ntoskrnl hal)
-add_pch(pcix pci.h SOURCE)
+add_pch(pcix pci.h "${PCH_SKIP_SOURCE}")
 add_dependencies(pcix pciclass)
 add_cd_file(TARGET pcix DESTINATION reactos/system32/drivers NO_CAB FOR all)
index f81954e..8ee1e81 100644 (file)
@@ -4,16 +4,18 @@ spec2def(hidclass.sys hidclass.spec ADD_IMPORTLIB)
 list(APPEND SOURCE
     fdo.c
     hidclass.c
-    pdo.c
-    precomp.h)
+    pdo.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(hidclass MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     hidclass.rc
     ${CMAKE_CURRENT_BINARY_DIR}/hidclass.def)
 
 set_module_type(hidclass kernelmodedriver ENTRYPOINT 0)
 add_importlibs(hidclass ntoskrnl hidparse hal)
-add_pch(hidclass precomp.h SOURCE)
+add_pch(hidclass precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET hidclass DESTINATION reactos/system32/drivers NO_CAB FOR all)
index fc3169d..9daa772 100644 (file)
@@ -1,16 +1,18 @@
 
 list(APPEND SOURCE
     kbdclass.c
-    misc.c
-    kbdclass.h)
+    misc.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(kbdclass MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     kbdclass.rc)
 
 set_module_type(kbdclass kernelmodedriver)
-add_pch(kbdclass kbdclass.h SOURCE)
+add_pch(kbdclass kbdclass.h "${PCH_SKIP_SOURCE}")
 target_link_libraries(kbdclass ${PSEH_LIB})
 add_importlibs(kbdclass ntoskrnl hal)
 add_cd_file(TARGET kbdclass DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 9a060d1..42b9f79 100644 (file)
@@ -1,17 +1,19 @@
 
 list(APPEND SOURCE
     misc.c
-    mouclass.c
-    mouclass.h)
+    mouclass.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(mouclass MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     mouclass.rc)
 
 set_module_type(mouclass kernelmodedriver)
 target_link_libraries(mouclass ${PSEH_LIB})
 add_importlibs(mouclass ntoskrnl hal)
-add_pch(mouclass mouclass.h SOURCE)
+add_pch(mouclass mouclass.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET mouclass DESTINATION reactos/system32/drivers FOR all)
 add_registry_inf(mouclass_reg.inf)
index 4cef8e4..925ad74 100644 (file)
@@ -4,15 +4,17 @@ list(APPEND SOURCE
     fdo.c
     misc.c
     pdo.c
-    serenum.c
-    serenum.h)
+    serenum.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(serenum MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     serenum.rc)
 
-add_pch(serenum serenum.h SOURCE)
+add_pch(serenum serenum.h "${PCH_SKIP_SOURCE}")
 set_module_type(serenum kernelmodedriver)
 add_importlibs(serenum ntoskrnl hal)
 add_cd_file(TARGET serenum DESTINATION reactos/system32/drivers FOR all)
index 257ad84..49ad434 100644 (file)
@@ -11,15 +11,17 @@ list(APPEND SOURCE
     pnp.c
     power.c
     rw.c
-    serial.c
-    serial.h)
+    serial.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(serial MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     serial.rc)
 
 set_module_type(serial kernelmodedriver)
 add_importlibs(serial ntoskrnl hal)
-add_pch(serial serial.h SOURCE)
+add_pch(serial serial.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET serial DESTINATION reactos/system32/drivers FOR all)
index d3399c7..fa30edc 100644 (file)
@@ -24,16 +24,18 @@ list(APPEND SOURCE
     power.c
     retry.c
     utils.c
-    xferpkt.c
-    classp.h)
+    xferpkt.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(classpnp MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     class.rc
     ${CMAKE_CURRENT_BINARY_DIR}/classpnp.def)
 
-add_pch(classpnp classp.h SOURCE)
+add_pch(classpnp classp.h "${PCH_SKIP_SOURCE}")
 target_link_libraries(classpnp ${PSEH_LIB} libcntpr)
 set_module_type(classpnp kernelmodedriver)
 add_importlibs(classpnp hal ntoskrnl)
index 7931a52..67a35dc 100644 (file)
@@ -7,16 +7,18 @@ list(APPEND SOURCE
     misc.c
     pdo.c
     storport.c
-    stubs.c
-    precomp.h)
+    stubs.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(storport MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     storport.rc
     ${CMAKE_CURRENT_BINARY_DIR}/storport.def)
 
-add_pch(storport precomp.h SOURCE)
+add_pch(storport precomp.h "${PCH_SKIP_SOURCE}")
 set_module_type(storport kernelmodedriver)
 add_importlibs(storport ntoskrnl hal)
 add_cd_file(TARGET storport DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 30e2089..2c9319f 100644 (file)
@@ -11,16 +11,18 @@ list(APPEND SOURCE
     function.c
     misc.c
     pdo.c
-    usbccgp.c
-    usbccgp.h)
+    usbccgp.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(usbccgp MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     usbccgp.rc)
 
 target_link_libraries(usbccgp ${PSEH_LIB})
 set_module_type(usbccgp kernelmodedriver)
 add_importlibs(usbccgp ntoskrnl hal usbd)
-add_pch(usbccgp usbccgp.h SOURCE)
+add_pch(usbccgp usbccgp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET usbccgp DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 35b109e..7d00718 100644 (file)
@@ -7,16 +7,18 @@ list(APPEND SOURCE
     ioctl.c
     pnp.c
     power.c
-    usbhub.c
-    usbhub.h)
+    usbhub.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(usbhub MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     usbhub.rc)
 
 target_link_libraries(usbhub ${PSEH_LIB})
 set_module_type(usbhub kernelmodedriver)
 add_importlibs(usbhub ntoskrnl hal wmilib usbd)
-add_pch(usbhub usbhub.h SOURCE)
+add_pch(usbhub usbhub.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET usbhub DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 4598381..8af14de 100644 (file)
@@ -15,16 +15,18 @@ list(APPEND SOURCE
     trfsplit.c
     urb.c
     usb2.c
-    usbport.c
-    usbport.h)
+    usbport.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(usbport MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     usbport.rc
     ${CMAKE_CURRENT_BINARY_DIR}/usbport.def)
 
-add_pch(usbport usbport.h SOURCE)
+add_pch(usbport usbport.h "${PCH_SKIP_SOURCE}")
 set_module_type(usbport kernelmodedriver)
 add_importlibs(usbport ntoskrnl hal)
 add_cd_file(TARGET usbport DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 567ee54..eaaee54 100644 (file)
@@ -11,16 +11,18 @@ list(APPEND SOURCE
     queue.c
     error.c
     scsi.c
-    usbstor.c
-    usbstor.h)
+    usbstor.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(usbstor MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     usbstor.rc)
 
 set_module_type(usbstor kernelmodedriver)
 add_importlibs(usbstor ntoskrnl hal usbd)
-add_pch(usbstor usbstor.h SOURCE)
+add_pch(usbstor usbstor.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET usbstor DESTINATION reactos/system32/drivers NO_CAB FOR all)
 add_driver_inf(usbstor usbstor.inf)
index 60742e4..294b48c 100644 (file)
@@ -46,12 +46,14 @@ list(APPEND SOURCE
     service_group.cpp
     undoc.cpp
     unregister.cpp
-    version.cpp
-    private.hpp)
+    version.cpp)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.cpp)
 
 add_library(portcls MODULE
     ${SOURCE}
-    guid.cpp
+    ${PCH_SKIP_SOURCE}
     portcls.rc
     ${CMAKE_CURRENT_BINARY_DIR}/portcls.def)
 
@@ -61,6 +63,6 @@ endif()
 
 target_link_libraries(portcls libcntpr ${PSEH_LIB})
 set_module_type(portcls kernelmodedriver ENTRYPOINT 0 )
-add_pch(portcls private.hpp SOURCE)
+add_pch(portcls private.hpp "${PCH_SKIP_SOURCE}")
 add_importlibs(portcls ntoskrnl ks drmk hal)
 add_cd_file(TARGET portcls DESTINATION reactos/system32/drivers FOR all)
index 29202ba..ba6cd3f 100644 (file)
@@ -12,12 +12,14 @@ list(APPEND SOURCE
     adapter.cpp
     common.cpp
     mintopo.cpp
-    minwave.cpp
-    precomp.h)
+    minwave.cpp)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.cpp)
 
 add_library(cmipci MODULE
     ${SOURCE}
-    guid.cpp
+    ${PCH_SKIP_SOURCE}
     cmipci.rc)
 
 target_link_libraries(cmipci stdunk libcntpr uuid)
@@ -28,7 +30,7 @@ if(USE_CLANG_CL OR (NOT MSVC))
     target_compile_options(cmipci PRIVATE -Wno-write-strings -Wno-switch)
 endif()
 
-add_pch(cmipci precomp.h SOURCE)
+add_pch(cmipci precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET cmipci DESTINATION reactos/system32/drivers FOR all)
 
 if(ARCH STREQUAL "i386")
index 2123f18..ca824c4 100644 (file)
@@ -39,23 +39,24 @@ list(APPEND SOURCE
     utility/utility.cpp
     utility/xmlstorage.cpp
     utility/window.cpp
-    utility/shellbrowserimpl.cpp
-    precomp.h) #    utility/shelltests.cpp
+    utility/shellbrowserimpl.cpp) #    utility/shelltests.cpp
+
+list(APPEND PCH_SKIP_SOURCE
+    services/startup.c)
 
 if(ARCH STREQUAL "i386")
-    list(APPEND I386_SOURCE i386-stub-win32.c)
+    list(APPEND PCH_SKIP_SOURCE i386-stub-win32.c)
 endif()
 
 add_executable(explorer_old
     ${SOURCE}
-    ${I386_SOURCE}
-    services/startup.c
+    ${PCH_SKIP_SOURCE}
     explorer.rc)
 
 target_link_libraries(explorer_old comsupp wine uuid)
 set_module_type(explorer_old win32gui UNICODE)
 add_importlibs(explorer_old advapi32 gdi32 user32 ws2_32 msimg32 comctl32 ole32 oleaut32 shell32 shlwapi notifyhook msvcrt kernel32 ntdll)
-add_pch(explorer_old precomp.h SOURCE)
+add_pch(explorer_old precomp.h "${PCH_SKIP_SOURCE}")
 add_dependencies(explorer_old psdk)
 add_cd_file(TARGET explorer_old DESTINATION reactos FOR all)
 add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/explorer-cfg-template.xml DESTINATION reactos FOR all)
index 8d7e560..c5bccc3 100644 (file)
@@ -17,12 +17,17 @@ list(APPEND SOURCE
     ServiceArgs.c
     ServiceEnv.c
     ServiceNetwork.c
-    svchlp.c
-    precomp.h)
+    svchlp.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
+
+add_executable(advapi32_apitest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE})
 
-add_executable(advapi32_apitest ${SOURCE} testlist.c)
 target_link_libraries(advapi32_apitest wine ${PSEH_LIB})
 set_module_type(advapi32_apitest win32cui)
 add_importlibs(advapi32_apitest advapi32 iphlpapi ws2_32 msvcrt kernel32 ntdll)
-add_pch(advapi32_apitest precomp.h SOURCE)
+add_pch(advapi32_apitest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET advapi32_apitest)
index d4b30b2..834f8e0 100644 (file)
@@ -5,12 +5,17 @@ include_directories(
 list(APPEND SOURCE
     AfdHelpers.c
     send.c
-    windowsize.c
-    precomp.h)
+    windowsize.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
+
+add_executable(afd_apitest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE})
 
-add_executable(afd_apitest ${SOURCE} testlist.c)
 target_link_libraries(afd_apitest wine)
 set_module_type(afd_apitest win32cui)
 add_importlibs(afd_apitest ws2_32 msvcrt kernel32 ntdll)
-add_pch(afd_apitest precomp.h SOURCE)
+add_pch(afd_apitest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET afd_apitest)
index b3e1209..c0c3781 100644 (file)
@@ -19,16 +19,18 @@ list(APPEND SOURCE
     CRegKey.cpp
     CSimpleArray.cpp
     CSimpleMap.cpp
-    CString.cpp
-    precomp.h)
+    CString.cpp)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
 
 add_executable(atl_apitest
     ${SOURCE}
-    testlist.c
+    ${PCH_SKIP_SOURCE}
     atl_apitest.rc)
 
 target_link_libraries(atl_apitest wine uuid)
 set_module_type(atl_apitest win32cui)
 add_importlibs(atl_apitest rpcrt4 ole32 oleaut32 msimg32 gdi32 advapi32 user32 msvcrt kernel32 ntdll)
-add_pch(atl_apitest precomp.h SOURCE)
+add_pch(atl_apitest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET atl_apitest)
index 5eae6cc..00202dd 100644 (file)
@@ -1,11 +1,10 @@
 
 list(APPEND SOURCE
     cmd.c
-    precomp.h)
+    testlist.c)
 
-add_executable(cmd_apitest ${SOURCE} testlist.c)
+add_executable(cmd_apitest ${SOURCE})
 target_link_libraries(cmd_apitest wine ${PSEH_LIB})
 set_module_type(cmd_apitest win32cui)
 add_importlibs(cmd_apitest msvcrt kernel32)
-add_pch(cmd_apitest precomp.h SOURCE)
 add_rostests_file(TARGET cmd_apitest)
index 73f0000..865e71c 100644 (file)
@@ -3,19 +3,24 @@ add_definitions(-DWINE_NO_UNICODE_MACROS)
 
 list(APPEND SOURCE
     browseui.c
+    com_apitest.c
     ieframe.c
     netcfgx.c
     netshell.c
     ole32.c
     shdocvw.c
     shell32.c
-    zipfldr.c
-    com_apitest.c
-    com_apitest.h)
+    zipfldr.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
+
+add_executable(com_apitest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE})
 
-add_executable(com_apitest ${SOURCE} testlist.c)
 target_link_libraries(com_apitest wine uuid)
 set_module_type(com_apitest win32cui)
 add_importlibs(com_apitest advapi32 ole32 shlwapi shell32 msvcrt kernel32 ntdll)
-add_pch(com_apitest com_apitest.h SOURCE)
+add_pch(com_apitest com_apitest.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET com_apitest)
index caa05d9..432e7e7 100644 (file)
@@ -75,12 +75,18 @@ list(APPEND SOURCE
     SetWindowExtEx.c
     SetWorldTransform.c
     TextTransform.c
-    init.c
-    precomp.h)
+    init.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
+
+add_executable(gdi32_apitest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE}
+    resource.rc)
 
-add_executable(gdi32_apitest ${SOURCE} testlist.c resource.rc)
 target_link_libraries(gdi32_apitest ${PSEH_LIB} win32ksys)
 set_module_type(gdi32_apitest win32cui)
 add_importlibs(gdi32_apitest gdi32 user32 msvcrt kernel32 ntdll)
-add_pch(gdi32_apitest precomp.h SOURCE)
+add_pch(gdi32_apitest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET gdi32_apitest)
index 52fcde5..9e0ca36 100644 (file)
@@ -35,16 +35,22 @@ list(APPEND SOURCE
     SystemFirmware.c
     TerminateProcess.c
     TunnelCache.c
-    WideCharToMultiByte.c
-    precomp.h)
+    WideCharToMultiByte.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
+
+add_executable(kernel32_apitest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE}
+    kernel32_apitest.rc)
 
-add_executable(kernel32_apitest ${SOURCE} testlist.c kernel32_apitest.rc)
 target_link_libraries(kernel32_apitest wine ${PSEH_LIB})
 set_module_type(kernel32_apitest win32cui)
 add_delay_importlibs(kernel32_apitest advapi32 shlwapi)
 add_importlibs(kernel32_apitest msvcrt kernel32 ntdll)
 add_dependencies(kernel32_apitest FormatMessage)
-add_pch(kernel32_apitest precomp.h SOURCE)
+add_pch(kernel32_apitest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET kernel32_apitest)
 
 list(APPEND MANIFEST_FILES
index 73317c6..4c499c2 100644 (file)
@@ -1,11 +1,17 @@
 
 list(APPEND SOURCE
-    QueryPoints.c
-    precomp.h)
+    QueryPoints.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
+
+add_executable(mountmgr_apitest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE})
 
-add_executable(mountmgr_apitest ${SOURCE} testlist.c)
 target_link_libraries(mountmgr_apitest wine ${PSEH_LIB})
 set_module_type(mountmgr_apitest win32cui)
 add_importlibs(mountmgr_apitest msvcrt kernel32 ntdll)
-add_pch(mountmgr_apitest precomp.h SOURCE)
+# TODO: Enable this when we get more than one source file to justify its use
+#add_pch(mountmgr_apitest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET mountmgr_apitest)
index a8a314a..c92fa97 100644 (file)
@@ -75,24 +75,28 @@ list(APPEND SOURCE
     RtlValidateUnicodeString.c
     StackOverflow.c
     SystemInfo.c
-    Timer.c
-    precomp.h)
+    Timer.c)
 
 if(ARCH STREQUAL "i386")
     add_asm_files(ntdll_apitest_asm i386/NtContinue.S)
 endif()
 
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
+
 add_rc_deps(testdata.rc ${CMAKE_CURRENT_BINARY_DIR}/load_notifications/load_notifications.dll)
+
 add_executable(ntdll_apitest
     ${SOURCE}
     ${ntdll_apitest_asm}
+    ${PCH_SKIP_SOURCE}
     testdata.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/ntdll_apitest.def
-    testlist.c)
+    ${CMAKE_CURRENT_BINARY_DIR}/ntdll_apitest.def)
+
 target_link_libraries(ntdll_apitest wine uuid ${PSEH_LIB})
 set_module_type(ntdll_apitest win32cui)
 add_importlibs(ntdll_apitest msvcrt advapi32 kernel32 ntdll)
-add_pch(ntdll_apitest precomp.h SOURCE)
+add_pch(ntdll_apitest precomp.h "${PCH_SKIP_SOURCE}")
 
 if(NOT MSVC)
     set_source_files_properties(RtlGetFullPathName_UstrEx.c PROPERTIES COMPILE_FLAGS "-Wno-format")
index 9bff4a9..9f8cee6 100644 (file)
@@ -34,19 +34,21 @@ list(APPEND SOURCE
     ShellState.cpp
     SHLimitInputEdit.cpp
     menu.cpp
-    shelltest.cpp
-    shelltest.h)
+    shelltest.cpp)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
 
 add_executable(shell32_apitest
     ${SOURCE}
-    testlist.c
+    ${PCH_SKIP_SOURCE}
     resource.rc
     ${CMAKE_CURRENT_BINARY_DIR}/shell32_apitest.def)
 
 target_link_libraries(shell32_apitest wine uuid ${PSEH_LIB})
 set_module_type(shell32_apitest win32cui)
 add_importlibs(shell32_apitest user32 gdi32 shell32 ole32 oleaut32 advapi32 shlwapi msvcrt kernel32 ntdll)
-add_pch(shell32_apitest shelltest.h SOURCE)
+add_pch(shell32_apitest shelltest.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET shell32_apitest)
 
 # shell-notify.exe
index 3d632d0..8960232 100644 (file)
@@ -46,14 +46,20 @@ list(APPEND SOURCE
     SystemParametersInfo.c
     TrackMouseEvent.c
     WndProc.c
-    wsprintf.c
-    precomp.h)
+    wsprintf.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
+
+add_executable(user32_apitest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE}
+    user32_apitest.rc)
 
-add_executable(user32_apitest ${SOURCE} testlist.c user32_apitest.rc)
 target_link_libraries(user32_apitest wine ${PSEH_LIB})
 set_module_type(user32_apitest win32cui)
 add_importlibs(user32_apitest advapi32 gdi32 user32 msvcrt kernel32 ntdll)
-add_pch(user32_apitest precomp.h SOURCE)
+add_pch(user32_apitest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET user32_apitest)
 
 add_rostests_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/verclasstest1.manifest")
index 35cd83e..22db4f5 100644 (file)
@@ -65,11 +65,14 @@ list(APPEND SOURCE
     ntuser/NtUserUpdatePerUserSystemParameters.c
 
     #osver.c
-    win32nt.h)
+    )
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
 
 add_executable(win32knt_apitest
     ${SOURCE}
-    testlist.c
+    ${PCH_SKIP_SOURCE}
     w32knapi.rc)
 
 target_link_libraries(win32knt_apitest ${PSEH_LIB} gditools)
@@ -84,5 +87,5 @@ add_importlibs(win32knt_apitest
     ntdll)
 add_delay_importlibs(win32knt_apitest win32u)
 add_dependencies(win32knt_apitest xdk)
-add_pch(win32knt_apitest win32nt.h SOURCE)
+add_pch(win32knt_apitest win32nt.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET win32knt_apitest)
index d9ad413..088d7c6 100644 (file)
@@ -17,12 +17,17 @@ list(APPEND SOURCE
     WSAAsync.c
     WSAIoctl.c
     WSARecv.c
-    WSAStartup.c
-    ws2_32.h)
+    WSAStartup.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
+
+add_executable(ws2_32_apitest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE})
 
-add_executable(ws2_32_apitest ${SOURCE} testlist.c)
 target_link_libraries(ws2_32_apitest wine ${PSEH_LIB})
 set_module_type(ws2_32_apitest win32cui)
 add_importlibs(ws2_32_apitest advapi32 iphlpapi ws2_32 msvcrt kernel32 ntdll)
-add_pch(ws2_32_apitest ws2_32.h SOURCE)
+add_pch(ws2_32_apitest ws2_32.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET ws2_32_apitest)
index a53bbfd..63da688 100644 (file)
@@ -7,17 +7,18 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/atl)
 list(APPEND SOURCE
     EnumObjects.cpp
     EnumParentDir.cpp
-    IDataObject.cpp
-    precomp.h
-    resource.h)
+    IDataObject.cpp)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
 
 add_executable(zipfldr_apitest
     ${SOURCE}
-    testlist.c
+    ${PCH_SKIP_SOURCE}
     zipfldr_apitest.rc)
 
 target_link_libraries(zipfldr_apitest wine uuid)
 set_module_type(zipfldr_apitest win32cui)
 add_importlibs(zipfldr_apitest shlwapi ole32 shell32 user32 msvcrt kernel32 ntdll)
-add_pch(zipfldr_apitest precomp.h SOURCE)
+add_pch(zipfldr_apitest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET zipfldr_apitest)
index 5df0f3b..34a3055 100644 (file)
@@ -12,10 +12,14 @@ list(APPEND SOURCE
     lsa.c
     registry.c
     security.c
-    service.c
-    precomp.h)
+    service.c)
 
-add_executable(advapi32_winetest ${SOURCE} testlist.c)
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
+
+add_executable(advapi32_winetest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE})
 
 if(USE_CLANG_CL OR (NOT MSVC))
     target_compile_options(advapi32_winetest PRIVATE "-Wno-format")
@@ -23,5 +27,5 @@ endif()
 
 set_module_type(advapi32_winetest win32cui)
 add_importlibs(advapi32_winetest advapi32 ole32 user32 msvcrt kernel32 ntdll)
-add_pch(advapi32_winetest precomp.h SOURCE)
+add_pch(advapi32_winetest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET advapi32_winetest)
index 42d37d7..ddc4caf 100644 (file)
@@ -30,14 +30,16 @@ list(APPEND SOURCE
     tooltips.c
     trackbar.c
     treeview.c
-    updown.c
-    precomp.h)
+    updown.c)
 
-add_executable(comctl32_winetest
-    ${SOURCE}
+list(APPEND PCH_SKIP_SOURCE
     button.c
     subclass.c
-    testlist.c
+    testlist.c)
+
+add_executable(comctl32_winetest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE}
     rsrc.rc)
 
 if(USE_CLANG_CL OR (NOT MSVC))
@@ -51,5 +53,5 @@ if(MSVC)
     add_importlibs(comctl32_winetest ntdll)
 endif()
 
-add_pch(comctl32_winetest precomp.h SOURCE)
+add_pch(comctl32_winetest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET comctl32_winetest)
index 11afc77..05862e1 100644 (file)
@@ -6,16 +6,18 @@ list(APPEND SOURCE
     finddlg.c
     fontdlg.c
     itemdlg.c
-    printdlg.c
-    precomp.h)
+    printdlg.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
 
 add_executable(comdlg32_winetest
     ${SOURCE}
-    testlist.c
+    ${PCH_SKIP_SOURCE}
     rsrc.rc)
 
 target_link_libraries(comdlg32_winetest uuid)
 set_module_type(comdlg32_winetest win32cui)
 add_importlibs(comdlg32_winetest comdlg32 winspool user32 gdi32 ole32 shell32 msvcrt kernel32)
-add_pch(comdlg32_winetest precomp.h SOURCE)
+add_pch(comdlg32_winetest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET comdlg32_winetest)
index 169694b..28c8b1f 100644 (file)
@@ -16,11 +16,16 @@ list(APPEND SOURCE
     protectdata.c
     sip.c
     store.c
-    str.c
-    precomp.h)
+    str.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
+
+add_executable(crypt32_winetest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE})
 
-add_executable(crypt32_winetest ${SOURCE} testlist.c)
 set_module_type(crypt32_winetest win32cui)
 add_importlibs(crypt32_winetest crypt32 advapi32 user32 shlwapi shell32 msvcrt kernel32)
-add_pch(crypt32_winetest precomp.h SOURCE)
+add_pch(crypt32_winetest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET crypt32_winetest)
index 58bec04..c87ab98 100644 (file)
@@ -6,12 +6,17 @@ list(APPEND SOURCE
     dinput.c
     joystick.c
     keyboard.c
-    mouse.c
-    precomp.h)
+    mouse.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
+
+add_executable(dinput_winetest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE})
 
-add_executable(dinput_winetest ${SOURCE} testlist.c)
 target_link_libraries(dinput_winetest dinput_data_formats)
 set_module_type(dinput_winetest win32cui)
 add_importlibs(dinput_winetest dinput ole32 user32 msvcrt kernel32)
-add_pch(dinput_winetest precomp.h SOURCE)
+add_pch(dinput_winetest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET dinput_winetest)
index f1a3ad5..b28d0f5 100644 (file)
@@ -1,9 +1,19 @@
 
 add_definitions(-DUSE_WINE_TODOS )
-list(APPEND SOURCE device.c dinput.c precomp.h)
-add_executable(dinput8_winetest ${SOURCE} testlist.c)
+
+list(APPEND SOURCE
+    device.c
+    dinput.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
+
+add_executable(dinput8_winetest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE})
+
 target_link_libraries(dinput8_winetest dinput_data_formats)
 set_module_type(dinput8_winetest win32cui)
 add_importlibs(dinput8_winetest dinput8 ole32 user32 advapi32 msvcrt kernel32)
-add_pch(dinput8_winetest precomp.h SOURCE)
+add_pch(dinput8_winetest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET dinput8_winetest)
index 2edf6f2..d90487a 100644 (file)
@@ -6,12 +6,17 @@ list(APPEND SOURCE
     dsound8.c
     dsound.c
     duplex.c
-    propset.c
-    dsound_test.h)
+    propset.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
+
+add_executable(dsound_winetest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE})
 
-add_executable(dsound_winetest ${SOURCE} testlist.c)
 target_link_libraries(dsound_winetest uuid dxguid)
 set_module_type(dsound_winetest win32cui)
 add_importlibs(dsound_winetest ole32 user32 msvcrt kernel32)
-add_pch(dsound_winetest dsound_test.h SOURCE)
+add_pch(dsound_winetest dsound_test.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET dsound_winetest)
index b9a4974..8931713 100644 (file)
@@ -15,12 +15,14 @@ list(APPEND SOURCE
     metafile.c
     palette.c
     path.c
-    pen.c
-    precomp.h)
+    pen.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
 
 add_executable(gdi32_winetest
     ${SOURCE}
-    testlist.c
+    ${PCH_SKIP_SOURCE}
     resource.rc)
 
 set_module_type(gdi32_winetest win32cui)
@@ -30,5 +32,5 @@ if(MSVC)
     add_importlibs(gdi32_winetest ntdll)
 endif()
 
-add_pch(gdi32_winetest precomp.h SOURCE)
+add_pch(gdi32_winetest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET gdi32_winetest)
index 151f566..73a0403 100644 (file)
@@ -18,16 +18,18 @@ list(APPEND SOURCE
     pathiterator.c
     pen.c
     region.c
-    stringformat.c
-    precomp.h)
+    stringformat.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c
+    testlist.c)
 
 add_executable(gdiplus_winetest
     ${SOURCE}
-    guid.c
-    testlist.c
+    ${PCH_SKIP_SOURCE}
     resource.rc)
 
 set_module_type(gdiplus_winetest win32cui)
 add_importlibs(gdiplus_winetest gdiplus user32 gdi32 ole32 msvcrt kernel32)
-add_pch(gdiplus_winetest precomp.h SOURCE)
+add_pch(gdiplus_winetest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET gdiplus_winetest)
index 1194e45..f61fe3c 100644 (file)
@@ -40,12 +40,14 @@ list(APPEND SOURCE
     toolhelp.c
     version.c
     virtual.c
-    volume.c
-    precomp.h)
+    volume.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
 
 add_executable(kernel32_winetest
     ${SOURCE}
-    testlist.c
+    ${PCH_SKIP_SOURCE}
     resource.rc)
 
 if(USE_CLANG_CL OR (NOT MSVC))
@@ -54,5 +56,5 @@ endif()
 
 set_module_type(kernel32_winetest win32cui)
 add_importlibs(kernel32_winetest user32 advapi32 msvcrt kernel32 ntdll)
-add_pch(kernel32_winetest precomp.h SOURCE)
+add_pch(kernel32_winetest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET kernel32_winetest)
index f744975..3c4646c 100644 (file)
@@ -13,13 +13,15 @@ list(APPEND SOURCE
     protocol.c
     script.c
     style.c
-    xmlhttprequest.c
-    precomp.h)
+    xmlhttprequest.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c
+    testlist.c)
 
 add_executable(mshtml_winetest
     ${SOURCE}
-    guid.c
-    testlist.c
+    ${PCH_SKIP_SOURCE}
     rsrc.rc)
 
 list(APPEND mshtml_winetest_rc_deps
@@ -37,5 +39,5 @@ target_link_libraries(mshtml_winetest uuid strmiids)
 set_module_type(mshtml_winetest win32cui)
 add_importlibs(mshtml_winetest wininet ole32 oleaut32 user32 gdi32 urlmon advapi32 msvcrt kernel32)
 add_dependencies(mshtml_winetest test_tlb_header stdole2)
-add_pch(mshtml_winetest precomp.h SOURCE)
+add_pch(mshtml_winetest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET mshtml_winetest)
index 57bb6f3..279ed0b 100644 (file)
@@ -29,8 +29,10 @@ list(APPEND SOURCE
     patch.c
     record.c
     source.c
-    suminfo.c
-    precomp.h)
+    suminfo.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
 
 if(NOT ${CMAKE_VERSION} VERSION_LESS "3.9.0")
     # CMake 3.9 and higher requires to specify this dependency manually
@@ -38,10 +40,14 @@ if(NOT ${CMAKE_VERSION} VERSION_LESS "3.9.0")
     set_property(SOURCE msi_winetest.rc PROPERTY OBJECT_DEPENDS custom.dll)
 endif()
 
-add_executable(msi_winetest ${SOURCE} testlist.c msi_winetest.rc)
+add_executable(msi_winetest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE}
+    msi_winetest.rc)
+
 target_link_libraries(msi_winetest uuid)
 set_module_type(msi_winetest win32cui)
 add_importlibs(msi_winetest cabinet msi shell32 ole32 oleaut32 user32 advapi32 version msvcrt kernel32)
-add_pch(msi_winetest precomp.h SOURCE)
+add_pch(msi_winetest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET msi_winetest)
 add_dependencies(msi_winetest custom)
index 9086673..05a4cc5 100644 (file)
@@ -22,10 +22,14 @@ list(APPEND SOURCE
     scanf.c
     signal.c
     string.c
-    time.c
-    precomp.h)
+    time.c)
 
-add_executable(msvcrt_winetest ${SOURCE} testlist.c)
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
+
+add_executable(msvcrt_winetest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE})
 
 if(USE_CLANG_CL OR (NOT MSVC))
     target_compile_options(msvcrt_winetest PRIVATE "-Wno-format")
@@ -39,5 +43,5 @@ if(MSVC)
     add_importlibs(msvcrt_winetest ntdll)
 endif()
 
-add_pch(msvcrt_winetest precomp.h SOURCE)
+add_pch(msvcrt_winetest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET msvcrt_winetest)
index 84c0d46..d7b0154 100644 (file)
@@ -10,13 +10,15 @@ list(APPEND SOURCE
     schema.c
     xmldoc.c
     xmlparser.c
-    xmlview.c
-    precomp.h)
+    xmlview.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c
+    testlist.c)
 
 add_executable(msxml3_winetest
     ${SOURCE}
-    guid.c
-    testlist.c
+    ${PCH_SKIP_SOURCE}
     rsrc.rc)
 
 add_idl_headers(xmlparser_idlheader_test xmlparser.idl)
@@ -28,5 +30,5 @@ if(MSVC)
     add_importlibs(msxml3_winetest ntdll)
 endif()
 
-add_pch(msxml3_winetest precomp.h SOURCE)
+add_pch(msxml3_winetest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET msxml3_winetest)
index 2262afe..21b6b7b 100644 (file)
@@ -21,8 +21,7 @@ list(APPEND SOURCE
     rtlbitmap.c
     rtlstr.c
     string.c
-    time.c
-    precomp.h)
+    time.c)
 
 if(ARCH STREQUAL "i386")
     list(APPEND SOURCE
@@ -30,7 +29,12 @@ if(ARCH STREQUAL "i386")
         generated.c)
 endif()
 
-add_executable(ntdll_winetest ${SOURCE} testlist.c)
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
+
+add_executable(ntdll_winetest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE})
 
 if(USE_CLANG_CL OR (NOT MSVC))
     target_compile_options(ntdll_winetest PRIVATE "-Wno-format")
@@ -38,5 +42,5 @@ endif()
 
 set_module_type(ntdll_winetest win32cui)
 add_importlibs(ntdll_winetest user32 ole32 advapi32 msvcrt kernel32 ntdll)
-add_pch(ntdll_winetest precomp.h SOURCE)
+add_pch(ntdll_winetest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET ntdll_winetest)
index 0cb4ec3..0b54eae 100644 (file)
@@ -15,10 +15,15 @@ list(APPEND SOURCE
     propvariant.c
     stg_prop.c
     storage32.c
-    usrmarshal.c
-    precomp.h)
+    usrmarshal.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
+
+add_executable(ole32_winetest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE})
 
-add_executable(ole32_winetest ${SOURCE} testlist.c)
 target_link_libraries(ole32_winetest uuid)
 set_module_type(ole32_winetest win32cui)
 add_importlibs(ole32_winetest oleaut32 ole32 user32 gdi32 advapi32 msvcrt kernel32)
@@ -27,5 +32,5 @@ if(MSVC)
     add_importlibs(ole32_winetest ntdll)
 endif()
 
-add_pch(ole32_winetest precomp.h SOURCE)
+add_pch(ole32_winetest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET ole32_winetest)
index 8605c41..9351c51 100644 (file)
@@ -23,8 +23,10 @@ list(APPEND SOURCE
     vartype.c
     ${CMAKE_CURRENT_BINARY_DIR}/test_reg_i.c
     ${CMAKE_CURRENT_BINARY_DIR}/test_tlb_i.c
-    ${CMAKE_CURRENT_BINARY_DIR}/tmarshal_i.c
-    precomp.h)
+    ${CMAKE_CURRENT_BINARY_DIR}/tmarshal_i.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
 
 set(tmarshal.rc_DEPS
     ${CMAKE_CURRENT_BINARY_DIR}/test_reg.tlb
@@ -32,7 +34,12 @@ set(tmarshal.rc_DEPS
     ${CMAKE_CURRENT_BINARY_DIR}/tmarshal.tlb)
 
 set_source_files_properties(tmarshal.rc PROPERTIES OBJECT_DEPENDS "${tmarshal.rc_DEPS}")
-add_executable(oleaut32_winetest ${SOURCE} testlist.c tmarshal.rc)
+
+add_executable(oleaut32_winetest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE}
+    tmarshal.rc)
+
 target_link_libraries(oleaut32_winetest uuid)
 set_module_type(oleaut32_winetest win32cui)
 add_importlibs(oleaut32_winetest oleaut32 ole32 rpcrt4 user32 gdi32 advapi32 msvcrt kernel32)
@@ -42,5 +49,5 @@ if(MSVC)
 endif()
 
 add_dependencies(oleaut32_winetest stdole2 oleaut32_idlheaders)
-add_pch(oleaut32_winetest precomp.h SOURCE)
+add_pch(oleaut32_winetest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET oleaut32_winetest)
index 429f1bf..16b70d4 100644 (file)
@@ -26,12 +26,14 @@ list(APPEND SOURCE
     shlfolder.c
     shlview.c
     string.c
-    systray.c
-    precomp.h)
+    systray.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
 
 add_executable(shell32_winetest
     ${SOURCE}
-    testlist.c
+    ${PCH_SKIP_SOURCE}
     rsrc.rc)
 
 target_link_libraries(shell32_winetest uuid)
@@ -42,5 +44,5 @@ if(MSVC)
     add_importlibs(shell32_winetest ntdll)
 endif()
 
-add_pch(shell32_winetest precomp.h SOURCE)
+add_pch(shell32_winetest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET shell32_winetest)
index 276e202..7676251 100644 (file)
@@ -14,10 +14,15 @@ list(APPEND SOURCE
     shreg.c
     string.c
     thread.c
-    url.c
-    precomp.h)
+    url.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
+
+add_executable(shlwapi_winetest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE})
 
-add_executable(shlwapi_winetest ${SOURCE} testlist.c)
 target_link_libraries(shlwapi_winetest uuid)
 set_module_type(shlwapi_winetest win32cui)
 add_importlibs(shlwapi_winetest shlwapi shell32 mlang oleaut32 ole32 user32 advapi32 msvcrt kernel32)
@@ -26,5 +31,5 @@ if(MSVC)
     add_importlibs(shlwapi_winetest ntdll)
 endif()
 
-add_pch(shlwapi_winetest precomp.h SOURCE)
+add_pch(shlwapi_winetest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET shlwapi_winetest)
index 4bd5253..331418d 100644 (file)
@@ -34,15 +34,17 @@ list(APPEND SOURCE
     uitools.c
     win.c
     winstation.c
-    wsprintf.c
-    precomp.h)
+    wsprintf.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
 
 add_executable(user32_winetest
     ${SOURCE}
-    testlist.c
+    ${PCH_SKIP_SOURCE}
     resource.rc)
 
-add_pch(user32_winetest precomp.h SOURCE)
+add_pch(user32_winetest precomp.h "${PCH_SKIP_SOURCE}")
 # some tests need to be run from an app compiled as GUI
 set_module_type(user32_winetest win32gui)
 add_importlibs(user32_winetest user32 gdi32 advapi32 msvcrt kernel32)
index 6bae33b..418181b 100644 (file)
@@ -16,14 +16,16 @@ list(APPEND SOURCE
     pngformat.c
     propertybag.c
     stream.c
-    tiffformat.c
-    precomp.h)
+    tiffformat.c)
 
-add_executable(windowscodecs_winetest
-    ${SOURCE}
+list(APPEND PCH_SKIP_SOURCE
     guid.c
     testlist.c)
 
+add_executable(windowscodecs_winetest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE})
+
 set_module_type(windowscodecs_winetest win32cui)
 add_importlibs(windowscodecs_winetest windowscodecs oleaut32 ole32 propsys user32 gdi32 shlwapi msvcrt kernel32)
 
@@ -31,5 +33,5 @@ if(MSVC)
     add_importlibs(windowscodecs_winetest ntdll)
 endif()
 
-add_pch(windowscodecs_winetest precomp.h SOURCE)
+add_pch(windowscodecs_winetest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET windowscodecs_winetest)
index 9a003de..57a387f 100644 (file)
@@ -12,10 +12,13 @@ set(NTKRNLMP_ASM_SOURCE ${ASM_SOURCE})
 spec2def(ntoskrnl.exe ntoskrnl.spec ADD_IMPORTLIB)
 add_asm_files(ntoskrnl_asm ${NTOSKRNL_ASM_SOURCE})
 
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
+
 add_executable(ntoskrnl
     ${ntoskrnl_asm}
     ${NTOSKRNL_SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     ntoskrnl.rc
     ${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl.def)
 set_property(TARGET ntoskrnl PROPERTY ENABLE_EXPORTS TRUE)
@@ -52,7 +55,7 @@ elseif(RUNTIME_CHECKS)
 endif()
 
 add_importlibs(ntoskrnl hal kdcom bootvid)
-add_pch(ntoskrnl ${REACTOS_SOURCE_DIR}/ntoskrnl/include/ntoskrnl.h NTOSKRNL_SOURCE)
+add_pch(ntoskrnl ${REACTOS_SOURCE_DIR}/ntoskrnl/include/ntoskrnl.h "${PCH_SKIP_SOURCE}")
 add_dependencies(ntoskrnl psdk bugcodes asm)
 add_cd_file(TARGET ntoskrnl DESTINATION reactos/system32 NO_CAB FOR all)
 
index 0c6e0a8..7f8ff10 100644 (file)
@@ -10,10 +10,13 @@ endif()
 
 add_asm_files(ntkrnlmp_asm ${NTKRNLMP_ASM_SOURCE})
 
+list(APPEND NTKRNLMP_PCH_SKIP_SOURCE
+    ${REACTOS_SOURCE_DIR}/ntoskrnl/guid.c)
+
 add_executable(ntkrnlmp
     ${ntkrnlmp_asm}
     ${NTKRNLMP_SOURCE}
-    ${REACTOS_SOURCE_DIR}/ntoskrnl/guid.c
+    ${NTKRNLMP_PCH_SKIP_SOURCE}
     ${REACTOS_SOURCE_DIR}/ntoskrnl/ntoskrnl.rc
     ${CMAKE_CURRENT_BINARY_DIR}/ntkrnlmp.def)
 set_property(TARGET ntkrnlmp PROPERTY ENABLE_EXPORTS TRUE)
@@ -45,6 +48,6 @@ endif()
 
 target_link_libraries(ntkrnlmp cportlib csq ${PSEH_LIB} arbiter cmlib ntlsalib rtl ${ROSSYM_LIB} libcntpr wdmguid ioevent)
 add_importlibs(ntkrnlmp hal kdcom bootvid)
-add_pch(ntkrnlmp ${REACTOS_SOURCE_DIR}/ntoskrnl/include/ntoskrnl.h NTKRNLMP_SOURCE)
+add_pch(ntkrnlmp ${REACTOS_SOURCE_DIR}/ntoskrnl/include/ntoskrnl.h "${NTKRNLMP_PCH_SKIP_SOURCE}")
 add_dependencies(ntkrnlmp psdk bugcodes asm)
 add_cd_file(TARGET ntkrnlmp DESTINATION reactos/system32 NO_CAB FOR all)
index 7cc68d8..b2224be 100644 (file)
@@ -41,7 +41,6 @@ else()
 endif()
 
 list(APPEND SOURCE
-    ${REACTOS_SOURCE_DIR}/ntoskrnl/include/ntoskrnl.h
     ${REACTOS_SOURCE_DIR}/ntoskrnl/cache/section/io.c
     ${REACTOS_SOURCE_DIR}/ntoskrnl/cache/section/data.c
     ${REACTOS_SOURCE_DIR}/ntoskrnl/cache/section/fault.c
index 51ec82d..a9216ee 100644 (file)
@@ -974,3 +974,13 @@ function(add_rostests_file)
         endif()
     endif()
 endfunction()
+
+if(PCH)
+    macro(add_pch _target _pch _skip_list)
+        target_precompile_headers(${_target} PRIVATE ${_pch})
+        set_source_files_properties(${_skip_list} PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
+    endmacro()
+else()
+    macro(add_pch _target _pch _skip_list)
+    endmacro()
+endif()
index fa04065..b48803c 100644 (file)
@@ -419,41 +419,6 @@ endmacro()
 # PSEH lib, needed with mingw
 set(PSEH_LIB "pseh")
 
-# Macros
-if(PCH AND (NOT ENABLE_CCACHE) AND (NOT CMAKE_HOST_APPLE))
-    add_compile_flags("-Winvalid-pch -Werror=invalid-pch")
-    macro(add_pch _target _pch _sources)
-        # When including x.h GCC looks for x.h.gch first
-        set(_pch_final_name "${_target}_pch.h")
-        set(_gch ${CMAKE_CURRENT_BINARY_DIR}/${_pch_final_name}.gch)
-
-        if(IS_CPP)
-            set(_pch_language CXX)
-        else()
-            set(_pch_language C)
-        endif()
-
-        # Build the precompiled header
-        # HEADER_FILE_ONLY FALSE: force compiling the header
-        # EXTERNAL_SOURCE TRUE: don't use the .gch file when linking
-        set_source_files_properties(${_pch} PROPERTIES
-            HEADER_FILE_ONLY FALSE
-            LANGUAGE ${_pch_language}
-            EXTERNAL_SOURCE TRUE
-            OBJECT_LOCATION ${_gch})
-
-        # Include the gch in the specified source files, skipping the pch file itself
-        list(REMOVE_ITEM ${_sources} ${_pch})
-        foreach(_src ${${_sources}})
-            set_property(SOURCE ${_src} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_ccache_flag} -include ${CMAKE_CURRENT_BINARY_DIR}/${_pch_final_name}")
-            set_property(SOURCE ${_src} APPEND PROPERTY OBJECT_DEPENDS ${_gch})
-        endforeach()
-    endmacro()
-else()
-    macro(add_pch _target _pch _sources)
-    endmacro()
-endif()
-
 function(CreateBootSectorTarget _target_name _asm_file _binary_file _base_address)
     set(_object_file ${_binary_file}.o)
 
index 4e4e047..4bfa2f8 100644 (file)
@@ -233,63 +233,6 @@ set(CMAKE_RC_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_MODULE})
 set(CMAKE_ASM_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_MODULE})
 set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
 
-if(PCH)
-    macro(add_pch _target _pch _sources)
-
-        # Workaround for the MSVC toolchain (MSBUILD) /MP bug
-        set(_temp_gch ${CMAKE_CURRENT_BINARY_DIR}/${_target}.pch)
-        if(MSVC_IDE)
-            file(TO_NATIVE_PATH ${_temp_gch} _gch)
-        else()
-            set(_gch ${_temp_gch})
-        endif()
-
-        if(IS_CPP)
-            set(_pch_language CXX)
-            if(NOT USE_CLANG_CL)
-                set(_cl_lang_flag "/TP")
-            endif()
-        else()
-            set(_pch_language C)
-            set(_cl_lang_flag "/TC")
-        endif()
-
-        if(MSVC_IDE)
-            set(_pch_path_name_flag "/Fp${_gch}")
-        endif()
-
-        if(USE_CLANG_CL)
-            set(_pch_compile_flags "${_cl_lang_flag} /Yc${_pch} /FI${_pch} /Fp${_gch}")
-        else()
-            set(_pch_compile_flags "${_cl_lang_flag} /Yc /Fp${_gch}")
-        endif()
-
-        # Build the precompiled header
-        # HEADER_FILE_ONLY FALSE: force compiling the header
-        set_source_files_properties(${_pch} PROPERTIES
-            HEADER_FILE_ONLY FALSE
-            LANGUAGE ${_pch_language}
-            COMPILE_FLAGS ${_pch_compile_flags}
-            OBJECT_OUTPUTS ${_gch})
-
-        # Prevent a race condition related to writing to the PDB files between the PCH and the excluded list of source files
-        get_target_property(_target_sources ${_target} SOURCES)
-        list(REMOVE_ITEM _target_sources ${_pch})
-        foreach(_target_src ${_target_sources})
-            set_property(SOURCE ${_target_src} APPEND PROPERTY OBJECT_DEPENDS ${_gch})
-        endforeach()
-
-        # Use the precompiled header with the specified source files, skipping the pch itself
-        list(REMOVE_ITEM ${_sources} ${_pch})
-        foreach(_src ${${_sources}})
-            set_property(SOURCE ${_src} APPEND_STRING PROPERTY COMPILE_FLAGS " /FI${_gch} /Yu${_gch} ${_pch_path_name_flag}")
-        endforeach()
-    endmacro()
-else()
-    macro(add_pch _target _pch _sources)
-    endmacro()
-endif()
-
 function(set_entrypoint _module _entrypoint)
     if(${_entrypoint} STREQUAL "0")
         add_target_link_flags(${_module} "/NOENTRY")
index 867e928..e14a3df 100644 (file)
@@ -39,9 +39,14 @@ list(APPEND SOURCE
     synth_8bit.c
     synth_real.c
     synth_s32.c
-    tabinit.c
-    precomp.h)
+    tabinit.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    optimize.c)
+
+add_library(libmpg123
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE})
 
-add_library(libmpg123 ${SOURCE} optimize.c)
 add_dependencies(libmpg123 psdk)
-add_pch(libmpg123 precomp.h SOURCE)
+add_pch(libmpg123 precomp.h "${PCH_SKIP_SOURCE}")
index 2a5c195..442dad5 100644 (file)
@@ -6,18 +6,20 @@ list(APPEND SOURCE
     enable.c
     font.c
     glyph.c
-    rosglue.c
-    ftfd.h)
+    rosglue.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    sprintf.c)
 
 add_library(ftfd MODULE
     ${SOURCE}
-    sprintf.c
+    ${PCH_SKIP_SOURCE}
     freetype.rc
     ${CMAKE_CURRENT_BINARY_DIR}/ftfd.def)
 
 set_module_type(ftfd kerneldll ENTRYPOINT FtfdEnableDriver 12)
 target_link_libraries(ftfd freetype libcntpr)
-add_pch(ftfd ftfd.h SOURCE)
+add_pch(ftfd ftfd.h "${PCH_SKIP_SOURCE}")
 add_importlibs(ftfd win32k)
 add_dependencies(ftfd psdk)
 add_cd_file(TARGET ftfd DESTINATION reactos/system32 FOR all)
index be11654..6f652c9 100644 (file)
@@ -19,17 +19,19 @@ list(APPEND SOURCE
     spinlock.c
     stubs.c
     timer.c
-    videoprt.c
-    videoprt.h)
+    videoprt.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(videoprt MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     videoprt.rc
     ${CMAKE_CURRENT_BINARY_DIR}/videoprt.def)
 
 set_module_type(videoprt kernelmodedriver)
 target_link_libraries(videoprt ${PSEH_LIB})
 add_importlibs(videoprt ntoskrnl hal)
-add_pch(videoprt videoprt.h SOURCE)
+add_pch(videoprt videoprt.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET videoprt DESTINATION reactos/system32/drivers FOR all)
index 47084f6..e6c02ea 100644 (file)
@@ -9,20 +9,22 @@ list(APPEND SOURCE
     memory.c
     monitors.c
     ports.c
-    precomp.h
     printerdata.c
     printers.c
     printprocessors.c
     tools.c)
 
+list(APPEND PCH_SKIP_SOURCE
+    ${CMAKE_CURRENT_BINARY_DIR}/spoolss_stubs.c)
+
 add_library(spoolss MODULE
     ${SOURCE}
+    ${PCH_SKIP_SOURCE}
     spoolss.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/spoolss_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/spoolss.def)
 
 set_module_type(spoolss win32dll UNICODE)
 target_link_libraries(spoolss wine)
 add_importlibs(spoolss advapi32 msvcrt kernel32 ntdll)
-add_pch(spoolss precomp.h SOURCE)
+add_pch(spoolss precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET spoolss DESTINATION reactos/system32 FOR all)
index 34c3026..b557db8 100644 (file)
@@ -11,7 +11,6 @@ list(APPEND SOURCE
     main.c
     monitors.c
     ports.c
-    precomp.h
     printerdata.c
     printerdrivers.c
     printers.c
@@ -20,15 +19,18 @@ list(APPEND SOURCE
     utils.c
     ${CMAKE_CURRENT_BINARY_DIR}/winspool_c.c)
 
+list(APPEND PCH_SKIP_SOURCE
+    ${CMAKE_CURRENT_BINARY_DIR}/winspool_stubs.c)
+
 add_library(winspool MODULE
     ${SOURCE}
+    ${PCH_SKIP_SOURCE}
     winspool.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/winspool_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/winspool.def)
 
 set_target_properties(winspool PROPERTIES SUFFIX ".drv")
 set_module_type(winspool win32dll UNICODE)
 target_link_libraries(winspool wine ${PSEH_LIB})
 add_importlibs(winspool advapi32 gdi32 rpcrt4 msvcrt kernel32 ntdll)
-add_pch(winspool precomp.h SOURCE)
+add_pch(winspool precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET winspool DESTINATION reactos/system32 FOR all)