Skip to content

Commit

Permalink
[MKISOFS] Fix Clang check for macOS platforms
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wjk committed Jun 19, 2024
1 parent 3fe12f1 commit 9d80580
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/tools/mkisofs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ else()
# Silence compilers checking for invalid formatting sequences.
target_compile_options(libschily PRIVATE "-Wno-format")

if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "15")
if(CMAKE_C_COMPILER_ID MATCHES "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")
Expand Down

0 comments on commit 9d80580

Please sign in to comment.