Browse Source

Fix the version check so the MinGW workaround is applied for >= 6.1.0.
Close #1552.

Yao Wei Tjong 姚伟忠 9 years ago
parent
commit
11f319c2cd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/ThirdParty/Bullet/CMakeLists.txt

+ 1 - 1
Source/ThirdParty/Bullet/CMakeLists.txt

@@ -25,7 +25,7 @@ set (TARGET_NAME Bullet)
 
 
 # Workaround for MinGW 6.1.0 and above where it throws ICE (internal compilation error) when -O3 is used
 # Workaround for MinGW 6.1.0 and above where it throws ICE (internal compilation error) when -O3 is used
 # Also suppress the compilation error caused by narrowing conversion from double to float inside {}
 # Also suppress the compilation error caused by narrowing conversion from double to float inside {}
-if (MINGW AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.1.0)  # 6.1.0 is the last known bad version
+if (MINGW AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.1.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 6.1.0))  # 6.1.0 is the last known bad version
     string (REPLACE -O3 -O2 CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
     string (REPLACE -O3 -O2 CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
     set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-narrowing")
     set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-narrowing")
 endif ()
 endif ()