diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 13474dd..593f418 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,10 +87,10 @@ if(NOT CMAKE_CROSSCOMPILING) if(NOT GCC_MARCH_NATIVE_FLAG_SUPPORTED) # Fallback trying generic ARMv7 - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS_SAVE} -march=armv7") - check_c_source_runs("${TEST_SOURCE_CODE}" GCC_MARCH_ARMV7_FLAG_SUPPORTED) + set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS_SAVE} -march=armv7-a") + check_c_source_runs("${TEST_SOURCE_CODE}" GCC_MARCH_ARMV7A_FLAG_SUPPORTED) - if(NOT GCC_MARCH_ARMV7_FLAG_SUPPORTED) + if(NOT GCC_MARCH_ARMV7A_FLAG_SUPPORTED) # Fallback trying generic ARMv6 set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS_SAVE} -march=armv6") check_c_source_runs("${TEST_SOURCE_CODE}" GCC_MARCH_ARMV6_FLAG_SUPPORTED) @@ -100,14 +100,17 @@ if(NOT CMAKE_CROSSCOMPILING) set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE}) else() message("FFTS is build using 'march=armv6'") + set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -march=armv6") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv6") endif(NOT GCC_MARCH_ARMV6_FLAG_SUPPORTED) else() - message("FFTS is build using 'march=armv7'") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv7") - endif(NOT GCC_MARCH_ARMV7_FLAG_SUPPORTED) + message("FFTS is build using 'march=armv7-a'") + set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -march=armv7-a") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv7-a") + endif(NOT GCC_MARCH_ARMV7A_FLAG_SUPPORTED) else() message("FFTS is build using 'march=native'") + set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -march=native") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native") endif(NOT GCC_MARCH_NATIVE_FLAG_SUPPORTED) @@ -164,11 +167,13 @@ if(NOT CMAKE_CROSSCOMPILING) message(WARNING "FFTS is using 'soft' FPU") else() message("FFTS is using 'vfp' FPU") + set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -mfpu=vfp") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=vfp") set(ENABLE_VFP ON) endif(NOT VFP_SUPPORTED) else() message("FFTS is using 'neon' FPU") + set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -mfpu=neon") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon") set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS_SAVE} -mfpu=neon") set(ENABLE_NEON ON) @@ -194,10 +199,12 @@ if(NOT CMAKE_CROSSCOMPILING) message(WARNING "FFTS is using 'soft' float ABI") else() message("FFTS is using 'softfp' float ABI") + set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -mfloat-abi=softfp") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfloat-abi=softfp") endif(NOT SOFTFP_SUPPORTED) else() message("FFTS is using 'hard' float ABI") + set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -mfloat-abi=hard") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfloat-abi=hard") endif(NOT HARDFP_SUPPORTED) endif(NEON_SUPPORTED OR VFP_SUPPORTED) |