diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-05-19 00:36:32 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-05-19 00:36:32 +0300 |
commit | 89df6720be8c54d56d64cbecd1440945ad6f5e64 (patch) | |
tree | 0f2b651abfb5321e0dc4e24a6c3ec9b79c876c7c | |
parent | 20678138f754bc06d406ed4df7d86613f379e5a0 (diff) |
CMake: use signed char for recastnavigation
External libraries may need char to be signed.
-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 |