1 2 3list(APPEND SOURCE 4 RtlIntSafe.c 5) 6 7if(ARCH STREQUAL "i386") 8 list(APPEND SOURCE 9 i386/RtlCaptureContext.c 10 i386/RtlUnwind.c 11 ) 12 list(APPEND ASM_SOURCE 13 i386/RtlUnwind-asm.s 14 ) 15elseif(ARCH STREQUAL "amd64") 16 list(APPEND ASM_SOURCE 17 amd64/RtlCaptureContext-asm.s 18 ) 19 list(APPEND SOURCE 20 amd64/RtlCaptureContext.c 21 ) 22elseif(ARCH STREQUAL "arm") 23 list(APPEND SOURCE 24 # To be filled 25 ) 26endif() 27 28add_asm_files(rtl_test_asm ${ASM_SOURCE}) 29 30add_library(rtl_test_lib 31 ${SOURCE} 32 ${rtl_test_asm} 33) 34 35target_compile_definitions(rtl_test_lib PRIVATE _RTL_TEST _NTSYSTEM_) 36 37add_dependencies(rtl_test_lib asm) 38 39if(NOT MSVC) 40 set_source_files_properties(RtlGetFullPathName_UstrEx.c PROPERTIES COMPILE_FLAGS "-Wno-format") 41 42 # Avoid "universal character names are only valid in C++ and C99" error. 43 set_property(TARGET rtl_test_lib PROPERTY C_STANDARD 99) 44endif() 45 46# RTL tests with static linkage (called unittest, so it won't run in rosautotest) 47add_executable(rtl_unittest 48 testlist.c 49 ldrstubs.c) 50target_compile_definitions(rtl_unittest PRIVATE _RTL_TEST _NTSYSTEM_) 51target_link_libraries(rtl_unittest rtl_test_lib rtl rtl_um rtl_vista wine uuid ${PSEH_LIB}) 52set_module_type(rtl_unittest win32cui) 53add_importlibs(rtl_unittest msvcrt advapi32 kernel32 ntdll) 54target_compile_definitions(rtl_unittest PRIVATE KMT_USER_MODE NTDDI_VERSION=NTDDI_WS03SP1) 55 56add_rostests_file(TARGET rtl_unittest) 57 58if(CMAKE_C_COMPILER_ID STREQUAL "GNU") 59 target_compile_options(rtl_unittest PRIVATE -Wno-format) 60endif() 61