From d97494afea573d5ae2c886d3d8a03f9f20b6d57b Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Fri, 8 Jan 2016 10:18:16 +0200 Subject: [PATCH] - fixed: check for MMX availability the check was using C compiler flags instead of C++ which led to test failure for 32-bit Intel targets, at least on Linux with GCC --- src/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2b27aa95b..5b762de70 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -453,17 +453,17 @@ endif( SSE_MATTERS ) if( X64 ) set( HAVE_MMX 1 ) else( X64 ) - set( SAFE_CMAKE_C_FLAGS ${CMAKE_C_FLAGS} ) + set( SAFE_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ) if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE ) - set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmmx") + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmmx") endif( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE ) CHECK_CXX_SOURCE_COMPILES("#include int main(void) { __m64 v = _m_from_int(0); }" HAVE_MMX) - set( CMAKE_C_FLAGS ${SAFE_CMAKE_C_FLAGS} ) + set( CMAKE_CXX_FLAGS ${SAFE_CMAKE_CXX_FLAGS} ) endif( X64 ) # Set up flags for GCC