From 74f3fb746af0a2a5837be7460389258b3117be40 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 4 Mar 2018 07:22:05 +0100 Subject: Fix Clang compiler detection on macOS. "AppleClang" was not properly detected here. Now make the compiler ID test a bit less compact but consistent with other code. --- build_files/cmake/macros.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'build_files') diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index e3eb4d9241a..eaf8c2b845b 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -1129,7 +1129,9 @@ endmacro() # External libs may need 'signed char' to be default. macro(remove_cc_flag_unsigned_char) - if(CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|Intel)$") + if(CMAKE_COMPILER_IS_GNUCC OR + (CMAKE_C_COMPILER_ID MATCHES "Clang") OR + (CMAKE_C_COMPILER_ID MATCHES "Intel")) remove_cc_flag("-funsigned-char") elseif(MSVC) remove_cc_flag("/J") -- cgit v1.2.3