1
2include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
3remove_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502)
4add_definitions(-DWINVER=0x600 -D_WIN32_WINNT=0x601)
5
6list(APPEND SOURCE
7    actctx.c
8    atom.c
9    change.c
10    codepage.c
11    comm.c
12    console.c
13    debugger.c
14    directory.c
15    drive.c
16    environ.c
17    fiber.c
18    file.c
19    format_msg.c
20    generated.c
21    heap.c
22    loader.c
23    locale.c
24    mailslot.c
25    module.c
26    path.c
27    pipe.c
28    process.c
29    profile.c
30    resource.c
31    sync.c
32    thread.c
33    time.c
34    timer.c
35    toolhelp.c
36    version.c
37    virtual.c
38    volume.c)
39
40list(APPEND PCH_SKIP_SOURCE
41    testlist.c)
42
43add_executable(kernel32_winetest
44    ${SOURCE}
45    ${PCH_SKIP_SOURCE}
46    resource.rc)
47
48if(MSVC)
49    # Disable warning C4477 (printf format warnings)
50    remove_target_compile_option(kernel32_winetest "/we4477")
51
52    if(ARCH STREQUAL "amd64")
53        # error C4101: 'is_wow64': unreferenced local variable
54        remove_target_compile_option(kernel32_winetest "/we4101")
55        target_compile_options(kernel32_winetest PRIVATE /wd4101)
56    endif()
57endif()
58
59if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
60    target_compile_options(kernel32_winetest PRIVATE "-Wno-format")
61endif()
62
63set_module_type(kernel32_winetest win32cui)
64target_link_libraries(kernel32_winetest pseh)
65add_importlibs(kernel32_winetest user32 advapi32 msvcrt kernel32 ntdll)
66add_pch(kernel32_winetest precomp.h "${PCH_SKIP_SOURCE}")
67add_rostests_file(TARGET kernel32_winetest)
68