Permalink
Browse files

Fix clang bug in CMakeLists.txt

Courtesy of hasufell
  • Loading branch information...
1 parent a3df73c commit 6fe3c166aef2c176fb39e146b3b2751d8b897e19 @dorkster dorkster committed Apr 1, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 CMakeLists.txt
View
@@ -8,7 +8,10 @@ Set (VERSION "0.18")
# Default definitions
if (NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wunused -Wshadow -Woverloaded-virtual -Wunreachable-code")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-math-errno -fno-exceptions -ffast-math")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-math-errno -fno-exceptions")
+ if (NOT CMAKE_CXX_COMPILER MATCHES "clang")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math")
+ endif (NOT CMAKE_CXX_COMPILER MATCHES "clang")
set(CMAKE_LD_FLAGS "-fwhole-program")
endif (NOT MSVC)

0 comments on commit 6fe3c16

Please sign in to comment.