https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ab825334dd321e24338c5…
commit ab825334dd321e24338c583835eb7b0b9e9add2d
Author: Jérôme Gardou <zefklop(a)users.noreply.github.com>
AuthorDate: Fri Oct 16 15:57:20 2020 +0200
Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com>
CommitDate: Tue Oct 20 21:44:54 2020 +0200
Apply suggestions from code review
Beautification and clarity
Co-authored-by: Victor Perevertkin <victor(a)perevertkin.ru>
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org>
---
base/services/tftpd/CMakeLists.txt | 2 +-
dll/3rdparty/libxslt/CMakeLists.txt | 3 +--
sdk/lib/crt/msvcrtex.cmake | 6 +++---
sdk/lib/drivers/lwip/CMakeLists.txt | 2 +-
sdk/tools/wpp/CMakeLists.txt | 2 +-
5 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/base/services/tftpd/CMakeLists.txt b/base/services/tftpd/CMakeLists.txt
index fb6ab01c67d..1b10567bd7f 100644
--- a/base/services/tftpd/CMakeLists.txt
+++ b/base/services/tftpd/CMakeLists.txt
@@ -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((NOT MSVC) OR USE_CLANG_CL)
+if(GCC OR CLANG)
target_compile_options(tftpd PRIVATE -Wno-format-overflow)
endif()
diff --git a/dll/3rdparty/libxslt/CMakeLists.txt b/dll/3rdparty/libxslt/CMakeLists.txt
index 5247b3efb7a..5a4910b6f3d 100644
--- a/dll/3rdparty/libxslt/CMakeLists.txt
+++ b/dll/3rdparty/libxslt/CMakeLists.txt
@@ -43,10 +43,9 @@ if(MSVC)
add_importlibs(libxslt ntdll)
endif()
-if ((NOT MSVC) OR USE_CLANG_CL)
+if(GCC OR CLANG)
target_compile_options(libxslt PRIVATE -Wno-misleading-indentation -Wno-pointer-sign
-Wno-unused-function)
endif()
add_pch(libxslt precomp.h SOURCE)
add_cd_file(TARGET libxslt DESTINATION reactos/system32 FOR all)
-
diff --git a/sdk/lib/crt/msvcrtex.cmake b/sdk/lib/crt/msvcrtex.cmake
index b55f53ce659..9d4182ffb4d 100644
--- a/sdk/lib/crt/msvcrtex.cmake
+++ b/sdk/lib/crt/msvcrtex.cmake
@@ -96,9 +96,9 @@ add_asm_files(msvcrtex_asm ${MSVCRTEX_ASM_SOURCE})
add_library(msvcrtex ${MSVCRTEX_SOURCE} ${msvcrtex_asm})
target_compile_definitions(msvcrtex PRIVATE _DLL _MSVCRTEX_)
-if ((NOT MSVC) OR USE_CLANG_CL)
+if(GCC OR CLANG)
target_compile_options(msvcrtex PRIVATE
$<$<COMPILE_LANGUAGE:C>:-Wno-main>)
- if (LTCG)
+ if(LTCG)
target_compile_options(msvcrtex PRIVATE -fno-lto)
endif()
endif()
@@ -107,7 +107,7 @@ set_source_files_properties(startup/crtdll.c PROPERTIES
COMPILE_DEFINITIONS CRTD
set_source_files_properties(startup/crtexe.c
startup/wcrtexe.c PROPERTIES COMPILE_DEFINITIONS
_M_CEE_PURE)
-if (NOT MSVC)
+if(NOT MSVC)
target_link_libraries(msvcrtex oldnames)
endif()
diff --git a/sdk/lib/drivers/lwip/CMakeLists.txt b/sdk/lib/drivers/lwip/CMakeLists.txt
index 4b70c3c472c..f2faa8db92e 100644
--- a/sdk/lib/drivers/lwip/CMakeLists.txt
+++ b/sdk/lib/drivers/lwip/CMakeLists.txt
@@ -62,6 +62,6 @@ add_library(lwip ${SOURCE})
add_dependencies(lwip bugcodes xdk)
add_pch(lwip precomp.h SOURCE)
-if((NOT MSVC) AND LTCG)
+if((NOT MSVC) AND LTCG)
target_compile_options(lwip PRIVATE -fno-builtin-malloc -fno-builtin-free)
endif()
diff --git a/sdk/tools/wpp/CMakeLists.txt b/sdk/tools/wpp/CMakeLists.txt
index 0b68ae806cc..389b0c5130f 100644
--- a/sdk/tools/wpp/CMakeLists.txt
+++ b/sdk/tools/wpp/CMakeLists.txt
@@ -14,7 +14,7 @@ if(MSVC)
# Disable warnings
add_compile_options(
- /wd4146 # " unary minus operator applied to unsigned type, result still
unsigned"
+ /wd4146 # "unary minus operator applied to unsigned type, result still
unsigned"
/wd4244) # "'=': conversion from 'a' to 'b',
possible loss of data"
endif()