reactos/modules/rostests/winetests/msvcrt/CMakeLists.txt
Serge Gautherie 3cc4361cca
[CMAKE] Clang*: Add '-Werror=unknown-warning-option' for C/CXX (#6383)
* [UDFS] Clang: Fix a #pragma

'warning: unknown warning group '-Wstringop-overflow', ignored [-Wunknown-warning-option]'

Follow-up to 612b1f2e6 (0.4.15-dev-1129).

* [CREATESPEC] Clang: Fix a target_compile_options()

'warning: unknown warning option '-Wno-stringop-overflow'; did you mean '-Wno-shift-overflow'? [-Wunknown-warning-option]'

Addendum to 00ed72d7e (0.4.15-dev-1169).

* [MSVCRT_WINETEST] Clang*: Fix a target_compile_options()

'warning: unknown warning option '-Wno-stringop-truncation'; did you mean '-Wno-string-concatenation'? [-Wunknown-warning-option]'

Addendum to commits 00ed72d7e (0.4.15-dev-1169) then f155b9377 (0.4.15-dev-4612).

* [TELNET] Clang*: Fix a target_compile_options()

'warning: unknown warning option '-Wno-restrict' [-Wunknown-warning-option]'

Addendum to 447ef2aa4 (0.4.15-dev-4613).
2024-05-31 16:26:11 +02:00

46 lines
1.1 KiB
CMake

list(APPEND SOURCE
cpp.c
data.c
dir.c
environ.c
file.c
headers.c
heap.c
locale.c
misc.c
scanf.c
signal.c
string.c
time.c)
list(APPEND PCH_SKIP_SOURCE
printf.c # _CRT_NON_CONFORMING_SWPRINTFS
testlist.c)
add_executable(msvcrt_winetest
${SOURCE}
${PCH_SKIP_SOURCE})
target_compile_definitions(msvcrt_winetest PRIVATE
WINETEST_USE_DBGSTR_LONGLONG
_CRT_NONSTDC_NO_DEPRECATE
__msvcrt_ulong=ULONG)
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_compile_options(msvcrt_winetest PRIVATE $<$<COMPILE_LANGUAGE:C>:-Wno-format -Wno-overflow>)
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
target_compile_options(msvcrt_winetest PRIVATE $<$<COMPILE_LANGUAGE:C>:-Wno-stringop-truncation>)
endif()
endif()
set_module_type(msvcrt_winetest win32cui)
add_importlibs(msvcrt_winetest advapi32 msvcrt kernel32)
target_link_libraries(msvcrt_winetest oldnames)
if(MSVC)
add_importlibs(msvcrt_winetest ntdll)
endif()
add_pch(msvcrt_winetest precomp.h "${PCH_SKIP_SOURCE}")
add_rostests_file(TARGET msvcrt_winetest)