1c2c66affSColin Finck
2c2c66affSColin Fincklist(APPEND SOURCE
3c2c66affSColin Finck    cpp.c
4c2c66affSColin Finck    data.c
5c2c66affSColin Finck    dir.c
6c2c66affSColin Finck    environ.c
7c2c66affSColin Finck    file.c
8c2c66affSColin Finck    headers.c
9c2c66affSColin Finck    heap.c
10c2c66affSColin Finck    locale.c
11c2c66affSColin Finck    misc.c
12c2c66affSColin Finck    scanf.c
13c2c66affSColin Finck    signal.c
14c2c66affSColin Finck    string.c
15139a3d66SAmine Khaldi    time.c)
16c2c66affSColin Finck
17139a3d66SAmine Khaldilist(APPEND PCH_SKIP_SOURCE
18f1132155SMark Jansen    printf.c    # _CRT_NON_CONFORMING_SWPRINTFS
19139a3d66SAmine Khaldi    testlist.c)
20139a3d66SAmine Khaldi
21139a3d66SAmine Khaldiadd_executable(msvcrt_winetest
22139a3d66SAmine Khaldi    ${SOURCE}
23139a3d66SAmine Khaldi    ${PCH_SKIP_SOURCE})
2400124d1bSAmine Khaldi
2500ed72d7SJérôme Gardoutarget_compile_definitions(msvcrt_winetest PRIVATE
2600ed72d7SJérôme Gardou    WINETEST_USE_DBGSTR_LONGLONG
2700ed72d7SJérôme Gardou    _CRT_NONSTDC_NO_DEPRECATE
2800ed72d7SJérôme Gardou    __msvcrt_ulong=ULONG)
2900ed72d7SJérôme Gardou
30f155b937SVictor Perevertkinif(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
31*3cc4361cSSerge Gautherie    target_compile_options(msvcrt_winetest PRIVATE $<$<COMPILE_LANGUAGE:C>:-Wno-format -Wno-overflow>)
32*3cc4361cSSerge Gautherie    if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
33*3cc4361cSSerge Gautherie        target_compile_options(msvcrt_winetest PRIVATE $<$<COMPILE_LANGUAGE:C>:-Wno-stringop-truncation>)
34*3cc4361cSSerge Gautherie    endif()
35d1ac13c6SKatayama Hirofumi MZendif()
36d1ac13c6SKatayama Hirofumi MZ
37c2c66affSColin Finckset_module_type(msvcrt_winetest win32cui)
38d42fce3cSAmine Khaldiadd_importlibs(msvcrt_winetest advapi32 msvcrt kernel32)
39d53b03e6SJérôme Gardoutarget_link_libraries(msvcrt_winetest oldnames)
40c2c66affSColin Finck
41c2c66affSColin Finckif(MSVC)
42c2c66affSColin Finck    add_importlibs(msvcrt_winetest ntdll)
43c2c66affSColin Finckendif()
44c2c66affSColin Finck
45139a3d66SAmine Khaldiadd_pch(msvcrt_winetest precomp.h "${PCH_SKIP_SOURCE}")
46c2c66affSColin Finckadd_rostests_file(TARGET msvcrt_winetest)
47