1
2list(APPEND SOURCE_STATIC
3    _snprintf.c
4    _snwprintf.c
5    _vscprintf.c
6    _vscwprintf.c
7    _vsnprintf.c
8    _vsnwprintf.c
9    atexit.c
10    ceil.c
11    fabs.c
12    floor.c
13    fpcontrol.c
14    mbstowcs.c
15    mbtowc.c
16    sprintf.c
17    strcpy.c
18    strlen.c
19    strtoul.c
20    wcstombs.c
21    wcstoul.c
22    wctomb.c
23)
24
25if(ARCH STREQUAL "i386")
26    list(APPEND SOURCE_STATIC
27        # To be filled
28    )
29elseif(ARCH STREQUAL "amd64")
30    list(APPEND SOURCE_STATIC
31        # To be filled
32    )
33elseif(ARCH STREQUAL "arm")
34    list(APPEND SOURCE_STATIC
35        __rt_div.c
36        __fto64.c
37        __64tof.c
38    )
39endif()
40
41add_executable(static_crt_apitest EXCLUDE_FROM_ALL testlist.c ${SOURCE_STATIC})
42target_compile_definitions(static_crt_apitest PRIVATE TEST_STATIC_CRT _CRTBLD wine_dbgstr_an=wine_dbgstr_an_ wine_dbgstr_wn=wine_dbgstr_wn_)
43target_link_libraries(static_crt_apitest crt wine ${PSEH_LIB})
44set_module_type(static_crt_apitest win32cui)
45add_importlibs(static_crt_apitest kernel32 ntdll)
46add_rostests_file(TARGET static_crt_apitest)
47
48if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
49    target_compile_options(static_crt_apitest PRIVATE -Wno-format)
50endif()
51