[x265] cmake: apply -march=i686 for 32bit GCC only if there is no -march in CXXFLAGS
Mateusz
mateuszb at poczta.onet.pl
Thu May 5 13:08:30 CEST 2016
-------------- next part --------------
# HG changeset patch
# User Ma0 <mateuszb at poczta.onet.pl>
# Date 1462446308 -7200
# Thu May 05 13:05:08 2016 +0200
# Node ID e9b1d21b8e32c2bc900d3700997c84bb38982889
# Parent 00ea3784bd36c164c5f799c998d7a09f2cb244bf
cmake: apply -march=i686 for 32bit GCC only if there is no -march in CXXFLAGS
diff -r 00ea3784bd36 -r e9b1d21b8e32 source/CMakeLists.txt
--- a/source/CMakeLists.txt Thu Apr 28 09:59:30 2016 +0200
+++ b/source/CMakeLists.txt Thu May 05 13:05:08 2016 +0200
@@ -181,7 +181,10 @@
add_definitions(-march=native)
endif()
elseif(X86 AND NOT X64)
- add_definitions(-march=i686)
+ string(FIND "${CMAKE_CXX_FLAGS}" "-march" marchPos)
+ if(marchPos LESS "0")
+ add_definitions(-march=i686)
+ endif()
endif()
if(ARM AND CROSS_COMPILE_ARM)
set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm)
More information about the x265-devel
mailing list