cmake 配置arm-linux-gcc 交叉编译环境
来源:互联网 发布:倒序九九乘法表java 编辑:程序博客网 时间:2024/06/04 20:53
1.cmake 官网教程 https://cmake.org/cmake/help/v3.2/manual/cmake-toolchains.7.html?highlight=cmake_c_compiler#cross-compiling-for-linux
2.Cross Compiling
If cmake(1) is invoked with the command line parameter-DCMAKE_TOOLCHAIN_FILE=path/to/file, the file will be loaded early to setvalues for the compilers.TheCMAKE_CROSSCOMPILING variable is set to true when CMake iscross-compiling.
Cross Compiling for Linux
A typical cross-compiling toolchain for Linux has content suchas:
set(CMAKE_SYSTEM_NAME Linux)set(CMAKE_SYSTEM_PROCESSOR arm)set(CMAKE_SYSROOT /home/devel/rasp-pi-rootfs)set(CMAKE_STAGING_PREFIX /home/devel/stage)set(tools /home/devel/gcc-4.7-linaro-rpi-gnueabihf)set(CMAKE_C_COMPILER ${tools}/bin/arm-linux-gnueabihf-gcc)set(CMAKE_CXX_COMPILER ${tools}/bin/arm-linux-gnueabihf-g++)set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
The CMAKE_SYSTEM_NAME is the CMake-identifier of the target platformto build for.
The CMAKE_SYSTEM_PROCESSOR is the CMake-identifier of the target architectureto build for.
The CMAKE_SYSROOT is optional, and may be specified if a sysrootis available.
The CMAKE_STAGING_PREFIX is also optional. It may be used to specifya path on the host to install to. TheCMAKE_INSTALL_PREFIX is alwaysthe runtime installation location, even when cross-compiling.
The CMAKE_<LANG>_COMPILER variables may be set to full paths, or tonames of compilers to search for in standard locations. In cases where CMake doesnot have enough information to extract information from the compiler, theCMakeForceCompiler module can be used to bypass some of the checks.
CMake find_* commands will look in the sysroot, and theCMAKE_FIND_ROOT_PATHentries by default in all cases, as well as looking in the host system root prefix.Although this can be controlled on a case-by-case basis, when cross-compiling, itcan be useful to exclude looking in either the host or the target for particularartifacts. Generally, includes, libraries and packages should be found in thetarget system prefixes, whereas executables which must be run as part of the buildshould be found only on the host and not on the target. This is the purpose oftheCMAKE_FIND_ROOT_PATH_MODE_* variables.
- cmake 配置arm-linux-gcc 交叉编译环境
- 配置 arm-linux-gcc 交叉编译环境
- arm-linux-gcc交叉编译环境的配置
- arm-linux-gcc交叉编译环境的配置
- arm-linux-gcc交叉编译环境的配置
- Linux下配置交叉编译环境arm-none-eabi-gcc
- 建立arm-linux-gcc交叉编译环境
- 建立arm-linux-gcc交叉编译环境
- 建立arm-linux-gcc交叉编译环境
- 建立arm-linux-gcc交叉编译环境
- 建立arm-linux-gcc交叉编译环境
- 建立arm-linux-gcc交叉编译环境
- 搭建arm-linux-gcc交叉编译环境
- 安装交叉编译环境arm-linux-gcc
- arm-linux-gcc交叉编译环境
- 建立arm-linux-gcc交叉编译环境
- eldk arm-linux-gcc 交叉编译环境
- 建立交叉编译环境arm-linux-gcc
- Social and ethical Issues associated with a networked world
- [快速掌握]Node.js模块封装及本地使用以及发布
- 小众创客的狂欢——树莓派
- 奇异值与特征值基础
- 微信小程序培训视频
- cmake 配置arm-linux-gcc 交叉编译环境
- 泰森多边形(Voronoi图)生成算法
- c++使用boost安装时的配置参数
- 仿UC浏览器首页下拉动画及实现分析
- 解决ScrollView和GridListView和ListView滑动冲突方法(二)自定义ListView和GridView
- 欢迎使用CSDN-markdown编辑器
- 使用firefox插件httperrequest,模拟发送及接收Json请求
- nyoj 小学生算术
- ubuntu14.04_cuda8.0_cuDnn5.0_python3.4_gtx750ti_tensorflow