https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2505489d2952f1df5c27bdc1a5a242b582da70ba

commit 2505489d2952f1df5c27bdc1a5a242b582da70ba
Author:     Serge Gautherie <32623169+sergegauthe...@users.noreply.github.com>
AuthorDate: Wed Jan 17 16:32:46 2024 +0100
Commit:     GitHub <nore...@github.com>
CommitDate: Wed Jan 17 16:32:46 2024 +0100

    [MKISOFS] CMakeLists.txt: Add a check for Clang and its version (#6369)
    
    GCC 8.4 and Clang 13.0.1:
    `cc1: note: unrecognized command-line option 
‘-Wno-deprecated-non-prototype’ may have been intended to silence earlier 
diagnostics`
    
    Addendum to commit 4e3bf252d
---
 sdk/tools/mkisofs/CMakeLists.txt | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/sdk/tools/mkisofs/CMakeLists.txt b/sdk/tools/mkisofs/CMakeLists.txt
index bd25bf36403..1b4c2116035 100644
--- a/sdk/tools/mkisofs/CMakeLists.txt
+++ b/sdk/tools/mkisofs/CMakeLists.txt
@@ -107,10 +107,12 @@ else()
     # Silence compilers checking for invalid formatting sequences.
     target_compile_options(libschily PRIVATE "-Wno-format")
 
-    # mkisofs uses K&R-style function definitions to support very old 
compilers.
-    # This causes warnings with modern compilers.
-    target_compile_options(libmdigest PRIVATE "-Wno-deprecated-non-prototype")
-    target_compile_options(libschily PRIVATE "-Wno-deprecated-non-prototype")
-    target_compile_options(libsiconv PRIVATE "-Wno-deprecated-non-prototype")
-    target_compile_options(mkisofs PRIVATE "-Wno-deprecated-non-prototype")
+    if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_VERSION 
VERSION_GREATER_EQUAL "15")
+        # mkisofs uses K&R-style function definitions to support very old 
compilers.
+        # This causes warnings with modern compilers.
+        target_compile_options(libmdigest PRIVATE 
"-Wno-deprecated-non-prototype")
+        target_compile_options(libschily PRIVATE 
"-Wno-deprecated-non-prototype")
+        target_compile_options(libsiconv PRIVATE 
"-Wno-deprecated-non-prototype")
+        target_compile_options(mkisofs PRIVATE "-Wno-deprecated-non-prototype")
+    endif()
 endif()

Reply via email to