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