Skip to content

Commit d471919

Browse files
authored
[MKISOFS] Fix Clang check for macOS platforms (reactos#7037)
* [MKISOFS] Fix Clang check for macOS platforms On macOS, CMAKE_C_COMPILER_ID is "AppleClang". While certainly Clang, this does not match the exact string "Clang" that is being checked for, and as a result the warning flags guarded thereby are not passed to the compiler. With this change CMake will recognize both Clang and AppleClang. * Update sdk/tools/mkisofs/CMakeLists.txt
1 parent 90831e7 commit d471919

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sdk/tools/mkisofs/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ else()
107107
# Silence compilers checking for invalid formatting sequences.
108108
target_compile_options(libschily PRIVATE "-Wno-format")
109109

110-
if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "15")
110+
# MATCHES must be used here because on macOS, CMake uses the compiler ID "AppleClang".
111+
if(CMAKE_C_COMPILER_ID MATCHES "Clang$" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "15")
111112
# mkisofs uses K&R-style function definitions to support very old compilers.
112113
# This causes warnings with modern compilers.
113114
target_compile_options(libmdigest PRIVATE "-Wno-deprecated-non-prototype")

0 commit comments

Comments
 (0)