[Bf-blender-cvs] [6e9ee13] master: CMake: add fastmath for gcc release flags (OSX had already)
Campbell Barton
noreply at git.blender.org
Tue Mar 11 17:39:48 CET 2014
Commit: 6e9ee13de0cc2f7fdd07398e253c52ed41311fdb
Author: Campbell Barton
Date: Wed Mar 12 03:33:57 2014 +1100
https://developer.blender.org/rB6e9ee13de0cc2f7fdd07398e253c52ed41311fdb
CMake: add fastmath for gcc release flags (OSX had already)
===================================================================
M extern/bullet2/CMakeLists.txt
===================================================================
diff --git a/extern/bullet2/CMakeLists.txt b/extern/bullet2/CMakeLists.txt
index e816952..8358087 100644
--- a/extern/bullet2/CMakeLists.txt
+++ b/extern/bullet2/CMakeLists.txt
@@ -401,12 +401,17 @@ set(SRC
if(CMAKE_COMPILER_IS_GNUCXX)
# needed for gcc 4.6+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
+
+endif()
+
+if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffast-math")
endif()
# Tentative fix for bullet misbehavior (T38746), needs further clarification what flags conflict here
if(APPLE AND CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS '3.4')
set(CMAKE_C_FLAGS_RELEASE "") # c-api uses plain basic flags
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -fPIC -msse3 -mssse3 -ffast-math")
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -fPIC -msse3 -mssse3")
endif()
blender_add_lib(extern_bullet "${SRC}" "${INC}" "${INC_SYS}")
More information about the Bf-blender-cvs
mailing list