diff options
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/cmake/macros.cmake | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 7f19e22c39e..239371c227c 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -1050,6 +1050,19 @@ macro(remove_strict_flags_file 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)$") + remove_cc_flag("-funsigned-char") + elseif(MSVC) + remove_cc_flag("/J") + else() + message(WARNING + "Compiler '${CMAKE_C_COMPILER_ID}' failed to disable 'unsigned char' flag." + "Build files need updating." + ) + endif() +endmacro() function(ADD_CHECK_C_COMPILER_FLAG _CFLAGS |