fix undefined-behavior src/pid_fuzzy.c:119:25
[liba.git] / cmake / UseArmNoneEabi.cmake
blobde863efb51276d6eb62a60c4d449d64183018ac6
1 set(CMAKE_SYSTEM_NAME Generic)
2 set(CMAKE_SYSTEM_PROCESSOR arm)
3 set(CMAKE_TOOLCHAIN_PREFIX arm-none-eabi)
4 set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
5 find_program(CMAKE_AR ${CMAKE_TOOLCHAIN_PREFIX}-gcc-ar)
6 find_program(CMAKE_C_COMPILER ${CMAKE_TOOLCHAIN_PREFIX}-gcc)
7 find_program(CMAKE_CXX_COMPILER ${CMAKE_TOOLCHAIN_PREFIX}-g++)
8 find_program(CMAKE_RANLIB ${CMAKE_TOOLCHAIN_PREFIX}-gcc-ranlib)
9 set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER} -x assembler-with-cpp)
10 set(CMAKE_C_FLAGS_DEBUG_INIT "-fdata-sections -ffunction-sections")
11 set(CMAKE_CXX_FLAGS_DEBUG_INIT "-fdata-sections -ffunction-sections")
12 set(CMAKE_C_FLAGS_RELEASE_INIT "-fdata-sections -ffunction-sections")
13 set(CMAKE_CXX_FLAGS_RELEASE_INIT "-fdata-sections -ffunction-sections")
14 set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-fdata-sections -ffunction-sections")
15 set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-fdata-sections -ffunction-sections")
16 set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-fdata-sections -ffunction-sections")
17 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-fdata-sections -ffunction-sections")
18 set(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--gc-sections")
19 find_program(CMAKE_SIZE ${CMAKE_TOOLCHAIN_PREFIX}-size)
20 find_program(CMAKE_DEBUGER ${CMAKE_TOOLCHAIN_PREFIX}-gdb)
21 find_program(CMAKE_OBJCOPY ${CMAKE_TOOLCHAIN_PREFIX}-objcopy)
22 find_program(CMAKE_OBJDUMP ${CMAKE_TOOLCHAIN_PREFIX}-objdump)
23 find_program(CMAKE_CPPFILT ${CMAKE_TOOLCHAIN_PREFIX}-c++filt)
24 get_filename_component(CMAKE_FIND_ROOT_PATH "${CMAKE_C_COMPILER}" DIRECTORY)
25 get_filename_component(CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH}" DIRECTORY)
26 if(EXISTS "${CMAKE_FIND_ROOT_PATH}/lib/${CMAKE_TOOLCHAIN_PREFIX}")
27   set(CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH}/lib/${CMAKE_TOOLCHAIN_PREFIX}")
28 elseif(EXISTS "${CMAKE_FIND_ROOT_PATH}/${CMAKE_TOOLCHAIN_PREFIX}")
29   set(CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH}/${CMAKE_TOOLCHAIN_PREFIX}")
30 endif()
31 set(CMAKE_INSTALL_PREFIX ${CMAKE_FIND_ROOT_PATH} CACHE PATH
32   "Install path prefix, prepended onto install directories."
34 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
35 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
36 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
37 set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
38 if(CMAKE_TOOLCHAIN_FILE)
39 endif()