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 RtlRemovePrivileges.c 89 RtlUnicodeStringToAnsiString.c 90 RtlUnicodeStringToCountedOemString.c 91 RtlUnicodeToOemN.c 92 RtlUpcaseUnicodeStringToCountedOemString.c 93 RtlValidateUnicodeString.c 94 RtlxUnicodeStringToAnsiSize.c 95 RtlxUnicodeStringToOemSize.c 96 StackOverflow.c 97 SystemInfo.c 98 UserModeException.c 99 Timer.c) 100 101if(ARCH STREQUAL "i386") 102 add_asm_files(ntdll_apitest_asm i386/NtContinue.S) 103endif() 104 105list(APPEND PCH_SKIP_SOURCE 106 testlist.c) 107 108add_rc_deps(testdata.rc ${CMAKE_CURRENT_BINARY_DIR}/load_notifications/load_notifications.dll) 109 110add_executable(ntdll_apitest 111 ${SOURCE} 112 ${ntdll_apitest_asm} 113 ${PCH_SKIP_SOURCE} 114 testdata.rc 115 ${CMAKE_CURRENT_BINARY_DIR}/ntdll_apitest.def) 116 117set_target_properties(ntdll_apitest 118 PROPERTIES 119 ENABLE_EXPORTS TRUE 120 DEFINE_SYMBOL "") 121 122target_link_libraries(ntdll_apitest wine uuid ${PSEH_LIB}) 123set_module_type(ntdll_apitest win32cui) 124add_importlibs(ntdll_apitest msvcrt advapi32 kernel32 ntdll) 125add_pch(ntdll_apitest precomp.h "${PCH_SKIP_SOURCE}") 126add_dependencies(ntdll_apitest load_notifications) 127 128if(NOT MSVC) 129 set_source_files_properties(RtlGetFullPathName_UstrEx.c PROPERTIES COMPILE_FLAGS "-Wno-format") 130 131 # Avoid "universal character names are only valid in C++ and C99" error. 132 set_property(TARGET ntdll_apitest PROPERTY C_STANDARD 99) 133endif() 134 135add_rostests_file(TARGET ntdll_apitest) 136add_rostests_file(TARGET ntdll_apitest SUBDIR testdata) 137# These are empty files 138add_rostests_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/ntdll_apitest.exe.local" SUBDIR testdata) 139add_rostests_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/shell32.dll" SUBDIR testdata) 140add_rostests_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/test.dll" SUBDIR testdata) 141add_rostests_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/ntdlltest.manifest" SUBDIR testdata) 142add_rostests_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/fil1.txt" SUBDIR testdata) 143 144# Convenience target for running from IDE 145if(MSVC_IDE) 146 set(NTDLL_APITEST_DATADIR $<TARGET_FILE_DIR:ntdll_apitest>/testdata/) 147 add_custom_command(TARGET ntdll_apitest 148 POST_BUILD 149 COMMAND "${CMAKE_COMMAND}" -E make_directory ${NTDLL_APITEST_DATADIR} 150 COMMAND "${CMAKE_COMMAND}" -E copy $<TARGET_FILE:ntdll_apitest> ${NTDLL_APITEST_DATADIR} 151 COMMAND "${CMAKE_COMMAND}" -E copy ntdll_apitest.exe.local ${NTDLL_APITEST_DATADIR} 152 COMMAND "${CMAKE_COMMAND}" -E copy shell32.dll ${NTDLL_APITEST_DATADIR} 153 COMMAND "${CMAKE_COMMAND}" -E copy test.dll ${NTDLL_APITEST_DATADIR} 154 COMMAND "${CMAKE_COMMAND}" -E copy ntdlltest.manifest ${NTDLL_APITEST_DATADIR} 155 COMMAND "${CMAKE_COMMAND}" -E copy fil1.txt ${NTDLL_APITEST_DATADIR} 156 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) 157endif() 158