[MPR_WINETEST] Sync with Wine Staging 2.9. CORE-13362
[reactos.git] / rostests / kmtests / CMakeLists.txt
1
2 include_directories(include)
3
4 #
5 # subdirectories containing special-purpose drivers
6 #
7 add_subdirectory(example)
8 add_subdirectory(kernel32)
9 add_subdirectory(ntos_cc)
10 add_subdirectory(ntos_io)
11 add_subdirectory(ntos_mm)
12 add_subdirectory(ntos_po)
13 add_subdirectory(tcpip)
14
15 list(APPEND COMMON_SOURCE
16 example/GuardedMemory.c
17 rtl/RtlAvlTree.c
18 rtl/RtlException.c
19 rtl/RtlIntSafe.c
20 rtl/RtlMemory.c
21 rtl/RtlRegistry.c
22 rtl/RtlSplayTree.c
23 rtl/RtlStack.c
24 rtl/RtlUnicodeString.c)
25
26 #
27 # kmtest_drv.sys driver
28 #
29 list(APPEND KMTEST_DRV_SOURCE
30 kmtest_drv/guid.c
31 kmtest_drv/kmtest_drv.c
32 kmtest_drv/testlist.c
33
34 example/Example.c
35 example/KernelType.c
36 npfs/NpfsConnect.c
37 npfs/NpfsCreate.c
38 npfs/NpfsFileInfo.c
39 npfs/NpfsHelpers.c
40 npfs/NpfsReadWrite.c
41 npfs/NpfsVolumeInfo.c
42 novp_fsrtl/FsRtlRemoveDotsFromPath.c
43 ntos_cm/CmSecurity.c
44 ntos_ex/ExCallback.c
45 ntos_ex/ExDoubleList.c
46 ntos_ex/ExFastMutex.c
47 ntos_ex/ExHardError.c
48 ntos_ex/ExInterlocked.c
49 ntos_ex/ExPools.c
50 ntos_ex/ExResource.c
51 ntos_ex/ExSequencedList.c
52 ntos_ex/ExSingleList.c
53 ntos_ex/ExTimer.c
54 ntos_fsrtl/FsRtlDissect.c
55 ntos_fsrtl/FsRtlExpression.c
56 ntos_fsrtl/FsRtlLegal.c
57 ntos_fsrtl/FsRtlMcb.c
58 ntos_fsrtl/FsRtlTunnel.c
59 ntos_io/IoCreateFile.c
60 ntos_io/IoDeviceInterface.c
61 ntos_io/IoEvent.c
62 ntos_io/IoFilesystem.c
63 ntos_io/IoInterrupt.c
64 ntos_io/IoIrp.c
65 ntos_io/IoMdl.c
66 ntos_ke/KeApc.c
67 ntos_ke/KeDevQueue.c
68 ntos_ke/KeDpc.c
69 ntos_ke/KeEvent.c
70 ntos_ke/KeGuardedMutex.c
71 ntos_ke/KeIrql.c
72 ntos_ke/KeMutex.c
73 ntos_ke/KeProcessor.c
74 ntos_ke/KeSpinLock.c
75 ntos_ke/KeTimer.c
76 ntos_mm/MmMdl.c
77 ntos_mm/MmReservedMapping.c
78 ntos_mm/MmSection.c
79 ntos_mm/ZwAllocateVirtualMemory.c
80 ntos_mm/ZwCreateSection.c
81 ntos_mm/ZwMapViewOfSection.c
82 ntos_ob/ObHandle.c
83 ntos_ob/ObReference.c
84 ntos_ob/ObSecurity.c
85 ntos_ob/ObSymbolicLink.c
86 ntos_ob/ObType.c
87 ntos_ob/ObTypes.c
88 ntos_ob/ObWait.c
89 ntos_ps/PsNotify.c
90 ntos_se/SeHelpers.c
91 ntos_se/SeInheritance.c
92 ntos_se/SeQueryInfoToken.c
93 rtl/RtlIsValidOemCharacter.c
94 ${COMMON_SOURCE}
95
96 kmtest_drv/kmtest_drv.rc)
97
98 add_library(kmtest_drv SHARED ${KMTEST_DRV_SOURCE})
99 set_module_type(kmtest_drv kernelmodedriver)
100 target_link_libraries(kmtest_drv kmtest_printf chkstk memcmp ntoskrnl_vista ${PSEH_LIB})
101 add_importlibs(kmtest_drv ntoskrnl hal)
102 add_dependencies(kmtest_drv bugcodes xdk)
103 add_target_compile_definitions(kmtest_drv KMT_KERNEL_MODE NTDDI_VERSION=NTDDI_WS03SP1)
104 #add_pch(kmtest_drv include/kmt_test.h)
105 add_rostests_file(TARGET kmtest_drv)
106
107 add_library(kmtest_printf
108 kmtest_drv/printf_stubs.c
109 ${REACTOS_SOURCE_DIR}/sdk/lib/crt/string/strnlen.c
110 ${REACTOS_SOURCE_DIR}/sdk/lib/crt/string/wcsnlen.c
111 ${REACTOS_SOURCE_DIR}/sdk/lib/crt/printf/streamout.c)
112 add_target_compile_definitions(kmtest_printf _LIBCNT_ _USER32_WSPRINTF wctomb=KmtWcToMb)
113 add_target_include_directories(kmtest_printf ${REACTOS_SOURCE_DIR}/sdk/lib/crt/include)
114
115 #
116 # kmtest.exe loader application
117 #
118
119 list(APPEND KMTEST_SOURCE
120 kmtest/kmtest.c
121 kmtest/service.c
122 kmtest/support.c
123 kmtest/testlist.c
124
125 example/Example_user.c
126 kernel32/FindFile_user.c
127 ntos_cc/CcCopyRead_user.c
128 ntos_io/IoCreateFile_user.c
129 ntos_io/IoDeviceObject_user.c
130 ntos_io/IoReadWrite_user.c
131 ntos_mm/MmMapLockedPagesSpecifyCache_user.c
132 ntos_mm/NtCreateSection_user.c
133 ntos_po/PoIrp_user.c
134 tcpip/TcpIp_user.c
135 ${COMMON_SOURCE}
136
137 kmtest/kmtest.rc)
138
139 add_executable(kmtest ${KMTEST_SOURCE})
140 set_module_type(kmtest win32cui)
141 target_link_libraries(kmtest ${PSEH_LIB})
142 add_importlibs(kmtest advapi32 ws2_32 msvcrt kernel32 ntdll)
143 add_target_compile_definitions(kmtest KMT_USER_MODE)
144 #add_pch(kmtest include/kmt_test.h)
145 set_target_properties(kmtest PROPERTIES OUTPUT_NAME "kmtest_")
146 #add_rostests_file(TARGET kmtest)
147 add_cd_file(TARGET kmtest DESTINATION reactos/bin FOR all)
148
149 #
150 # Group targets
151 #
152 add_custom_target(kmtest_drivers)
153 add_dependencies(kmtest_drivers
154 kmtest_drv
155 example_drv
156 findfile_drv
157 iocreatefile_drv
158 iodeviceobject_drv
159 iohelper_drv
160 ioreadwrite_drv
161 mmmaplockedpagesspecifycache_drv
162 ntcreatesection_drv
163 poirp_drv
164 tcpip_drv
165 cccopyread_drv)
166
167 add_custom_target(kmtest_all)
168 add_dependencies(kmtest_all kmtest_drivers kmtest)