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