[Bf-blender-cvs] [f2ed56f] compositor-2016: CMake: use signed char for recastnavigation
Campbell Barton
noreply at git.blender.org
Wed Jun 8 21:48:03 CEST 2016
Commit: f2ed56f235f21ac70795641f7abd306cf00d7da3
Author: Campbell Barton
Date: Thu May 19 07:36:32 2016 +1000
Branches: compositor-2016
https://developer.blender.org/rBf2ed56f235f21ac70795641f7abd306cf00d7da3
CMake: use signed char for recastnavigation
External libraries may need char to be signed.
===================================================================
M build_files/cmake/macros.cmake
M extern/recastnavigation/CMakeLists.txt
===================================================================
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 7f19e22..239371c 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 b90a36c..19ac6e9 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
More information about the Bf-blender-cvs
mailing list