Clion利⽤Cmake指定交叉编译⼯具链ARM
灰心的近义词
# toolChain Setting 0表⽰不编译 1表⽰编译
t(CROSS_COMPILE 0)
IF(CROSS_COMPILE)海鲜过敏
用因为所以造句
t(CMAKE_SYSTEM_NAME “Linux”)
t(CMAKE_SYSTEM_PROCESS “arm”)
t(TOOLCHAIN_DIR "/home/you/M4V2ToolChain/prebuilts/gcc-x64/opt/FriendlyARM/toolchain/6.4-aarch64") # specify the cross compiler
SET(CMAKE_C_COMPILER ${TOOLCHAIN_DIR}/bin/aarch64-linux-gcc)
SET(CMAKE_CXX_COMPILER ${TOOLCHAIN_DIR}/bin/aarch64-linux-g++)
# where is the target environment
SET(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN_DIR}
${TOOLCHAIN_DIR}/include
${TOOLCHAIN_DIR}/lib)
便秘危害# arch for programs in the build host directories (notnecessary)
蜓字怎么组词SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories电脑内存不足
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)确保英语短语
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)有关时间的成语
ENDIF(CROSS_COMPILE)