[CMAKE] Implement PCH builds with target_precompile_headers. CORE-16905
[reactos.git] / modules / rostests / apitests / afd / CMakeLists.txt
index d4b30b2..834f8e0 100644 (file)
@@ -5,12 +5,17 @@ include_directories(
 list(APPEND SOURCE
     AfdHelpers.c
     send.c
-    windowsize.c
-    precomp.h)
+    windowsize.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    testlist.c)
+
+add_executable(afd_apitest
+    ${SOURCE}
+    ${PCH_SKIP_SOURCE})
 
-add_executable(afd_apitest ${SOURCE} testlist.c)
 target_link_libraries(afd_apitest wine)
 set_module_type(afd_apitest win32cui)
 add_importlibs(afd_apitest ws2_32 msvcrt kernel32 ntdll)
-add_pch(afd_apitest precomp.h SOURCE)
+add_pch(afd_apitest precomp.h "${PCH_SKIP_SOURCE}")
 add_rostests_file(TARGET afd_apitest)