Browse Source

For Travis CI - remove the unrecognized flag to keep Travis-CI happy.
Current MinGW version on Ubuntu 12.04 LTS is too old. [ci only: master]

Yao Wei Tjong 姚伟忠 10 years ago
parent
commit
e537dd4467
1 changed files with 8 additions and 2 deletions
  1. 8 2
      CMake/Modules/Urho3D-CMake-common.cmake

+ 8 - 2
CMake/Modules/Urho3D-CMake-common.cmake

@@ -626,8 +626,14 @@ else ()
                     set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mstackrealign")
                     set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mstackrealign")
                 else ()
-                    set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fno-tree-loop-vectorize -fno-tree-slp-vectorize -fno-tree-vectorize")
-                    set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-tree-loop-vectorize -fno-tree-slp-vectorize -fno-tree-vectorize")
+                    if (DEFINED ENV{CI})
+                        # TODO: Remove this workaround when Travis CI VM has been migrated to Ubuntu 14.04 LTS
+                        set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fno-tree-slp-vectorize -fno-tree-vectorize")
+                        set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-tree-slp-vectorize -fno-tree-vectorize")
+                    else ()
+                        set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fno-tree-loop-vectorize -fno-tree-slp-vectorize -fno-tree-vectorize")
+                        set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-tree-loop-vectorize -fno-tree-slp-vectorize -fno-tree-vectorize")
+                    endif ()
                 endif ()
             endif ()
         else ()