mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 20:33:04 +00:00
[CMAKE] Some options are only supported by GCC, don't use them for clang
These are (so far): -Wno-format-overflow -Wno-nonnull-compare -Wno-old-style-declaration -Wno-unused-but-set-variable
This commit is contained in:
parent
959729f6ee
commit
74ec94e12c
35 changed files with 99 additions and 57 deletions
|
@ -24,10 +24,15 @@ list(APPEND SOURCE
|
|||
add_executable(telnet ${SOURCE} telnet.rc)
|
||||
target_link_libraries(telnet cppstl)
|
||||
set_target_cpp_properties(telnet WITH_EXCEPTIONS)
|
||||
|
||||
if (NOT MSVC)
|
||||
target_compile_options(telnet PRIVATE -Wno-restrict $<$<COMPILE_LANGUAGE:CXX>:-Wno-narrowing>)
|
||||
target_compile_definitions(telnet PRIVATE _CRT_NONSTDC_NO_DEPRECATE)
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(telnet PRIVATE -Wno-restrict $<$<COMPILE_LANGUAGE:CXX>:-Wno-narrowing>)
|
||||
endif()
|
||||
|
||||
set_module_type(telnet win32cui)
|
||||
add_importlibs(telnet ws2_32 user32 msvcrt kernel32 ntdll)
|
||||
add_pch(telnet precomp.h SOURCE)
|
||||
|
|
|
@ -4,6 +4,6 @@ set_module_type(tftpd win32cui)
|
|||
add_importlibs(tftpd advapi32 ws2_32 iphlpapi msvcrt kernel32)
|
||||
add_cd_file(TARGET tftpd DESTINATION reactos/system32 FOR all)
|
||||
|
||||
if(GCC OR CLANG)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(tftpd PRIVATE -Wno-format-overflow)
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue