当前位置:网站首页>Cmake cross compilation
Cmake cross compilation
2022-07-02 11:48:00 【wangzai6378】
The original CMakeLists.txt The contents of the remain unchanged . Add a new file , Such as toolChain.cmake
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_C_COMPILER /opt/tools/cgtools/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER /opt/tools/cgtools/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-g++)
set(CMAKE_CROSSCOMPILING TRUE)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_FIND_ROOT_PATH /opt/tools/cgtools/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/aarch64-none-linux-gnu/lib64
/opt/cross/3rdparty/include
/opt/cross/3rdparty/lib/aarch64)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Executable programs are not just set ROOT_PATH lookup
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # Only in settings ROOT_PATH Find library under
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Only in settings ROOT_PATH Find the header file
Running cmake When it's time to specify TOOLCHAIN_FILE, Such as :cmake -DCMAKE_TOOLCHAIN_FILE=./toolChain.cmake ..
then make that will do
边栏推荐
- C # method of obtaining a unique identification number (ID) based on the current time
- php 二维、多维 数组打乱顺序,PHP_php打乱数组二维数组多维数组的简单实例,php中的shuffle函数只能打乱一维
- Writing contract test cases based on hardhat
- Liftover for genome coordinate conversion
- JS -- take a number randomly from the array every call, and it cannot be the same as the last time
- 从ros1到ros2配置的一些东西
- How to Visualize Missing Data in R using a Heatmap
- 预言机链上链下调研
- R HISTOGRAM EXAMPLE QUICK REFERENCE
- [cloud native] 2.5 kubernetes core practice (Part 2)
猜你喜欢
数据分析 - matplotlib示例代码
Verilog and VHDL signed and unsigned number correlation operations
2022年遭“挤爆”的三款透明LED显示屏
Compilation errors and printout garbled problems caused by Chinese content in vs2019 code
C#多维数组的属性获取方法及操作注意
八大排序汇总
MySQL comparison operator in problem solving
PLC-Recorder快速监控多个PLC位的技巧
[idea] use the plug-in to reverse generate code with one click
GGPUBR: HOW TO ADD ADJUSTED P-VALUES TO A MULTI-PANEL GGPLOT
随机推荐
揭露数据不一致的利器 —— 实时核对系统
vant tabs组件选中第一个下划线位置异常
Writing contract test cases based on hardhat
PLC-Recorder快速监控多个PLC位的技巧
excel表格中选中单元格出现十字带阴影的选中效果
Tdsql | difficult employment? Tencent cloud database micro authentication to help you
The position of the first underline selected by the vant tabs component is abnormal
基于 Openzeppelin 的可升级合约解决方案的注意事项
ESP32音频框架 ESP-ADF 添加按键外设流程代码跟踪
动态内存(进阶四)
Some things configured from ros1 to ros2
Bedtools tutorial
2022年遭“挤爆”的三款透明LED显示屏
Functional interfaces and method references
HOW TO EASILY CREATE BARPLOTS WITH ERROR BARS IN R
Attribute acquisition method and operation notes of C # multidimensional array
Eight sorting summaries
Installation of ROS gazebo related packages
RPA advanced (II) uipath application practice
Develop scalable contracts based on hardhat and openzeppelin (I)