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