aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVaughan Lapsley <vlapsley@users.noreply.github.com>2017-04-12 22:54:03 +1000
committersfan5 <sfan5@live.de>2017-05-04 13:24:36 +0200
commitc874bfa5c3057470bd5bbd0391f4e5e4a8376cbf (patch)
tree5b18997ebd874d1153162dc3a39459936b2ef6f4
parent9a9ae7d65c0112f3b3107547505553a07d7e20c3 (diff)
downloadminetest-c874bfa5c3057470bd5bbd0391f4e5e4a8376cbf.tar.gz
minetest-c874bfa5c3057470bd5bbd0391f4e5e4a8376cbf.tar.bz2
minetest-c874bfa5c3057470bd5bbd0391f4e5e4a8376cbf.zip
Remove CMAKE -ffast-math flag from OSX/FreeBSD
Fixes issue: #4274 I have tested on MacOS 10.12.4 Requires testing on: FreeBSD, Windows and Linux which I do not have access to.
-rw-r--r--src/CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7f779db10..4c705cec8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -753,12 +753,12 @@ else()
set(OTHER_FLAGS "${OTHER_FLAGS} -mthreads -fexceptions")
endif()
- set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${RELEASE_WARNING_FLAGS} ${WARNING_FLAGS} ${OTHER_FLAGS} -ffast-math -Wall -pipe -funroll-loops")
- if(APPLE)
+ set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${RELEASE_WARNING_FLAGS} ${WARNING_FLAGS} ${OTHER_FLAGS} -Wall -pipe -funroll-loops")
+ if(CMAKE_SYSTEM_NAME MATCHES "(Darwin|FreeBSD)")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Os")
else()
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -fomit-frame-pointer")
- endif(APPLE)
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -ffast-math -fomit-frame-pointer")
+ endif(CMAKE_SYSTEM_NAME MATCHES "(Darwin|FreeBSD)")
set(CMAKE_CXX_FLAGS_SEMIDEBUG "-g -O1 -Wall -Wabi ${WARNING_FLAGS} ${OTHER_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wabi ${WARNING_FLAGS} ${OTHER_FLAGS}")