diff options
-rw-r--r-- | build_files/cmake/macros.cmake | 13 | ||||
-rw-r--r-- | extern/recastnavigation/CMakeLists.txt | 2 |
2 files changed, 15 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 diff --git a/extern/recastnavigation/CMakeLists.txt b/extern/recastnavigation/CMakeLists.txt index b90a36c0d8f..19ac6e9dde8 100644 --- a/extern/recastnavigation/CMakeLists.txt +++ b/extern/recastnavigation/CMakeLists.txt @@ -23,6 +23,8 @@ # # ***** END GPL LICENSE BLOCK ***** +remove_cc_flag_unsigned_char() + set(INC Recast/Include Detour/Include |