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_OPTIONS "-Wno-format") 41endif() 42 43# RTL tests with static linkage (called unittest, so it won't run in rosautotest) 44add_executable(rtl_unittest 45 testlist.c 46 ldrstubs.c) 47target_compile_definitions(rtl_unittest PRIVATE _RTL_TEST _NTSYSTEM_) 48target_link_libraries(rtl_unittest rtl_test_lib rtl rtl_um rtl_vista wine uuid ${PSEH_LIB}) 49set_module_type(rtl_unittest win32cui) 50add_importlibs(rtl_unittest msvcrt advapi32 kernel32 ntdll) 51target_compile_definitions(rtl_unittest PRIVATE KMT_USER_MODE NTDDI_VERSION=NTDDI_WS03SP1) 52 53add_rostests_file(TARGET rtl_unittest) 54 55if(CMAKE_C_COMPILER_ID STREQUAL "GNU") 56 target_compile_options(rtl_unittest PRIVATE -Wno-format) 57endif() 58