1
2list(APPEND SOURCE
3    cpp.c
4    data.c
5    dir.c
6    environ.c
7    file.c
8    headers.c
9    heap.c
10    locale.c
11    misc.c
12    scanf.c
13    signal.c
14    string.c
15    time.c)
16
17list(APPEND PCH_SKIP_SOURCE
18    printf.c    # _CRT_NON_CONFORMING_SWPRINTFS
19    testlist.c)
20
21add_executable(msvcrt_winetest
22    ${SOURCE}
23    ${PCH_SKIP_SOURCE})
24
25target_compile_definitions(msvcrt_winetest PRIVATE
26    WINETEST_USE_DBGSTR_LONGLONG
27    _CRT_NONSTDC_NO_DEPRECATE
28    __msvcrt_ulong=ULONG)
29
30if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
31    target_compile_options(msvcrt_winetest PRIVATE -Wno-format -Wno-stringop-truncation)
32endif()
33
34set_module_type(msvcrt_winetest win32cui)
35add_importlibs(msvcrt_winetest advapi32 msvcrt kernel32)
36target_link_libraries(msvcrt_winetest oldnames)
37
38if(MSVC)
39    add_importlibs(msvcrt_winetest ntdll)
40endif()
41
42add_pch(msvcrt_winetest precomp.h "${PCH_SKIP_SOURCE}")
43add_rostests_file(TARGET msvcrt_winetest)
44