Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix "INFO-march=i686 flag not accepted"

  • Loading branch information...
commit ac0269a5e109161dd6974a6f1b2b55d2f00b6983 1 parent 760ee28
jK authored
Showing with 11 additions and 11 deletions.
  1. +1 −1  CMakeLists.txt
  2. +10 −10 rts/build/cmake/TestCXXFlags.cmake
View
2  CMakeLists.txt
@@ -195,7 +195,7 @@ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
set (MARCH_FLAG CACHE STRING "CPU optimization (use i686 for generic optimization)")
else (CMAKE_SIZEOF_VOID_P EQUAL 8)
message (STATUS "Building Spring for 32bit environment")
- set (MARCH_FLAG ${I686_FLAG} CACHE STRING "CPU optimization (use i686 for generic optimization)")
+ set (MARCH_FLAG ${MARCH} CACHE STRING "CPU optimization (use i686 for generic optimization)")
endif (CMAKE_SIZEOF_VOID_P EQUAL 8)
if ($ENV{CXX} MATCHES "icpc")
View
20 rts/build/cmake/TestCXXFlags.cmake
@@ -26,7 +26,7 @@ If (NOT DEFINED VISIBILITY_HIDDEN)
EndIf (HAS_VISIBILITY_HIDDEN)
EndIf (NOT MINGW AND NOT APPLE)
EndIf (NOT DEFINED VISIBILITY_HIDDEN)
-
+
If (NOT DEFINED VISIBILITY_INLINES_HIDDEN)
Set(VISIBILITY_INLINES_HIDDEN "")
@@ -87,13 +87,13 @@ If (NOT DEFINED LTO_FLAGS)
EndIf (LTO AND LTO_WHOPR)
EndIf (NOT DEFINED LTO_FLAGS)
-IF (NOT DEFINED I686_FLAG)
- CHECK_CXX_ACCEPTS_FLAG("-march i686" HAS_I686_FLAG)
- IF (HAS_I686_FLAG)
- Set(HAS_I686_FLAG "-march i686")
- Else (HAS_I686_FLAG)
- Message(INFO "-march i686 flag not accepted")
- Set(I686_FLAG "")
- EndIf (HAS_I686_FLAG)
-EndIf (NOT DEFINED I686_FLAG)
+IF (NOT DEFINED MARCH)
+ CHECK_CXX_ACCEPTS_FLAG("-march=i686" HAS_I686_FLAG_)
+ IF (HAS_I686_FLAG_)
+ Set(MARCH "i686")
+ Else (HAS_I686_FLAG_)
+ Message(INFO "-march=i686 flag not accepted")
+ Set(MARCH "")
+ EndIf (HAS_I686_FLAG_)
+EndIf (NOT DEFINED MARCH)
Please sign in to comment.
Something went wrong with that request. Please try again.