diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-03-04 09:22:05 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-03-04 09:39:04 +0300 |
commit | 74f3fb746af0a2a5837be7460389258b3117be40 (patch) | |
tree | 315d7a2eade018ca5e8b5074ecc167805e956b23 /build_files | |
parent | dab20bd41ff9b2545952fa8715e2467b22900133 (diff) |
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.
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/cmake/macros.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
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") |