[KMTESTS\NTOS_KE] - Add KeTimer test stub which tests only KeInitializeTimerEx (Note...
[reactos.git] / rostests / 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 list(APPEND COMMON_SOURCE
11 example/GuardedMemory.c
12 rtl/RtlAvlTree.c
13 rtl/RtlMemory.c
14 rtl/RtlSplayTree.c)
15
16 #
17 # kmtest_drv.sys driver
18 #
19 list(APPEND KMTEST_DRV_SOURCE
20 kmtest_drv/kmtest_drv.c
21 kmtest_drv/testlist.c
22
23 example/Example.c
24 example/KernelType.c
25 ntos_ex/ExDoubleList.c
26 ntos_ex/ExFastMutex.c
27 ntos_ex/ExHardError.c
28 ntos_ex/ExInterlocked.c
29 ntos_ex/ExPools.c
30 ntos_ex/ExResource.c
31 ntos_ex/ExSequencedList.c
32 ntos_ex/ExSingleList.c
33 ntos_ex/ExTimer.c
34 ntos_fsrtl/FsRtlExpression.c
35 ntos_io/IoDeviceInterface.c
36 ntos_io/IoInterrupt.c
37 ntos_io/IoIrp.c
38 ntos_io/IoMdl.c
39 ntos_ke/KeApc.c
40 ntos_ke/KeDpc.c
41 ntos_ke/KeEvent.c
42 ntos_ke/KeGuardedMutex.c
43 ntos_ke/KeIrql.c
44 ntos_ke/KeProcessor.c
45 ntos_ke/KeSpinLock.c
46 ntos_ke/KeTimer.c
47 ntos_mm/MmSection.c
48 ntos_ob/ObReference.c
49 ntos_ob/ObType.c
50 ${COMMON_SOURCE}
51
52 kmtest_drv/kmtest_drv.rc)
53
54 add_library(kmtest_drv SHARED ${KMTEST_DRV_SOURCE})
55
56 set_module_type(kmtest_drv kernelmodedriver)
57 target_link_libraries(kmtest_drv kmtest_printf ${PSEH_LIB})
58 add_importlibs(kmtest_drv ntoskrnl hal)
59 add_target_compile_definitions(kmtest_drv KMT_KERNEL_MODE NTDDI_VERSION=NTDDI_WS03SP1)
60 #add_pch(kmtest_drv include/kmt_test.h)
61
62 add_cd_file(TARGET kmtest_drv DESTINATION reactos/bin FOR all)
63
64 add_library(kmtest_printf
65 kmtest_drv/printf_stubs.c
66 ${REACTOS_SOURCE_DIR}/lib/sdk/crt/printf/streamout.c)
67 add_target_compile_definitions(kmtest_printf _LIBCNT_ _USER32_WSPRINTF wctomb=KmtWcToMb)
68 add_target_include_directories(kmtest_printf ${REACTOS_SOURCE_DIR}/lib/sdk/crt/include)
69
70 #
71 # kmtest.exe loader application
72 #
73 set_rc_compiler()
74
75 list(APPEND KMTEST_SOURCE
76 kmtest/kmtest.c
77 kmtest/service.c
78 kmtest/support.c
79 kmtest/testlist.c
80
81 example/Example_user.c
82 ntos_io/IoDeviceObject_user.c
83 ${COMMON_SOURCE}
84
85 kmtest/kmtest.rc)
86
87 add_executable(kmtest ${KMTEST_SOURCE})
88 set_module_type(kmtest win32cui)
89 target_link_libraries(kmtest ${PSEH_LIB})
90 add_importlibs(kmtest advapi32 msvcrt kernel32 ntdll)
91 add_target_compile_definitions(kmtest KMT_USER_MODE)
92 #add_pch(kmtest include/kmt_test.h)
93
94 set_target_properties(kmtest PROPERTIES OUTPUT_NAME "kmtest_")
95 add_cd_file(TARGET kmtest DESTINATION reactos/bin FOR all)
96
97 #
98 # Group targets
99 #
100 add_custom_target(kmtest_drivers)
101 add_dependencies(kmtest_drivers
102 kmtest_drv
103 example_drv
104 iodeviceobject_drv
105 iohelper_drv)
106
107 add_custom_target(kmtest_all)
108 add_dependencies(kmtest_all kmtest_drivers kmtest)