diff --git a/sdk/tools/mkisofs/CMakeLists.txt b/sdk/tools/mkisofs/CMakeLists.txt index 1b4c2116035..840e837f611 100644 --- a/sdk/tools/mkisofs/CMakeLists.txt +++ b/sdk/tools/mkisofs/CMakeLists.txt @@ -107,7 +107,8 @@ 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") + # MATCHES must be used here because on macOS, CMake uses the compiler ID "AppleClang". + 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")