https://git.reactos.org/?p=reactos.git;a=commitdiff;h=139a3d666159c22d505e1…
commit 139a3d666159c22d505e1da2bb3c19af7a95fe11
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sat May 9 22:37:40 2020 +0100
Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org>
CommitDate: Sat Jun 6 21:58:41 2020 +0300
[CMAKE] Implement PCH builds with target_precompile_headers. CORE-16905
---
CMakeLists.txt | 13 +++--
base/applications/winhlp32/CMakeLists.txt | 16 ++++--
base/services/dhcpcsvc/CMakeLists.txt | 10 ++--
base/services/svchost/CMakeLists.txt | 10 ++--
dll/cpl/desk/CMakeLists.txt | 10 ++--
dll/directx/wine/d3d8/CMakeLists.txt | 10 ++--
dll/directx/wine/d3d9/CMakeLists.txt | 10 ++--
dll/directx/wine/d3dcompiler_43/CMakeLists.txt | 16 +++---
dll/directx/wine/d3dx9_36/d3dx9.cmake | 12 +++--
dll/directx/wine/d3dxof/CMakeLists.txt | 10 ++--
dll/directx/wine/dxdiagn/CMakeLists.txt | 10 ++--
dll/directx/wine/msdmo/CMakeLists.txt | 10 ++--
dll/directx/wine/quartz/CMakeLists.txt | 12 +++--
dll/ntdll/CMakeLists.txt | 10 ++--
dll/opengl/glu32/CMakeLists.txt | 12 +++--
dll/shellext/netshell/CMakeLists.txt | 10 ++--
dll/shellext/shellbtrfs/CMakeLists.txt | 10 ++--
dll/win32/aclui/CMakeLists.txt | 10 ++--
dll/win32/advapi32/CMakeLists.txt | 16 +++---
dll/win32/avifil32/CMakeLists.txt | 14 +++---
dll/win32/browseui/CMakeLists.txt | 10 ++--
dll/win32/cabinet/CMakeLists.txt | 10 ++--
dll/win32/comctl32/CMakeLists.txt | 12 +++--
dll/win32/crypt32/CMakeLists.txt | 10 ++--
dll/win32/fmifs/CMakeLists.txt | 10 ++--
dll/win32/gdiplus/CMakeLists.txt | 13 ++---
dll/win32/hhctrl.ocx/CMakeLists.txt | 10 ++--
dll/win32/hlink/CMakeLists.txt | 10 ++--
dll/win32/imagehlp/CMakeLists.txt | 10 ++--
dll/win32/inetcomm/CMakeLists.txt | 12 +++--
dll/win32/inseng/CMakeLists.txt | 14 ++++--
dll/win32/itss/CMakeLists.txt | 12 +++--
dll/win32/jscript/CMakeLists.txt | 12 +++--
dll/win32/mapi32/CMakeLists.txt | 12 +++--
dll/win32/mscoree/CMakeLists.txt | 12 +++--
dll/win32/msgina/CMakeLists.txt | 17 +++----
dll/win32/mshtml/CMakeLists.txt | 12 +++--
dll/win32/msi/CMakeLists.txt | 16 +++---
dll/win32/msxml3/CMakeLists.txt | 18 ++++---
dll/win32/netapi32/CMakeLists.txt | 18 ++++---
dll/win32/ole32/CMakeLists.txt | 20 ++++----
dll/win32/oleacc/CMakeLists.txt | 16 +++---
dll/win32/oleaut32/CMakeLists.txt | 16 +++---
dll/win32/rpcrt4/CMakeLists.txt | 12 +++--
dll/win32/scrrun/CMakeLists.txt | 12 +++--
dll/win32/setupapi/CMakeLists.txt | 12 +++--
dll/win32/shell32/CMakeLists.txt | 23 ++++-----
dll/win32/shlwapi/CMakeLists.txt | 12 +++--
dll/win32/sti/CMakeLists.txt | 14 +++---
dll/win32/sxs/CMakeLists.txt | 12 +++--
dll/win32/urlmon/CMakeLists.txt | 14 +++---
dll/win32/userenv/CMakeLists.txt | 10 ++--
dll/win32/vbscript/CMakeLists.txt | 10 ++--
dll/win32/wbemdisp/CMakeLists.txt | 10 ++--
dll/win32/wbemprox/CMakeLists.txt | 12 +++--
dll/win32/windowscodecs/CMakeLists.txt | 15 +++---
dll/win32/wininet/CMakeLists.txt | 10 ++--
dll/win32/wldap32/CMakeLists.txt | 12 +++--
dll/win32/wshom.ocx/CMakeLists.txt | 10 ++--
drivers/bus/acpi/CMakeLists.txt | 15 +++---
drivers/bus/acpi/cmbatt/CMakeLists.txt | 10 ++--
drivers/bus/acpi/compbatt/CMakeLists.txt | 10 ++--
drivers/bus/pcix/CMakeLists.txt | 10 ++--
drivers/hid/hidclass/CMakeLists.txt | 10 ++--
drivers/input/kbdclass/CMakeLists.txt | 10 ++--
drivers/input/mouclass/CMakeLists.txt | 10 ++--
drivers/serial/serenum/CMakeLists.txt | 10 ++--
drivers/serial/serial/CMakeLists.txt | 10 ++--
drivers/storage/class/classpnp/CMakeLists.txt | 10 ++--
drivers/storage/port/storport/CMakeLists.txt | 10 ++--
drivers/usb/usbccgp/CMakeLists.txt | 10 ++--
drivers/usb/usbhub/CMakeLists.txt | 10 ++--
drivers/usb/usbport/CMakeLists.txt | 10 ++--
drivers/usb/usbstor/CMakeLists.txt | 10 ++--
drivers/wdm/audio/backpln/portcls/CMakeLists.txt | 10 ++--
drivers/wdm/audio/drivers/CMIDriver/CMakeLists.txt | 10 ++--
.../applications/explorer-old/CMakeLists.txt | 13 ++---
modules/rostests/apitests/advapi32/CMakeLists.txt | 13 +++--
modules/rostests/apitests/afd/CMakeLists.txt | 13 +++--
modules/rostests/apitests/atl/CMakeLists.txt | 10 ++--
modules/rostests/apitests/cmd/CMakeLists.txt | 5 +-
modules/rostests/apitests/com/CMakeLists.txt | 15 ++++--
modules/rostests/apitests/gdi32/CMakeLists.txt | 14 ++++--
modules/rostests/apitests/kernel32/CMakeLists.txt | 14 ++++--
modules/rostests/apitests/mountmgr/CMakeLists.txt | 14 ++++--
modules/rostests/apitests/ntdll/CMakeLists.txt | 14 ++++--
modules/rostests/apitests/shell32/CMakeLists.txt | 10 ++--
modules/rostests/apitests/user32/CMakeLists.txt | 14 ++++--
modules/rostests/apitests/win32nt/CMakeLists.txt | 9 ++--
modules/rostests/apitests/ws2_32/CMakeLists.txt | 13 +++--
modules/rostests/apitests/zipfldr/CMakeLists.txt | 11 +++--
modules/rostests/winetests/advapi32/CMakeLists.txt | 12 +++--
modules/rostests/winetests/comctl32/CMakeLists.txt | 14 +++---
modules/rostests/winetests/comdlg32/CMakeLists.txt | 10 ++--
modules/rostests/winetests/crypt32/CMakeLists.txt | 13 +++--
modules/rostests/winetests/dinput/CMakeLists.txt | 13 +++--
modules/rostests/winetests/dinput8/CMakeLists.txt | 16 ++++--
modules/rostests/winetests/dsound/CMakeLists.txt | 13 +++--
modules/rostests/winetests/gdi32/CMakeLists.txt | 10 ++--
modules/rostests/winetests/gdiplus/CMakeLists.txt | 12 +++--
modules/rostests/winetests/kernel32/CMakeLists.txt | 10 ++--
modules/rostests/winetests/mshtml/CMakeLists.txt | 12 +++--
modules/rostests/winetests/msi/CMakeLists.txt | 14 ++++--
modules/rostests/winetests/msvcrt/CMakeLists.txt | 12 +++--
modules/rostests/winetests/msxml3/CMakeLists.txt | 12 +++--
modules/rostests/winetests/ntdll/CMakeLists.txt | 12 +++--
modules/rostests/winetests/ole32/CMakeLists.txt | 13 +++--
modules/rostests/winetests/oleaut32/CMakeLists.txt | 15 ++++--
modules/rostests/winetests/shell32/CMakeLists.txt | 10 ++--
modules/rostests/winetests/shlwapi/CMakeLists.txt | 13 +++--
modules/rostests/winetests/user32/CMakeLists.txt | 10 ++--
.../winetests/windowscodecs/CMakeLists.txt | 12 +++--
ntoskrnl/CMakeLists.txt | 7 ++-
ntoskrnl/ntkrnlmp/CMakeLists.txt | 7 ++-
ntoskrnl/ntos.cmake | 1 -
sdk/cmake/CMakeMacros.cmake | 10 ++++
sdk/cmake/gcc.cmake | 35 -------------
sdk/cmake/msvc.cmake | 57 ----------------------
sdk/lib/3rdparty/libmpg123/CMakeLists.txt | 13 +++--
win32ss/drivers/font/ftfd/CMakeLists.txt | 10 ++--
win32ss/drivers/videoprt/CMakeLists.txt | 10 ++--
win32ss/printing/base/spoolss/CMakeLists.txt | 8 +--
win32ss/printing/base/winspool/CMakeLists.txt | 8 +--
123 files changed, 872 insertions(+), 642 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c3613211a66..d2c5fcf639b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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
diff --git a/base/applications/winhlp32/CMakeLists.txt
b/base/applications/winhlp32/CMakeLists.txt
index 0deaeafee5d..2e0b06bbd13 100644
--- a/base/applications/winhlp32/CMakeLists.txt
+++ b/base/applications/winhlp32/CMakeLists.txt
@@ -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)
diff --git a/base/services/dhcpcsvc/CMakeLists.txt
b/base/services/dhcpcsvc/CMakeLists.txt
index e559f15524e..604d21564b5 100644
--- a/base/services/dhcpcsvc/CMakeLists.txt
+++ b/base/services/dhcpcsvc/CMakeLists.txt
@@ -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)
diff --git a/base/services/svchost/CMakeLists.txt b/base/services/svchost/CMakeLists.txt
index ee6f64f6e06..9a9af07057f 100644
--- a/base/services/svchost/CMakeLists.txt
+++ b/base/services/svchost/CMakeLists.txt
@@ -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)
diff --git a/dll/cpl/desk/CMakeLists.txt b/dll/cpl/desk/CMakeLists.txt
index 597679bbf3b..b67c167873d 100644
--- a/dll/cpl/desk/CMakeLists.txt
+++ b/dll/cpl/desk/CMakeLists.txt
@@ -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)
diff --git a/dll/directx/wine/d3d8/CMakeLists.txt b/dll/directx/wine/d3d8/CMakeLists.txt
index 98a24bbc5e6..9160e2ada15 100644
--- a/dll/directx/wine/d3d8/CMakeLists.txt
+++ b/dll/directx/wine/d3d8/CMakeLists.txt
@@ -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)
diff --git a/dll/directx/wine/d3d9/CMakeLists.txt b/dll/directx/wine/d3d9/CMakeLists.txt
index 14dd3e65320..5c729add466 100644
--- a/dll/directx/wine/d3d9/CMakeLists.txt
+++ b/dll/directx/wine/d3d9/CMakeLists.txt
@@ -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)
diff --git a/dll/directx/wine/d3dcompiler_43/CMakeLists.txt
b/dll/directx/wine/d3dcompiler_43/CMakeLists.txt
index c651fb51b02..899b51ecb7e 100644
--- a/dll/directx/wine/d3dcompiler_43/CMakeLists.txt
+++ b/dll/directx/wine/d3dcompiler_43/CMakeLists.txt
@@ -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)
diff --git a/dll/directx/wine/d3dx9_36/d3dx9.cmake
b/dll/directx/wine/d3dx9_36/d3dx9.cmake
index 80fb5d807ab..5fcdb96d21c 100644
--- a/dll/directx/wine/d3dx9_36/d3dx9.cmake
+++ b/dll/directx/wine/d3dx9_36/d3dx9.cmake
@@ -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)
diff --git a/dll/directx/wine/d3dxof/CMakeLists.txt
b/dll/directx/wine/d3dxof/CMakeLists.txt
index 21b97cd6522..98fdae11965 100644
--- a/dll/directx/wine/d3dxof/CMakeLists.txt
+++ b/dll/directx/wine/d3dxof/CMakeLists.txt
@@ -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)
diff --git a/dll/directx/wine/dxdiagn/CMakeLists.txt
b/dll/directx/wine/dxdiagn/CMakeLists.txt
index 16fdc1f73a8..41adda026ee 100644
--- a/dll/directx/wine/dxdiagn/CMakeLists.txt
+++ b/dll/directx/wine/dxdiagn/CMakeLists.txt
@@ -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)
diff --git a/dll/directx/wine/msdmo/CMakeLists.txt
b/dll/directx/wine/msdmo/CMakeLists.txt
index d8d1d34bea0..03475b1d366 100644
--- a/dll/directx/wine/msdmo/CMakeLists.txt
+++ b/dll/directx/wine/msdmo/CMakeLists.txt
@@ -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)
diff --git a/dll/directx/wine/quartz/CMakeLists.txt
b/dll/directx/wine/quartz/CMakeLists.txt
index e0996b88a04..716edfd108c 100644
--- a/dll/directx/wine/quartz/CMakeLists.txt
+++ b/dll/directx/wine/quartz/CMakeLists.txt
@@ -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)
diff --git a/dll/ntdll/CMakeLists.txt b/dll/ntdll/CMakeLists.txt
index 5ea6ca5d3d3..6ad60fd8404 100644
--- a/dll/ntdll/CMakeLists.txt
+++ b/dll/ntdll/CMakeLists.txt
@@ -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)
diff --git a/dll/opengl/glu32/CMakeLists.txt b/dll/opengl/glu32/CMakeLists.txt
index b0caa74fabf..b2e6de97f2f 100644
--- a/dll/opengl/glu32/CMakeLists.txt
+++ b/dll/opengl/glu32/CMakeLists.txt
@@ -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)
diff --git a/dll/shellext/netshell/CMakeLists.txt b/dll/shellext/netshell/CMakeLists.txt
index dc4a260045a..2ed317395d0 100644
--- a/dll/shellext/netshell/CMakeLists.txt
+++ b/dll/shellext/netshell/CMakeLists.txt
@@ -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)
diff --git a/dll/shellext/shellbtrfs/CMakeLists.txt
b/dll/shellext/shellbtrfs/CMakeLists.txt
index 7022dc05a56..c8fdc857001 100644
--- a/dll/shellext/shellbtrfs/CMakeLists.txt
+++ b/dll/shellext/shellbtrfs/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/aclui/CMakeLists.txt b/dll/win32/aclui/CMakeLists.txt
index 24d43d5ad23..b7def507315 100644
--- a/dll/win32/aclui/CMakeLists.txt
+++ b/dll/win32/aclui/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/advapi32/CMakeLists.txt b/dll/win32/advapi32/CMakeLists.txt
index 4a366badecf..3e0d816d72e 100644
--- a/dll/win32/advapi32/CMakeLists.txt
+++ b/dll/win32/advapi32/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/avifil32/CMakeLists.txt b/dll/win32/avifil32/CMakeLists.txt
index 62daabfaea1..c1a9e84bc97 100644
--- a/dll/win32/avifil32/CMakeLists.txt
+++ b/dll/win32/avifil32/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/browseui/CMakeLists.txt b/dll/win32/browseui/CMakeLists.txt
index 562693288de..5c136cd02cb 100644
--- a/dll/win32/browseui/CMakeLists.txt
+++ b/dll/win32/browseui/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/cabinet/CMakeLists.txt b/dll/win32/cabinet/CMakeLists.txt
index f770a5052fb..042d0aa1842 100644
--- a/dll/win32/cabinet/CMakeLists.txt
+++ b/dll/win32/cabinet/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/comctl32/CMakeLists.txt b/dll/win32/comctl32/CMakeLists.txt
index b47f7646bee..d60f18a1696 100644
--- a/dll/win32/comctl32/CMakeLists.txt
+++ b/dll/win32/comctl32/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/crypt32/CMakeLists.txt b/dll/win32/crypt32/CMakeLists.txt
index 5c2a93cb9cc..b9ccf7b85dc 100644
--- a/dll/win32/crypt32/CMakeLists.txt
+++ b/dll/win32/crypt32/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/fmifs/CMakeLists.txt b/dll/win32/fmifs/CMakeLists.txt
index 41cac2847a0..9a756219947 100644
--- a/dll/win32/fmifs/CMakeLists.txt
+++ b/dll/win32/fmifs/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/gdiplus/CMakeLists.txt b/dll/win32/gdiplus/CMakeLists.txt
index 11fe7ee2eed..a3ea0e30437 100644
--- a/dll/win32/gdiplus/CMakeLists.txt
+++ b/dll/win32/gdiplus/CMakeLists.txt
@@ -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)
-
diff --git a/dll/win32/hhctrl.ocx/CMakeLists.txt b/dll/win32/hhctrl.ocx/CMakeLists.txt
index 103e58e97f5..32b6f023dc8 100644
--- a/dll/win32/hhctrl.ocx/CMakeLists.txt
+++ b/dll/win32/hhctrl.ocx/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/hlink/CMakeLists.txt b/dll/win32/hlink/CMakeLists.txt
index 29ae5f99da6..86e5e1a11bb 100644
--- a/dll/win32/hlink/CMakeLists.txt
+++ b/dll/win32/hlink/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/imagehlp/CMakeLists.txt b/dll/win32/imagehlp/CMakeLists.txt
index d39f1b45bee..717ebf7b504 100644
--- a/dll/win32/imagehlp/CMakeLists.txt
+++ b/dll/win32/imagehlp/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/inetcomm/CMakeLists.txt b/dll/win32/inetcomm/CMakeLists.txt
index 3e60b9922a7..90ff8513cdc 100644
--- a/dll/win32/inetcomm/CMakeLists.txt
+++ b/dll/win32/inetcomm/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/inseng/CMakeLists.txt b/dll/win32/inseng/CMakeLists.txt
index 1ee71e5ffb8..af11eeaffd1 100644
--- a/dll/win32/inseng/CMakeLists.txt
+++ b/dll/win32/inseng/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/itss/CMakeLists.txt b/dll/win32/itss/CMakeLists.txt
index 92a01fe9b32..eb2f50c1631 100644
--- a/dll/win32/itss/CMakeLists.txt
+++ b/dll/win32/itss/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/jscript/CMakeLists.txt b/dll/win32/jscript/CMakeLists.txt
index b6f5c42be10..39f50011c05 100644
--- a/dll/win32/jscript/CMakeLists.txt
+++ b/dll/win32/jscript/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/mapi32/CMakeLists.txt b/dll/win32/mapi32/CMakeLists.txt
index 18da64dfec5..35ba1de4594 100644
--- a/dll/win32/mapi32/CMakeLists.txt
+++ b/dll/win32/mapi32/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/mscoree/CMakeLists.txt b/dll/win32/mscoree/CMakeLists.txt
index 8cba9456648..2671d7a79e3 100644
--- a/dll/win32/mscoree/CMakeLists.txt
+++ b/dll/win32/mscoree/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/msgina/CMakeLists.txt b/dll/win32/msgina/CMakeLists.txt
index ca47e6c1d04..5f3fa9ece15 100644
--- a/dll/win32/msgina/CMakeLists.txt
+++ b/dll/win32/msgina/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/mshtml/CMakeLists.txt b/dll/win32/mshtml/CMakeLists.txt
index 05ad532c9fb..a225f25d64f 100644
--- a/dll/win32/mshtml/CMakeLists.txt
+++ b/dll/win32/mshtml/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/msi/CMakeLists.txt b/dll/win32/msi/CMakeLists.txt
index 10306ca814a..106f6817851 100644
--- a/dll/win32/msi/CMakeLists.txt
+++ b/dll/win32/msi/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/msxml3/CMakeLists.txt b/dll/win32/msxml3/CMakeLists.txt
index 3cb5997af3b..b11bdf3f8ed 100644
--- a/dll/win32/msxml3/CMakeLists.txt
+++ b/dll/win32/msxml3/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/netapi32/CMakeLists.txt b/dll/win32/netapi32/CMakeLists.txt
index 046e372b6a4..bbc27a4b6e2 100644
--- a/dll/win32/netapi32/CMakeLists.txt
+++ b/dll/win32/netapi32/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/ole32/CMakeLists.txt b/dll/win32/ole32/CMakeLists.txt
index 6ef97f4402b..61310a2b6ce 100644
--- a/dll/win32/ole32/CMakeLists.txt
+++ b/dll/win32/ole32/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/oleacc/CMakeLists.txt b/dll/win32/oleacc/CMakeLists.txt
index bea28fa0476..5d58a0be264 100644
--- a/dll/win32/oleacc/CMakeLists.txt
+++ b/dll/win32/oleacc/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/oleaut32/CMakeLists.txt b/dll/win32/oleaut32/CMakeLists.txt
index 6a1523077ba..44bdb0a9871 100644
--- a/dll/win32/oleaut32/CMakeLists.txt
+++ b/dll/win32/oleaut32/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/rpcrt4/CMakeLists.txt b/dll/win32/rpcrt4/CMakeLists.txt
index a3d68266de8..c1f8de9f68f 100644
--- a/dll/win32/rpcrt4/CMakeLists.txt
+++ b/dll/win32/rpcrt4/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/scrrun/CMakeLists.txt b/dll/win32/scrrun/CMakeLists.txt
index 7dbc453faa8..ae3dd1785ff 100644
--- a/dll/win32/scrrun/CMakeLists.txt
+++ b/dll/win32/scrrun/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/setupapi/CMakeLists.txt b/dll/win32/setupapi/CMakeLists.txt
index 964614012b3..cd9feba4033 100644
--- a/dll/win32/setupapi/CMakeLists.txt
+++ b/dll/win32/setupapi/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/shell32/CMakeLists.txt b/dll/win32/shell32/CMakeLists.txt
index 1bd52656112..e0a84c9fe8e 100644
--- a/dll/win32/shell32/CMakeLists.txt
+++ b/dll/win32/shell32/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/shlwapi/CMakeLists.txt b/dll/win32/shlwapi/CMakeLists.txt
index 78fe1d19bf8..472eceb2014 100644
--- a/dll/win32/shlwapi/CMakeLists.txt
+++ b/dll/win32/shlwapi/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/sti/CMakeLists.txt b/dll/win32/sti/CMakeLists.txt
index e751fda2af0..2b5f49b96f7 100644
--- a/dll/win32/sti/CMakeLists.txt
+++ b/dll/win32/sti/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/sxs/CMakeLists.txt b/dll/win32/sxs/CMakeLists.txt
index 5df97444659..6ed421e4384 100644
--- a/dll/win32/sxs/CMakeLists.txt
+++ b/dll/win32/sxs/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/urlmon/CMakeLists.txt b/dll/win32/urlmon/CMakeLists.txt
index 4021d1e1b6b..7608fd94362 100644
--- a/dll/win32/urlmon/CMakeLists.txt
+++ b/dll/win32/urlmon/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/userenv/CMakeLists.txt b/dll/win32/userenv/CMakeLists.txt
index d30c2438a24..28b272697b5 100644
--- a/dll/win32/userenv/CMakeLists.txt
+++ b/dll/win32/userenv/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/vbscript/CMakeLists.txt b/dll/win32/vbscript/CMakeLists.txt
index 63b97198d87..82b70c2a030 100644
--- a/dll/win32/vbscript/CMakeLists.txt
+++ b/dll/win32/vbscript/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/wbemdisp/CMakeLists.txt b/dll/win32/wbemdisp/CMakeLists.txt
index 974446545d3..9ce0d0f1f9e 100644
--- a/dll/win32/wbemdisp/CMakeLists.txt
+++ b/dll/win32/wbemdisp/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/wbemprox/CMakeLists.txt b/dll/win32/wbemprox/CMakeLists.txt
index 5d477dfe45d..de69823069f 100644
--- a/dll/win32/wbemprox/CMakeLists.txt
+++ b/dll/win32/wbemprox/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/windowscodecs/CMakeLists.txt
b/dll/win32/windowscodecs/CMakeLists.txt
index e17a657c213..ff726c88162 100644
--- a/dll/win32/windowscodecs/CMakeLists.txt
+++ b/dll/win32/windowscodecs/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/wininet/CMakeLists.txt b/dll/win32/wininet/CMakeLists.txt
index 3389140c1d2..ef7693f3c7a 100644
--- a/dll/win32/wininet/CMakeLists.txt
+++ b/dll/win32/wininet/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/wldap32/CMakeLists.txt b/dll/win32/wldap32/CMakeLists.txt
index b0b0b21f594..4a94f6bc3c9 100644
--- a/dll/win32/wldap32/CMakeLists.txt
+++ b/dll/win32/wldap32/CMakeLists.txt
@@ -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)
diff --git a/dll/win32/wshom.ocx/CMakeLists.txt b/dll/win32/wshom.ocx/CMakeLists.txt
index 27c99b2fc12..c790331ac22 100644
--- a/dll/win32/wshom.ocx/CMakeLists.txt
+++ b/dll/win32/wshom.ocx/CMakeLists.txt
@@ -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)
diff --git a/drivers/bus/acpi/CMakeLists.txt b/drivers/bus/acpi/CMakeLists.txt
index 69d26a13a47..f7a3a19bf39 100644
--- a/drivers/bus/acpi/CMakeLists.txt
+++ b/drivers/bus/acpi/CMakeLists.txt
@@ -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)
diff --git a/drivers/bus/acpi/cmbatt/CMakeLists.txt
b/drivers/bus/acpi/cmbatt/CMakeLists.txt
index 63753425c81..e43ea204cfe 100644
--- a/drivers/bus/acpi/cmbatt/CMakeLists.txt
+++ b/drivers/bus/acpi/cmbatt/CMakeLists.txt
@@ -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)
diff --git a/drivers/bus/acpi/compbatt/CMakeLists.txt
b/drivers/bus/acpi/compbatt/CMakeLists.txt
index 65743fce00c..b2e43d76808 100644
--- a/drivers/bus/acpi/compbatt/CMakeLists.txt
+++ b/drivers/bus/acpi/compbatt/CMakeLists.txt
@@ -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)
diff --git a/drivers/bus/pcix/CMakeLists.txt b/drivers/bus/pcix/CMakeLists.txt
index cdbcf5f8514..4a27ae9c084 100644
--- a/drivers/bus/pcix/CMakeLists.txt
+++ b/drivers/bus/pcix/CMakeLists.txt
@@ -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)
diff --git a/drivers/hid/hidclass/CMakeLists.txt b/drivers/hid/hidclass/CMakeLists.txt
index f81954eca00..8ee1e815468 100644
--- a/drivers/hid/hidclass/CMakeLists.txt
+++ b/drivers/hid/hidclass/CMakeLists.txt
@@ -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)
diff --git a/drivers/input/kbdclass/CMakeLists.txt
b/drivers/input/kbdclass/CMakeLists.txt
index fc3169d4360..9daa772855f 100644
--- a/drivers/input/kbdclass/CMakeLists.txt
+++ b/drivers/input/kbdclass/CMakeLists.txt
@@ -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)
diff --git a/drivers/input/mouclass/CMakeLists.txt
b/drivers/input/mouclass/CMakeLists.txt
index 9a060d1cae4..42b9f791c6c 100644
--- a/drivers/input/mouclass/CMakeLists.txt
+++ b/drivers/input/mouclass/CMakeLists.txt
@@ -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)
diff --git a/drivers/serial/serenum/CMakeLists.txt
b/drivers/serial/serenum/CMakeLists.txt
index 4cef8e49ba2..925ad744f49 100644
--- a/drivers/serial/serenum/CMakeLists.txt
+++ b/drivers/serial/serenum/CMakeLists.txt
@@ -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)
diff --git a/drivers/serial/serial/CMakeLists.txt b/drivers/serial/serial/CMakeLists.txt
index 257ad8469fe..49ad43419cc 100644
--- a/drivers/serial/serial/CMakeLists.txt
+++ b/drivers/serial/serial/CMakeLists.txt
@@ -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)
diff --git a/drivers/storage/class/classpnp/CMakeLists.txt
b/drivers/storage/class/classpnp/CMakeLists.txt
index d3399c72668..fa30edc9678 100644
--- a/drivers/storage/class/classpnp/CMakeLists.txt
+++ b/drivers/storage/class/classpnp/CMakeLists.txt
@@ -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)
diff --git a/drivers/storage/port/storport/CMakeLists.txt
b/drivers/storage/port/storport/CMakeLists.txt
index 7931a526de9..67a35dc52b8 100644
--- a/drivers/storage/port/storport/CMakeLists.txt
+++ b/drivers/storage/port/storport/CMakeLists.txt
@@ -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)
diff --git a/drivers/usb/usbccgp/CMakeLists.txt b/drivers/usb/usbccgp/CMakeLists.txt
index 30e2089e957..2c9319f3416 100644
--- a/drivers/usb/usbccgp/CMakeLists.txt
+++ b/drivers/usb/usbccgp/CMakeLists.txt
@@ -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)
diff --git a/drivers/usb/usbhub/CMakeLists.txt b/drivers/usb/usbhub/CMakeLists.txt
index 35b109e19d5..7d007181d3d 100644
--- a/drivers/usb/usbhub/CMakeLists.txt
+++ b/drivers/usb/usbhub/CMakeLists.txt
@@ -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)
diff --git a/drivers/usb/usbport/CMakeLists.txt b/drivers/usb/usbport/CMakeLists.txt
index 4598381a191..8af14de04b5 100644
--- a/drivers/usb/usbport/CMakeLists.txt
+++ b/drivers/usb/usbport/CMakeLists.txt
@@ -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)
diff --git a/drivers/usb/usbstor/CMakeLists.txt b/drivers/usb/usbstor/CMakeLists.txt
index 567ee54dd14..eaaee54a62f 100644
--- a/drivers/usb/usbstor/CMakeLists.txt
+++ b/drivers/usb/usbstor/CMakeLists.txt
@@ -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)
diff --git a/drivers/wdm/audio/backpln/portcls/CMakeLists.txt
b/drivers/wdm/audio/backpln/portcls/CMakeLists.txt
index 60742e4626b..294b48c9f8c 100644
--- a/drivers/wdm/audio/backpln/portcls/CMakeLists.txt
+++ b/drivers/wdm/audio/backpln/portcls/CMakeLists.txt
@@ -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)
diff --git a/drivers/wdm/audio/drivers/CMIDriver/CMakeLists.txt
b/drivers/wdm/audio/drivers/CMIDriver/CMakeLists.txt
index 29202ba0933..ba6cd3f9c4c 100644
--- a/drivers/wdm/audio/drivers/CMIDriver/CMakeLists.txt
+++ b/drivers/wdm/audio/drivers/CMIDriver/CMakeLists.txt
@@ -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")
diff --git a/modules/rosapps/applications/explorer-old/CMakeLists.txt
b/modules/rosapps/applications/explorer-old/CMakeLists.txt
index 2123f18549e..ca824c486f2 100644
--- a/modules/rosapps/applications/explorer-old/CMakeLists.txt
+++ b/modules/rosapps/applications/explorer-old/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/apitests/advapi32/CMakeLists.txt
b/modules/rostests/apitests/advapi32/CMakeLists.txt
index 8d7e56084c1..c5bccc3b0d0 100644
--- a/modules/rostests/apitests/advapi32/CMakeLists.txt
+++ b/modules/rostests/apitests/advapi32/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/apitests/afd/CMakeLists.txt
b/modules/rostests/apitests/afd/CMakeLists.txt
index d4b30b254c8..834f8e050cd 100644
--- a/modules/rostests/apitests/afd/CMakeLists.txt
+++ b/modules/rostests/apitests/afd/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/apitests/atl/CMakeLists.txt
b/modules/rostests/apitests/atl/CMakeLists.txt
index b3e12092ece..c0c3781defd 100644
--- a/modules/rostests/apitests/atl/CMakeLists.txt
+++ b/modules/rostests/apitests/atl/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/apitests/cmd/CMakeLists.txt
b/modules/rostests/apitests/cmd/CMakeLists.txt
index 5eae6ccdee6..00202dde809 100644
--- a/modules/rostests/apitests/cmd/CMakeLists.txt
+++ b/modules/rostests/apitests/cmd/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/apitests/com/CMakeLists.txt
b/modules/rostests/apitests/com/CMakeLists.txt
index 73f0000b2cd..865e71c3c16 100644
--- a/modules/rostests/apitests/com/CMakeLists.txt
+++ b/modules/rostests/apitests/com/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/apitests/gdi32/CMakeLists.txt
b/modules/rostests/apitests/gdi32/CMakeLists.txt
index caa05d9a116..432e7e719f0 100644
--- a/modules/rostests/apitests/gdi32/CMakeLists.txt
+++ b/modules/rostests/apitests/gdi32/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/apitests/kernel32/CMakeLists.txt
b/modules/rostests/apitests/kernel32/CMakeLists.txt
index 52fcde5ed6d..9e0ca36563a 100644
--- a/modules/rostests/apitests/kernel32/CMakeLists.txt
+++ b/modules/rostests/apitests/kernel32/CMakeLists.txt
@@ -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
diff --git a/modules/rostests/apitests/mountmgr/CMakeLists.txt
b/modules/rostests/apitests/mountmgr/CMakeLists.txt
index 73317c628b6..4c499c26a98 100644
--- a/modules/rostests/apitests/mountmgr/CMakeLists.txt
+++ b/modules/rostests/apitests/mountmgr/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/apitests/ntdll/CMakeLists.txt
b/modules/rostests/apitests/ntdll/CMakeLists.txt
index a8a314ae62f..c92fa973588 100644
--- a/modules/rostests/apitests/ntdll/CMakeLists.txt
+++ b/modules/rostests/apitests/ntdll/CMakeLists.txt
@@ -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")
diff --git a/modules/rostests/apitests/shell32/CMakeLists.txt
b/modules/rostests/apitests/shell32/CMakeLists.txt
index 9bff4a9c09a..9f8cee6a20d 100644
--- a/modules/rostests/apitests/shell32/CMakeLists.txt
+++ b/modules/rostests/apitests/shell32/CMakeLists.txt
@@ -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
diff --git a/modules/rostests/apitests/user32/CMakeLists.txt
b/modules/rostests/apitests/user32/CMakeLists.txt
index 3d632d0924d..896023291c8 100644
--- a/modules/rostests/apitests/user32/CMakeLists.txt
+++ b/modules/rostests/apitests/user32/CMakeLists.txt
@@ -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")
diff --git a/modules/rostests/apitests/win32nt/CMakeLists.txt
b/modules/rostests/apitests/win32nt/CMakeLists.txt
index 35cd83eea1f..22db4f5cb7a 100644
--- a/modules/rostests/apitests/win32nt/CMakeLists.txt
+++ b/modules/rostests/apitests/win32nt/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/apitests/ws2_32/CMakeLists.txt
b/modules/rostests/apitests/ws2_32/CMakeLists.txt
index d9ad4135c4a..088d7c632db 100644
--- a/modules/rostests/apitests/ws2_32/CMakeLists.txt
+++ b/modules/rostests/apitests/ws2_32/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/apitests/zipfldr/CMakeLists.txt
b/modules/rostests/apitests/zipfldr/CMakeLists.txt
index a53bbfd1bfd..63da6889d71 100644
--- a/modules/rostests/apitests/zipfldr/CMakeLists.txt
+++ b/modules/rostests/apitests/zipfldr/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/advapi32/CMakeLists.txt
b/modules/rostests/winetests/advapi32/CMakeLists.txt
index 5df0f3bf3f1..34a3055167b 100644
--- a/modules/rostests/winetests/advapi32/CMakeLists.txt
+++ b/modules/rostests/winetests/advapi32/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/comctl32/CMakeLists.txt
b/modules/rostests/winetests/comctl32/CMakeLists.txt
index 42d37d7b02c..ddc4caf0dc9 100644
--- a/modules/rostests/winetests/comctl32/CMakeLists.txt
+++ b/modules/rostests/winetests/comctl32/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/comdlg32/CMakeLists.txt
b/modules/rostests/winetests/comdlg32/CMakeLists.txt
index 11afc77f499..05862e1588c 100644
--- a/modules/rostests/winetests/comdlg32/CMakeLists.txt
+++ b/modules/rostests/winetests/comdlg32/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/crypt32/CMakeLists.txt
b/modules/rostests/winetests/crypt32/CMakeLists.txt
index 169694b28d8..28c8b1f9fbc 100644
--- a/modules/rostests/winetests/crypt32/CMakeLists.txt
+++ b/modules/rostests/winetests/crypt32/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/dinput/CMakeLists.txt
b/modules/rostests/winetests/dinput/CMakeLists.txt
index 58bec04925c..c87ab98318e 100644
--- a/modules/rostests/winetests/dinput/CMakeLists.txt
+++ b/modules/rostests/winetests/dinput/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/dinput8/CMakeLists.txt
b/modules/rostests/winetests/dinput8/CMakeLists.txt
index f1a3ad52997..b28d0f5280b 100644
--- a/modules/rostests/winetests/dinput8/CMakeLists.txt
+++ b/modules/rostests/winetests/dinput8/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/dsound/CMakeLists.txt
b/modules/rostests/winetests/dsound/CMakeLists.txt
index 2edf6f2376b..d90487ac0e3 100644
--- a/modules/rostests/winetests/dsound/CMakeLists.txt
+++ b/modules/rostests/winetests/dsound/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/gdi32/CMakeLists.txt
b/modules/rostests/winetests/gdi32/CMakeLists.txt
index b9a497434d2..89317137c9f 100644
--- a/modules/rostests/winetests/gdi32/CMakeLists.txt
+++ b/modules/rostests/winetests/gdi32/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/gdiplus/CMakeLists.txt
b/modules/rostests/winetests/gdiplus/CMakeLists.txt
index 151f56629fb..73a04034472 100644
--- a/modules/rostests/winetests/gdiplus/CMakeLists.txt
+++ b/modules/rostests/winetests/gdiplus/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/kernel32/CMakeLists.txt
b/modules/rostests/winetests/kernel32/CMakeLists.txt
index 1194e45989b..f61fe3cd9fb 100644
--- a/modules/rostests/winetests/kernel32/CMakeLists.txt
+++ b/modules/rostests/winetests/kernel32/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/mshtml/CMakeLists.txt
b/modules/rostests/winetests/mshtml/CMakeLists.txt
index f744975c2f7..3c4646c4d4f 100644
--- a/modules/rostests/winetests/mshtml/CMakeLists.txt
+++ b/modules/rostests/winetests/mshtml/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/msi/CMakeLists.txt
b/modules/rostests/winetests/msi/CMakeLists.txt
index 57bb6f310a3..279ed0b5e08 100644
--- a/modules/rostests/winetests/msi/CMakeLists.txt
+++ b/modules/rostests/winetests/msi/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/msvcrt/CMakeLists.txt
b/modules/rostests/winetests/msvcrt/CMakeLists.txt
index 90866735d1b..05a4cc555d9 100644
--- a/modules/rostests/winetests/msvcrt/CMakeLists.txt
+++ b/modules/rostests/winetests/msvcrt/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/msxml3/CMakeLists.txt
b/modules/rostests/winetests/msxml3/CMakeLists.txt
index 84c0d46c5e0..d7b0154f32f 100644
--- a/modules/rostests/winetests/msxml3/CMakeLists.txt
+++ b/modules/rostests/winetests/msxml3/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/ntdll/CMakeLists.txt
b/modules/rostests/winetests/ntdll/CMakeLists.txt
index 2262afe975d..21b6b7bdc97 100644
--- a/modules/rostests/winetests/ntdll/CMakeLists.txt
+++ b/modules/rostests/winetests/ntdll/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/ole32/CMakeLists.txt
b/modules/rostests/winetests/ole32/CMakeLists.txt
index 0cb4ec33123..0b54eae962e 100644
--- a/modules/rostests/winetests/ole32/CMakeLists.txt
+++ b/modules/rostests/winetests/ole32/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/oleaut32/CMakeLists.txt
b/modules/rostests/winetests/oleaut32/CMakeLists.txt
index 8605c4189d7..9351c512735 100644
--- a/modules/rostests/winetests/oleaut32/CMakeLists.txt
+++ b/modules/rostests/winetests/oleaut32/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/shell32/CMakeLists.txt
b/modules/rostests/winetests/shell32/CMakeLists.txt
index 429f1bf3323..16b70d40abe 100644
--- a/modules/rostests/winetests/shell32/CMakeLists.txt
+++ b/modules/rostests/winetests/shell32/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/shlwapi/CMakeLists.txt
b/modules/rostests/winetests/shlwapi/CMakeLists.txt
index 276e202d6f1..7676251d4e7 100644
--- a/modules/rostests/winetests/shlwapi/CMakeLists.txt
+++ b/modules/rostests/winetests/shlwapi/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/user32/CMakeLists.txt
b/modules/rostests/winetests/user32/CMakeLists.txt
index 4bd525338c4..331418d21a3 100644
--- a/modules/rostests/winetests/user32/CMakeLists.txt
+++ b/modules/rostests/winetests/user32/CMakeLists.txt
@@ -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)
diff --git a/modules/rostests/winetests/windowscodecs/CMakeLists.txt
b/modules/rostests/winetests/windowscodecs/CMakeLists.txt
index 6bae33b8912..418181b1b23 100644
--- a/modules/rostests/winetests/windowscodecs/CMakeLists.txt
+++ b/modules/rostests/winetests/windowscodecs/CMakeLists.txt
@@ -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)
diff --git a/ntoskrnl/CMakeLists.txt b/ntoskrnl/CMakeLists.txt
index 9a003de5788..57a387ffa23 100644
--- a/ntoskrnl/CMakeLists.txt
+++ b/ntoskrnl/CMakeLists.txt
@@ -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)
diff --git a/ntoskrnl/ntkrnlmp/CMakeLists.txt b/ntoskrnl/ntkrnlmp/CMakeLists.txt
index 0c6e0a8edc3..7f8ff100556 100644
--- a/ntoskrnl/ntkrnlmp/CMakeLists.txt
+++ b/ntoskrnl/ntkrnlmp/CMakeLists.txt
@@ -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)
diff --git a/ntoskrnl/ntos.cmake b/ntoskrnl/ntos.cmake
index 7cc68d8ac06..b2224bed4c7 100644
--- a/ntoskrnl/ntos.cmake
+++ b/ntoskrnl/ntos.cmake
@@ -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
diff --git a/sdk/cmake/CMakeMacros.cmake b/sdk/cmake/CMakeMacros.cmake
index 51ec82d904e..a9216ee5576 100644
--- a/sdk/cmake/CMakeMacros.cmake
+++ b/sdk/cmake/CMakeMacros.cmake
@@ -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()
diff --git a/sdk/cmake/gcc.cmake b/sdk/cmake/gcc.cmake
index fa04065b851..b48803c7529 100644
--- a/sdk/cmake/gcc.cmake
+++ b/sdk/cmake/gcc.cmake
@@ -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)
diff --git a/sdk/cmake/msvc.cmake b/sdk/cmake/msvc.cmake
index 4e4e0478d59..4bfa2f81952 100644
--- a/sdk/cmake/msvc.cmake
+++ b/sdk/cmake/msvc.cmake
@@ -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")
diff --git a/sdk/lib/3rdparty/libmpg123/CMakeLists.txt
b/sdk/lib/3rdparty/libmpg123/CMakeLists.txt
index 867e9286910..e14a3dfa2f3 100644
--- a/sdk/lib/3rdparty/libmpg123/CMakeLists.txt
+++ b/sdk/lib/3rdparty/libmpg123/CMakeLists.txt
@@ -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}")
diff --git a/win32ss/drivers/font/ftfd/CMakeLists.txt
b/win32ss/drivers/font/ftfd/CMakeLists.txt
index 2a5c1959e1e..442dad57d69 100644
--- a/win32ss/drivers/font/ftfd/CMakeLists.txt
+++ b/win32ss/drivers/font/ftfd/CMakeLists.txt
@@ -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)
diff --git a/win32ss/drivers/videoprt/CMakeLists.txt
b/win32ss/drivers/videoprt/CMakeLists.txt
index be116547d59..6f652c9ccff 100644
--- a/win32ss/drivers/videoprt/CMakeLists.txt
+++ b/win32ss/drivers/videoprt/CMakeLists.txt
@@ -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)
diff --git a/win32ss/printing/base/spoolss/CMakeLists.txt
b/win32ss/printing/base/spoolss/CMakeLists.txt
index 47084f6d588..e6c02eab86d 100644
--- a/win32ss/printing/base/spoolss/CMakeLists.txt
+++ b/win32ss/printing/base/spoolss/CMakeLists.txt
@@ -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)
diff --git a/win32ss/printing/base/winspool/CMakeLists.txt
b/win32ss/printing/base/winspool/CMakeLists.txt
index 34c30263522..b557db8d0df 100644
--- a/win32ss/printing/base/winspool/CMakeLists.txt
+++ b/win32ss/printing/base/winspool/CMakeLists.txt
@@ -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)