kfr

Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)
Log | Files | Refs | README

arm.cmake (1535B)


      1 # For internal use only
      2 
      3 set(TGT_TRIPLET arm-linux-gnueabihf)
      4 
      5 set(CMAKE_SYSTEM_NAME Linux)
      6 set(CMAKE_SYSTEM_VERSION 1)
      7 set(UNIX True)
      8 set(ARM True)
      9 
     10 set(CMAKE_SYSTEM_PROCESSOR arm)
     11 set(EMULATOR qemu-arm)
     12 set(QEMU_LD_PREFIX "/usr/${TGT_TRIPLET}/" CACHE INTERNAL "")
     13 list(APPEND EMULATOR "-L")
     14 list(APPEND EMULATOR ${QEMU_LD_PREFIX})
     15 
     16 if (NOT CLANG_SUFFIX)
     17     set(CLANG_SUFFIX "")
     18 endif ()
     19 
     20 set(CMAKE_CXX_COMPILER
     21     /usr/bin/clang++${CLANG_SUFFIX}
     22     CACHE INTERNAL "Clang")
     23 set(CMAKE_C_COMPILER
     24     /usr/bin/clang${CLANG_SUFFIX}
     25     CACHE INTERNAL "Clang")
     26 set(CMAKE_CXX_COMPILER_TARGET
     27     ${TGT_TRIPLET}
     28     CACHE INTERNAL "Clang target")
     29 set(CMAKE_C_COMPILER_TARGET
     30     ${TGT_TRIPLET}
     31     CACHE INTERNAL "Clang target")
     32 
     33 set(ARM_ROOT "/usr/${TGT_TRIPLET}/include")
     34 if (NOT GCC_VER)
     35     set(GCC_VER 7.5.0)
     36 endif ()
     37 set(SYS_PATHS
     38     "-isystem ${ARM_ROOT}/c++/${GCC_VER} -isystem ${ARM_ROOT}/c++/${GCC_VER}/backward -isystem ${ARM_ROOT}/c++/${GCC_VER}/${TGT_TRIPLET} -isystem ${ARM_ROOT}"
     39 )
     40 
     41 set(ARM_COMMON_FLAGS
     42     "-target ${TGT_TRIPLET} -mcpu=cortex-a15 -mfpu=neon-vfpv4 -mfloat-abi=hard")
     43 
     44 set(CMAKE_CXX_FLAGS
     45     "${SYS_PATHS} ${ARM_COMMON_FLAGS}"
     46     CACHE STRING "")
     47 set(CMAKE_C_FLAGS
     48     " ${SYS_PATHS} ${ARM_COMMON_FLAGS}"
     49     CACHE STRING "")
     50 
     51 set(CMAKE_CXX_LINK_FLAGS " ${ARM_COMMON_FLAGS} ${CMAKE_CXX_LINK_FLAGS}")
     52 set(CMAKE_C_LINK_FLAGS " ${ARM_COMMON_FLAGS} ${CMAKE_C_LINK_FLAGS}")
     53 
     54 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
     55 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
     56 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)