[SHELL32] *.rc: Strip all unneeded WS_DISABLED in dlg style (#6675)
[reactos.git] / modules / rostests / apitests / ntdll / CMakeLists.txt
1
2 add_subdirectory(load_notifications)
3
4 include_directories($<TARGET_FILE_DIR:load_notifications>)
5 include_directories(${REACTOS_SOURCE_DIR}/ntoskrnl/include)
6 spec2def(ntdll_apitest.exe ntdll_apitest.spec)
7
8 list(APPEND SOURCE
9 LdrEnumResources.c
10 LdrLoadDll.c
11 load_notifications.c
12 locale.c
13 NtAcceptConnectPort.c
14 NtAccessCheck.c
15 NtAccessCheckByType.c
16 NtAccessCheckByTypeResultList.c
17 NtAdjustGroupsToken.c
18 NtAdjustPrivilegesToken.c
19 NtAllocateVirtualMemory.c
20 NtApphelpCacheControl.c
21 NtCompareTokens.c
22 NtContinue.c
23 NtCreateFile.c
24 NtCreateKey.c
25 NtCreateThread.c
26 NtDeleteKey.c
27 NtDuplicateObject.c
28 NtDuplicateToken.c
29 NtFilterToken.c
30 NtFreeVirtualMemory.c
31 NtImpersonateAnonymousToken.c
32 NtLoadUnloadKey.c
33 NtMapViewOfSection.c
34 NtMutant.c
35 NtOpenKey.c
36 NtOpenProcessToken.c
37 NtOpenThreadToken.c
38 NtProtectVirtualMemory.c
39 NtQueryInformationFile.c
40 NtQueryInformationProcess.c
41 NtQueryInformationThread.c
42 NtQueryInformationToken.c
43 NtQueryKey.c
44 NtQueryOpenSubKeys.c
45 NtQuerySystemEnvironmentValue.c
46 NtQuerySystemInformation.c
47 NtQueryValueKey.c
48 NtQueryVolumeInformationFile.c
49 NtReadFile.c
50 NtSaveKey.c
51 NtSetDefaultLocale.c
52 NtSetInformationFile.c
53 NtSetInformationProcess.c
54 NtSetInformationThread.c
55 NtSetInformationToken.c
56 NtSetValueKey.c
57 NtSetVolumeInformationFile.c
58 NtUnloadDriver.c
59 NtWriteFile.c
60 probelib.c
61 RtlAllocateHeap.c
62 RtlBitmap.c
63 RtlComputePrivatizedDllName_U.c
64 RtlCopyMappedMemory.c
65 RtlCriticalSection.c
66 RtlDebugInformation.c
67 RtlDeleteAce.c
68 RtlDetermineDosPathNameType.c
69 RtlDoesFileExists.c
70 RtlDosApplyFileIsolationRedirection_Ustr.c
71 RtlDosPathNameToNtPathName_U.c
72 RtlDosSearchPath_U.c
73 RtlDosSearchPath_Ustr.c
74 RtlFirstFreeAce.c
75 RtlGenerate8dot3Name.c
76 RtlGetFullPathName_U.c
77 RtlGetFullPathName_Ustr.c
78 RtlGetFullPathName_UstrEx.c
79 RtlGetLengthWithoutLastFullDosOrNtPathElement.c
80 RtlGetLengthWithoutTrailingPathSeperators.c
81 RtlGetLongestNtPathLength.c
82 RtlGetNtProductType.c
83 RtlGetProcessHeaps.c
84 RtlGetUnloadEventTrace.c
85 RtlHandle.c
86 RtlImageDirectoryEntryToData.c
87 RtlImageRvaToVa.c
88 RtlIsNameLegalDOS8Dot3.c
89 RtlMemoryStream.c
90 RtlMultipleAllocateHeap.c
91 RtlNtPathNameToDosPathName.c
92 RtlpApplyLengthFunction.c
93 RtlpEnsureBufferSize.c
94 RtlQueryTimeZoneInfo.c
95 RtlReAllocateHeap.c
96 RtlRemovePrivileges.c
97 RtlUnicodeStringToAnsiString.c
98 RtlUnicodeStringToCountedOemString.c
99 RtlUnicodeToOemN.c
100 RtlUpcaseUnicodeStringToCountedOemString.c
101 RtlValidateUnicodeString.c
102 RtlxUnicodeStringToAnsiSize.c
103 RtlxUnicodeStringToOemSize.c
104 StackOverflow.c
105 SystemInfo.c
106 UserModeException.c
107 Timer.c
108 precomp.h)
109
110 if(ARCH STREQUAL "i386")
111 add_asm_files(ntdll_apitest_asm i386/NtContinue.S)
112 elseif(ARCH STREQUAL "amd64")
113 add_asm_files(ntdll_apitest_asm amd64/NtContinue.S)
114 endif()
115
116 list(APPEND PCH_SKIP_SOURCE
117 testlist.c)
118
119 add_rc_deps(testdata.rc ${CMAKE_CURRENT_BINARY_DIR}/load_notifications/load_notifications.dll)
120
121 add_executable(ntdll_apitest
122 ${SOURCE}
123 ${ntdll_apitest_asm}
124 ${PCH_SKIP_SOURCE}
125 testdata.rc
126 ${CMAKE_CURRENT_BINARY_DIR}/ntdll_apitest.def)
127
128 set_target_properties(ntdll_apitest
129 PROPERTIES
130 ENABLE_EXPORTS TRUE
131 DEFINE_SYMBOL "")
132
133 target_link_libraries(ntdll_apitest rtl_test_lib wine uuid ${PSEH_LIB})
134 set_module_type(ntdll_apitest win32cui)
135 add_importlibs(ntdll_apitest msvcrt advapi32 kernel32 ntdll)
136 add_pch(ntdll_apitest precomp.h "${PCH_SKIP_SOURCE}")
137 add_dependencies(ntdll_apitest load_notifications)
138
139 if(NOT MSVC)
140 set_source_files_properties(RtlGetFullPathName_UstrEx.c PROPERTIES COMPILE_FLAGS "-Wno-format")
141
142 # Avoid "universal character names are only valid in C++ and C99" error.
143 set_property(TARGET ntdll_apitest PROPERTY C_STANDARD 99)
144 endif()
145
146 add_rostests_file(TARGET ntdll_apitest)
147 add_rostests_file(TARGET ntdll_apitest SUBDIR testdata)
148 # These are empty files
149 add_rostests_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/ntdll_apitest.exe.local" SUBDIR testdata)
150 add_rostests_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/shell32.dll" SUBDIR testdata)
151 # add_rostests_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/test.dll" SUBDIR testdata)
152 add_rostests_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/ntdlltest.manifest" SUBDIR testdata)
153 add_rostests_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/fil1.txt" SUBDIR testdata)
154
155 # Convenience target for running from IDE
156 if(MSVC_IDE)
157 set(NTDLL_APITEST_DATADIR $<TARGET_FILE_DIR:ntdll_apitest>/testdata/)
158 add_custom_command(TARGET ntdll_apitest
159 POST_BUILD
160 COMMAND "${CMAKE_COMMAND}" -E make_directory ${NTDLL_APITEST_DATADIR}
161 COMMAND "${CMAKE_COMMAND}" -E copy $<TARGET_FILE:ntdll_apitest> ${NTDLL_APITEST_DATADIR}
162 COMMAND "${CMAKE_COMMAND}" -E copy ntdll_apitest.exe.local ${NTDLL_APITEST_DATADIR}
163 COMMAND "${CMAKE_COMMAND}" -E copy shell32.dll ${NTDLL_APITEST_DATADIR}
164 COMMAND "${CMAKE_COMMAND}" -E copy test.dll ${NTDLL_APITEST_DATADIR}
165 COMMAND "${CMAKE_COMMAND}" -E copy ntdlltest.manifest ${NTDLL_APITEST_DATADIR}
166 COMMAND "${CMAKE_COMMAND}" -E copy fil1.txt ${NTDLL_APITEST_DATADIR}
167 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
168 endif()