diff options
-rw-r--r-- | src/CMakeLists.txt | 8 |
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}") |