summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2014-03-07 18:22:37 +0100
committerworktycho <work.tycho@gmail.com>2014-03-07 18:22:37 +0100
commit95ea0ef43dfbcf2240a0ece70d2829ce63ab0dd3 (patch)
tree35fb674ad309c643071e7484642cb07688a75f8d
parentOnly use fast-math in exes (diff)
downloadcuberite-95ea0ef43dfbcf2240a0ece70d2829ce63ab0dd3.tar
cuberite-95ea0ef43dfbcf2240a0ece70d2829ce63ab0dd3.tar.gz
cuberite-95ea0ef43dfbcf2240a0ece70d2829ce63ab0dd3.tar.bz2
cuberite-95ea0ef43dfbcf2240a0ece70d2829ce63ab0dd3.tar.lz
cuberite-95ea0ef43dfbcf2240a0ece70d2829ce63ab0dd3.tar.xz
cuberite-95ea0ef43dfbcf2240a0ece70d2829ce63ab0dd3.tar.zst
cuberite-95ea0ef43dfbcf2240a0ece70d2829ce63ab0dd3.zip
-rw-r--r--SetFlags.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/SetFlags.cmake b/SetFlags.cmake
index a5bd3a0a2..6a8211fa2 100644
--- a/SetFlags.cmake
+++ b/SetFlags.cmake
@@ -184,8 +184,13 @@ macro(set_exe_flags)
string(REPLACE "-w" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
add_flags_cxx("-Wall -Wextra")
- #we support non-IEEE 754 fpus so can make no guarentees about error
+ # we support non-IEEE 754 fpus so can make no guarentees about error
add_flags_cxx("-ffast-math")
+
+ # clang does not provide the __extern_always_inline macro and a part of libm depends on this when using fast-math
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ add_flags_cxx("-D__extern_always_inline=inline")
+ endif()
endif()
endmacro()