[KMTESTS/IO]
[reactos.git] / kmtests / CMakeLists.txt
1 include_directories(
2 include)
3
4 #
5 # subdirectories containing special-purpose drivers
6 #
7 add_subdirectory(example)
8 add_subdirectory(ntos_io)
9
10 #
11 # kmtest_drv.sys driver
12 #
13 list(APPEND KMTEST_DRV_SOURCE
14 kmtest_drv/kmtest_drv.c
15 kmtest_drv/testlist.c
16
17 example/Example.c
18 example/KernelType.c
19 ntos_ex/ExDoubleList.c
20 ntos_ex/ExFastMutex.c
21 ntos_ex/ExHardError.c
22 ntos_ex/ExInterlocked.c
23 ntos_ex/ExPools.c
24 ntos_ex/ExResource.c
25 ntos_ex/ExSequencedList.c
26 ntos_ex/ExSingleList.c
27 ntos_ex/ExTimer.c
28 ntos_fsrtl/FsRtlExpression.c
29 ntos_io/IoDeviceInterface.c
30 ntos_io/IoInterrupt.c
31 ntos_io/IoIrp.c
32 ntos_io/IoMdl.c
33 ntos_ke/KeApc.c
34 ntos_ke/KeDpc.c
35 ntos_ke/KeEvent.c
36 ntos_ke/KeGuardedMutex.c
37 ntos_ke/KeIrql.c
38 ntos_ke/KeProcessor.c
39 ntos_ke/KeSpinLock.c
40 ntos_ob/ObType.c
41 rtl/RtlAvlTree.c
42 rtl/RtlMemory.c
43 rtl/RtlSplayTree.c
44
45 kmtest_drv/kmtest_drv.rc)
46
47 add_library(kmtest_drv SHARED ${KMTEST_DRV_SOURCE})
48
49 set_module_type(kmtest_drv kernelmodedriver)
50 target_link_libraries(kmtest_drv kmtest_printf ${PSEH_LIB})
51 add_importlibs(kmtest_drv ntoskrnl hal)
52 set_property(TARGET kmtest_drv PROPERTY COMPILE_DEFINITIONS KMT_KERNEL_MODE NTDDI_VERSION=NTDDI_WS03SP1)
53
54 add_cd_file(TARGET kmtest_drv DESTINATION reactos/bin FOR all)
55
56 add_library(kmtest_printf
57 kmtest_drv/printf_stubs.c
58 ${REACTOS_SOURCE_DIR}/lib/sdk/crt/printf/streamout.c)
59 set_property(TARGET kmtest_printf PROPERTY COMPILE_DEFINITIONS _LIBCNT_ _USER32_WSPRINTF wctomb=KmtWcToMb)
60 set_property(TARGET kmtest_printf PROPERTY INCLUDE_DIRECTORIES ${REACTOS_SOURCE_DIR}/lib/sdk/crt/include)
61
62 #
63 # kmtest.exe loader application
64 #
65 set_rc_compiler()
66
67 list(APPEND KMTEST_SOURCE
68 kmtest/kmtest.c
69 kmtest/service.c
70 kmtest/support.c
71 kmtest/testlist.c
72
73 example/Example_user.c
74 ntos_io/IoDeviceObject_user.c
75 rtl/RtlAvlTree.c
76 rtl/RtlMemory.c
77 rtl/RtlSplayTree.c
78
79 kmtest/kmtest.rc)
80
81 add_executable(kmtest ${KMTEST_SOURCE})
82 set_module_type(kmtest win32cui)
83 target_link_libraries(kmtest ${PSEH_LIB})
84 add_importlibs(kmtest advapi32 msvcrt kernel32 ntdll)
85 set_property(TARGET kmtest PROPERTY COMPILE_DEFINITIONS KMT_USER_MODE)
86
87 add_cd_file(TARGET kmtest DESTINATION reactos/bin FOR all)
88
89 #
90 # Group targets
91 #
92 add_custom_target(kmtest_drivers)
93 add_dependencies(kmtest_drivers
94 kmtest_drv
95 example_drv
96 iodeviceobject_drv
97 iohelper_drv)
98
99 add_custom_target(kmtest_all)
100 add_dependencies(kmtest_all kmtest_drivers kmtest)