diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-03-08 17:18:34 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-03-08 17:44:30 +0900 |
| commit | e4505c9477f442cd834aa079295871ac9b498d7f (patch) | |
| tree | 942507ccbb65082cfa19966eaba4121ccde44c09 /ConfigureChecks.cmake | |
| parent | 0d811e3e031a8c5f8bbdd292e8795bf192ea2454 (diff) | |
| download | k3b-e4505c94.tar.gz k3b-e4505c94.zip | |
Fix detection of MMX capabilities on ix86 archs
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 1a7322da1c4d67bd38c461498126a15dcb014ab0)
Diffstat (limited to 'ConfigureChecks.cmake')
| -rw-r--r-- | ConfigureChecks.cmake | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index c607e06..1bfe83c 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -243,3 +243,38 @@ if( WITH_LAME ) tde_message_fatal( "lame is requested, but was not found on your system" ) endif( ) endif( ) + + +##### check architecture + +if( NOT CMAKE_ARCHITECTURE ) + execute_process( + COMMAND ${CMAKE_C_COMPILER} -dumpmachine + OUTPUT_VARIABLE CMAKE_ARCHITECTURE + ERROR_VARIABLE CMAKE_ARCHITECTURE + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE ) + set( CMAKE_ARCHITECTURE "${CMAKE_ARCHITECTURE}" CACHE INTERNAL "" FORCE ) + message( STATUS "Detected ${CMAKE_ARCHITECTURE} target architecture" ) +endif( ) + + +##### check specific architecture dependant support + +if( ${CMAKE_ARCHITECTURE} MATCHES "i.86" ) + + # MMX support + message( STATUS "Performing MMX support test" ) + check_c_source_compiles( " + int main() { + #if defined(__GNUC__) + __asm__(\"pxor %mm0, %mm0\"); + #else + #error Not gcc on x86/x86_64 + #endif + return 0; + }" + HAVE_X86_MMX + ) + +endif( ) |
