当前位置: 首页 > news >正文

CMake教程-第 8 步:添加自定义命令和生成文件

CMake教程-第 8 步:添加自定义命令和生成文件

  • 1 CMake教程介绍
  • 2 学习步骤
    • Step 1: A Basic Starting Point
    • Step 2: Adding a Library
    • Step 3: Adding Usage Requirements for a Library
    • Step 4: Adding Generator Expressions
    • Step 5: Installing and Testing
    • Step 6: Adding Support for a Testing Dashboard
    • Step 7: Adding System Introspection
    • Step 8: Adding a Custom Command and Generated File
    • Step 9: Packaging an Installer
    • Step 10: Selecting Static or Shared Libraries
    • Step 11: Adding Export Configuration
    • Step 12: Packaging Debug and Release
  • 3 Step 8: Adding a Custom Command and Generated File
    • 3.1 Step 8: Adding a Custom Command and Generated File
    • 3.2 MathFunctions/MakeTable.cmake
    • 3.3 MathFunctions/CMakeLists.txt
    • 3.4 MathFunctions/mysqrt.cxx
    • 3.5 编译
    • 3.6 运行结果

该文档是基于CMake的官方教程翻译而来,并稍微添加了自己的理解:

cmake的官方网站为:CMake Tutorial

1 CMake教程介绍

The CMake tutorial provides a step-by-step guide that covers common build system issues that CMake helps address. Seeing how various topics all work together in an example project can be very helpful.
CMake 教程提供了一个循序渐进的指南,涵盖了 CMake 可帮助解决的常见构建系统问题。在一个示例项目中了解各个主题是如何协同工作的,会非常有帮助。

2 学习步骤

The tutorial source code examples are available in this archive. Each step has its own subdirectory containing code that may be used as a starting point. The tutorial examples are progressive so that each step provides the complete solution for the previous step.
本文档中提供了教程源代码示例。每个步骤都有自己的子目录,其中包含可用作起点的代码。教程示例是循序渐进的,因此每一步都提供了前一步的完整解决方案。

Step 1: A Basic Starting Point

  • Exercise 1 - Building a Basic Project
  • Exercise 2 - Specifying the C++ Standard
  • Exercise 3 - Adding a Version Number and Configured Header File

Step 2: Adding a Library

  • Exercise 1 - Creating a Library
  • Exercise 2 - Adding an Option

Step 3: Adding Usage Requirements for a Library

  • Exercise 1 - Adding Usage Requirements for a Library
  • Exercise 2 - Setting the C++ Standard with Interface Libraries

Step 4: Adding Generator Expressions

  • Exercise 1 - Adding Compiler Warning Flags with Generator Expressions

Step 5: Installing and Testing

  • Exercise 1 - Install Rules
  • Exercise 2 - Testing Support

Step 6: Adding Support for a Testing Dashboard

  • Exercise 1 - Send Results to a Testing Dashboard

Step 7: Adding System Introspection

  • Exercise 1 - Assessing Dependency Availability

Step 8: Adding a Custom Command and Generated File

Step 9: Packaging an Installer

Step 10: Selecting Static or Shared Libraries

Step 11: Adding Export Configuration

Step 12: Packaging Debug and Release

3 Step 8: Adding a Custom Command and Generated File

3.1 Step 8: Adding a Custom Command and Generated File

Suppose, for the purpose of this tutorial, we decide that we never want to use the platform log and exp functions and instead would like to generate a table of precomputed values to use in the mysqrt function. In this section, we will create the table as part of the build process, and then compile that table into our application.
假设在本教程中,我们决定不再使用平台log和 exp 函数,而是想生成一个预计算值表,供 mysqrt 函数使用。在本节中,我们将在构建过程中创建表格,然后将表格编译到应用程序中。

First, let’s remove the check for the log and exp functions in MathFunctions/CMakeLists.txt. Then remove the check for HAVE_LOG and HAVE_EXP from mysqrt.cxx. At the same time, we can remove #include .
首先,删除 MathFunctions/CMakeLists.txt 中对 logexp 函数的检查。然后删除 mysqrt.cxx 中的 HAVE_LOGHAVE_EXP 检查。同时,我们可以删除 #include <cmath>

In the MathFunctions subdirectory, a new source file named MakeTable.cxx has been provided to generate the table.
MathFunctions 子目录中,提供了一个名为 MakeTable.cxx 的新源文件,用于生成表格。

After reviewing the file, we can see that the table is produced as valid C++ code and that the output filename is passed in as an argument.
查看文件后,我们可以看到表格是以有效的 C++ 代码生成的,输出文件名是作为参数传递的。

The next step is to create MathFunctions/MakeTable.cmake. Then, add the appropriate commands to the file to build the MakeTable executable and then run it as part of the build process. A few commands are needed to accomplish this.
下一步是创建 MathFunctions/MakeTable.cmake。然后,在该文件中添加适当的命令来构建 MakeTable 可执行文件,并将其作为构建过程的一部分来运行。为此需要执行几条命令。

First, we add an executable for MakeTable.
首先,我们为 MakeTable 添加一个可执行程序。

MathFunctions/MakeTable.cmake
add_executable(MakeTable MakeTable.cxx)

After creating the executable, we add the tutorial_compiler_flags to our executable using target_link_libraries().
在创建可执行的,我们使用target_link_libraries()添加tutorial_compiler_flags我们的可执行程序.

MathFunctions/MakeTable.cmake
target_link_libraries(MakeTable PRIVATE tutorial_compiler_flags)

Then we add a custom command that specifies how to produce Table.h by running MakeTable.
然后,我们添加一条自定义命令,指定如何通过运行 MakeTable 生成 Table.h

MathFunctions/MakeTable.cmake
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Table.hCOMMAND MakeTable ${CMAKE_CURRENT_BINARY_DIR}/Table.hDEPENDS MakeTable)

Next we have to let CMake know that mysqrt.cxx depends on the generated file Table.h. This is done by adding the generated Table.h to the list of sources for the library SqrtLibrary.
接下来,我们必须让 CMake 知道 mysqrt.cxx 依赖于生成的 Table.h 文件。方法是将生成的 Table.h 添加到 SqrtLibrary 库的源代码列表中。

MathFunctions/CMakeLists.txtadd_library(SqrtLibrary STATICmysqrt.cxx${CMAKE_CURRENT_BINARY_DIR}/Table.h)

We also have to add the current binary directory to the list of include directories so that Table.h can be found and included by mysqrt.cxx.
我们还必须将当前二进制目录添加到包含目录列表中,以便 mysqrt.cxx 可以找到并包含 Table.h

MathFunctions/CMakeLists.txttarget_include_directories(SqrtLibrary PRIVATE${CMAKE_CURRENT_BINARY_DIR})# link SqrtLibrary to tutorial_compiler_flags

As the last step, we need to include MakeTable.cmake at the top of the MathFunctions/CMakeLists.txt.
最后一步,我们需要在 MathFunctions/CMakeLists.txt 文件的顶部加入 MakeTable.cmake

MathFunctions/CMakeLists.txtinclude(MakeTable.cmake)

Now let’s use the generated table. First, modify mysqrt.cxx to include Table.h. Next, we can rewrite the mysqrt function to use the table:
现在让我们使用生成的表。首先,修改 mysqrt.cxx 以包含 Table.h。接下来,我们可以重写 mysqrt 函数以使用表格:

MathFunctions/mysqrt.cxx
double mysqrt(double x)
{if (x <= 0) {return 0;}// use the table to help find an initial valuedouble result = x;if (x >= 1 && x < 10) {std::cout << "Use the table to help find an initial value " << std::endl;result = sqrtTable[static_cast<int>(x)];}// do ten iterationsfor (int i = 0; i < 10; ++i) {if (result <= 0) {result = 0.1;}double delta = x - (result * result);result = result + 0.5 * delta / result;std::cout << "Computing sqrt of " << x << " to be " << result << std::endl;}return result;
}

Run the cmake executable or the cmake-gui to configure the project and then build it with your chosen build tool.
运行 cmake 可执行文件或 cmake-gui 配置项目,然后使用所选的构建工具构建项目。

When this project is built it will first build the MakeTable executable. It will then run MakeTable to produce Table.h. Finally, it will compile mysqrt.cxx which includes Table.h to produce the MathFunctions library.
当这个项目建成时,它将首先编译 MakeTable 可执行程序。然后运行 MakeTable 生成 Table.h。最后,它将编译包含 Table.hmysqrt.cxx 以生成 MathFunctions 库。

Run the Tutorial executable and verify that it is using the table.
运行 Tutorial 可执行文件并验证它是否使用了表格。

3.2 MathFunctions/MakeTable.cmake

# first we add the executable that generates the table
add_executable(MakeTable MakeTable.cxx)target_link_libraries(MakeTable PRIVATE tutorial_compiler_flags)# add the command to generate the source code
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Table.hCOMMAND MakeTable ${CMAKE_CURRENT_BINARY_DIR}/Table.hDEPENDS MakeTable)

3.3 MathFunctions/CMakeLists.txt

include(MakeTable.cmake)add_library(MathFunctions MathFunctions.cxx)# should we use our own math functions
option(USE_MYMATH "Use tutorial provided math implementation" ON)
if (USE_MYMATH)target_compile_definitions(MathFunctions PRIVATE "USE_MYMATH")# library that just does sqrtadd_library(SqrtLibrary STATICmysqrt.cxx${CMAKE_CURRENT_BINARY_DIR}/Table.h)target_include_directories(SqrtLibrary PRIVATE${CMAKE_CURRENT_BINARY_DIR})target_link_libraries(SqrtLibrary PUBLIC tutorial_compiler_flags)target_link_libraries(MathFunctions PRIVATE SqrtLibrary)
endif()# state that anybody linking to us needs to include the current source dir
# to find MathFunctions.h, while we don't.
target_include_directories(MathFunctionsINTERFACE ${CMAKE_CURRENT_SOURCE_DIR})# link our compiler flags interface library
target_link_libraries(MathFunctions PUBLIC tutorial_compiler_flags)# install libs
set(installable_libs MathFunctions tutorial_compiler_flags)
if(TARGET SqrtLibrary)list(APPEND installable_libs SqrtLibrary)
endif()
install(TARGETS ${installable_libs} DESTINATION lib)
# install include headers
install(FILES MathFunctions.h DESTINATION include)

3.4 MathFunctions/mysqrt.cxx

#include "mysqrt.h"
#include "Table.h"#include <iostream>namespace mathfunctions {
namespace detail {
// a hack square root calculation using simple operationsdouble mysqrt(double x)
{if (x <= 0) {return 0;}// use the table to help find an initial valuedouble result = x;if (x >= 1 && x < 10) {std::cout << "Use the table to help find an initial value " << std::endl;result = sqrtTable[static_cast<int>(x)];}// do ten iterationsfor (int i = 0; i < 10; ++i) {if (result <= 0) {result = 0.1;}double delta = x - (result * result);result = result + 0.5 * delta / result;std::cout << "Computing sqrt of " << x << " to be " << result << std::endl;}return result;
}
}
}

3.5 编译

test@test:~/sda3/work/cmake/Step8_build$ cmake ../Step8
-- The C compiler identification is GNU 10.5.0
-- The CXX compiler identification is GNU 10.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/test/sda3/work/cmake/Step8_build
test@test:~/sda3/work/cmake/Step8_build$ 
test@test:~/sda3/work/cmake/Step8_build$ 
test@test:~/sda3/work/cmake/Step8_build$ cmake --build .
[ 11%] Building CXX object MathFunctions/CMakeFiles/MakeTable.dir/MakeTable.cxx.o
[ 22%] Linking CXX executable MakeTable
[ 22%] Built target MakeTable
[ 33%] Generating Table.h
[ 44%] Building CXX object MathFunctions/CMakeFiles/SqrtLibrary.dir/mysqrt.cxx.o
[ 55%] Linking CXX static library libSqrtLibrary.a
[ 55%] Built target SqrtLibrary
[ 66%] Building CXX object MathFunctions/CMakeFiles/MathFunctions.dir/MathFunctions.cxx.o
[ 77%] Linking CXX static library libMathFunctions.a
[ 77%] Built target MathFunctions
[ 88%] Building CXX object CMakeFiles/Tutorial.dir/tutorial.cxx.o
[100%] Linking CXX executable Tutorial
[100%] Built target Tutorial
test@test:~/sda3/work/cmake/Step8_build$

3.6 运行结果

test@test:~/sda3/work/cmake/Step8_build$ ./Tutorial 100
Computing sqrt of 100 to be 50.5
Computing sqrt of 100 to be 26.2401
Computing sqrt of 100 to be 15.0255
Computing sqrt of 100 to be 10.8404
Computing sqrt of 100 to be 10.0326
Computing sqrt of 100 to be 10.0001
Computing sqrt of 100 to be 10
Computing sqrt of 100 to be 10
Computing sqrt of 100 to be 10
Computing sqrt of 100 to be 10
The square root of 100 is 10
test@test:~/sda3/work/cmake/Step8_build$

相关文章:

CMake教程-第 8 步:添加自定义命令和生成文件

CMake教程-第 8 步&#xff1a;添加自定义命令和生成文件 1 CMake教程介绍2 学习步骤Step 1: A Basic Starting PointStep 2: Adding a LibraryStep 3: Adding Usage Requirements for a LibraryStep 4: Adding Generator ExpressionsStep 5: Installing and TestingStep 6: Ad…...

快速入门:Spring Cache

目录 一:Spring Cache简介 二:Spring Cache常用注解 2.1:EnableCaching 2.2: Cacheable 2.3:CachePut 2.4:CacheEvict 三:Spring Cache案例 3.1:先在pom.xml中引入两个依赖 3.2:案例 3.2.1:构建数据库表 3.2.2:构建User类 3.2.3:构建Controller mapper层代码 3.…...

探索音频传输系统:数字声音的无限可能 | 百能云芯

音频传输系统是一项关键的技术&#xff0c;已经在数字时代的各个领域中广泛应用&#xff0c;从音乐流媒体到电话通信&#xff0c;再到多媒体制作。本文将深入探讨音频传输系统的定义、工作原理以及在现代生活中的各种应用&#xff0c;以帮助您更好地了解这一重要技术。 音频传输…...

【C++】-c++的类型转换

&#x1f496;作者&#xff1a;小树苗渴望变成参天大树&#x1f388; &#x1f389;作者宣言&#xff1a;认真写好每一篇博客&#x1f4a4; &#x1f38a;作者gitee:gitee✨ &#x1f49e;作者专栏&#xff1a;C语言,数据结构初阶,Linux,C 动态规划算法&#x1f384; 如 果 你 …...

《论文阅读28》OGMM

一、论文 研究领域&#xff1a; 点云配准 | 有监督 部分重叠论文&#xff1a;Overlap-guided Gaussian Mixture Models for Point Cloud Registration WACV 2023 二、概述 概率3D点云配准方法在克服噪声、异常值和密度变化方面表现出有竞争力的性能。本文将点云对的配准问题…...

忆联分布式数据库存储解决方案,助力MySQL实现高性能、低时延

据艾瑞咨询研究院《2022 年中国数据库研究报告》显示&#xff0c;截止2021年&#xff0c;中国分布式数据库占比达到 20%左右&#xff0c;主要以 MySQL 和 PostgreSQL 为代表的开源数据库为主。MySQL 作为备受欢迎的开源数据库&#xff0c;当前已广泛应用于互联网、金融、交通、…...

网络安全内网渗透之信息收集--systeminfo查看电脑有无加域

systeminfo输出的内容很多&#xff0c;包括主机名、OS名称、OS版本、域信息、打的补丁程序等。 其中&#xff0c;查看电脑有无加域可以快速搜索&#xff1a; systeminfo|findstr "域:" 输出结果为WORKGROUP&#xff0c;可见该机器没有加域&#xff1a; systeminfo…...

MySQL高可用架构学习

MHA&#xff08;Master HA&#xff09;是一款开源的由Perl语言开发的MySQL高可用架构方案。它为MySQL 主从复制架构提供了 automating master failover 功能。MHA在监控到 master 节点故障时&#xff0c;会提升其中拥有最新数据的 slave 节点成为新的 master 节点&#xff0c;在…...

seata的AT模式分析

&#xff08;1&#xff09;AT模式的核心组件&#xff1a; 事务协调器 TC 维护全局和分支事务的状态&#xff1b; 维护全局锁的状态&#xff1b; 接受TM的提交或者回滚命令&#xff0c;联系RM进行分支事务的提交或者回滚。 事务管理者 TM 开启全局事务&#xff0c;向TC申请…...

【算法练习Day22】 组合总和 III电话号码的字母组合

​&#x1f4dd;个人主页&#xff1a;Sherry的成长之路 &#x1f3e0;学习社区&#xff1a;Sherry的成长之路&#xff08;个人社区&#xff09; &#x1f4d6;专栏链接&#xff1a;练题 &#x1f3af;长路漫漫浩浩&#xff0c;万事皆有期待 文章目录 组合总和 III剪枝 电话号码…...

react-------JS对象、数组方法实际应用集合

目录 1、向空对象里添加键值对 2、js在数组对象中添加和删除键值对&#xff08;对象属性&#xff09;的方法 2.1 添加 3、对已有的数据更换键值对的属性名 4、js字符串拼接、数组转字符串 5、从数组中提取元素 1、向空对象里添加键值对 对象的属性可以使用[ ] 或者 . 而…...

AWS SAP-C02教程6--安全

云的安全是一个重要的问题,很多企业不上云的原因就认为云不安全,特别是对安全性要求较高的企业,所以云安全是一个非常广泛且重要的话题,其实在之前章节中的组件都会或多或少讲述与其相关的安全问题,这里也会详细讲一下。本章主要通过讲述一些独立或与安全有关的组件以及网…...

Go学习第一章——开发环境安装以及快速入门(GoLand)

Go开发环境安装以及快速入门 一、环境配置1.1 go开发工具1.2 go sdk下载3.1 go相关命令行 二、快速入门2.1 创建项目2.2 创建.go程序文件2.3.配置 mod 的开启与关闭2.4 用 GoLand 写第一份代码2.5.代码静态检测&#xff08;此部分非必要&#xff09; 三、初步了解3.1 代码解释以…...

大数据学习(14)-Map Join和Common Join

&&大数据学习&& &#x1f525;系列专栏&#xff1a; &#x1f451;哲学语录: 承认自己的无知&#xff0c;乃是开启智慧的大门 &#x1f496;如果觉得博主的文章还不错的话&#xff0c;请点赞&#x1f44d;收藏⭐️留言&#x1f4dd;支持一下博>主哦&#x…...

Docker安装ES7.14和Kibana7.14(无账号密码)

一、Docker安装ES7.14.0 1、下载镜像 docker pull elasticsearch:7.14.0 2、docker安装7.14.0 mkdir -p /usr/local/elasticsearch/config mkdir -p /usr/local/elasticsearch/data chmod 777 -R /usr/local/elasticsearch/ echo "http.host: 0.0.0.0" >> /u…...

Zynq中断与AMP~双核串口环回之PS与PL通信

实现思路&#xff1a; 额外配置&#xff1a;通过PL配置计数器&#xff0c;向CPU0和CPU1发送硬中断。 1.串口中断CPU0&#xff0c;在中断中设置接收设置好字长的数据&#xff0c;如果这些数据的数值符合约定的命令&#xff0c;则关闭硬中断&#xff0c;并将这部分数据存入AxiLi…...

【一:实战开发testng的介绍】

目录 1、主要内容1.1、为啥要做接口测试1.2、接口自动化测试落地过程1.3、接口测试范围1.4、手工接口常用的工具1.5、自动化框架的设计 2、testng自动化测试框架基本测试1、基本注解2、忽略测试3、依赖测试4、超时测试5、异常测试6、通过xml文件参数测试7、通过data实现数据驱动…...

C现代方法(第9章)笔记——函数

文章目录 第9章 函数9.1 函数的定义和调用9.1.1 函数定义9.1.2 函数调用 9.2 函数声明9.3 实际参数9.3.1 实际参数的转换9.3.2 数组型实际参数9.3.3 变长数组形式参数(C99)9.3.4 在数组参数声明中使用static(C99)9.3.5 复合字面量 9.4 return语句9.5 程序终止9.5.1 exit函数 9.…...

【算法练习Day23】 复原 IP 地址子集子集 II

​&#x1f4dd;个人主页&#xff1a;Sherry的成长之路 &#x1f3e0;学习社区&#xff1a;Sherry的成长之路&#xff08;个人社区&#xff09; &#x1f4d6;专栏链接&#xff1a;练题 &#x1f3af;长路漫漫浩浩&#xff0c;万事皆有期待 文章目录 复原 IP 地址子集子集 II总…...

fastadmin框架token验证

在FastAdmin框架中&#xff0c;Token验证是一种常见的身份验证方法&#xff0c;用于确保用户请求的安全性和合法性。本文将介绍如何在FastAdmin框架中实现Token验证。 什么是Token验证&#xff1f; Token验证是一种基于令牌(Token)的身份验证方式。在这种方式下&#xff0c;用…...

CVPR 2025 MIMO: 支持视觉指代和像素grounding 的医学视觉语言模型

CVPR 2025 | MIMO&#xff1a;支持视觉指代和像素对齐的医学视觉语言模型 论文信息 标题&#xff1a;MIMO: A medical vision language model with visual referring multimodal input and pixel grounding multimodal output作者&#xff1a;Yanyuan Chen, Dexuan Xu, Yu Hu…...

多场景 OkHttpClient 管理器 - Android 网络通信解决方案

下面是一个完整的 Android 实现&#xff0c;展示如何创建和管理多个 OkHttpClient 实例&#xff0c;分别用于长连接、普通 HTTP 请求和文件下载场景。 <?xml version"1.0" encoding"utf-8"?> <LinearLayout xmlns:android"http://schemas…...

《Playwright:微软的自动化测试工具详解》

Playwright 简介:声明内容来自网络&#xff0c;将内容拼接整理出来的文档 Playwright 是微软开发的自动化测试工具&#xff0c;支持 Chrome、Firefox、Safari 等主流浏览器&#xff0c;提供多语言 API&#xff08;Python、JavaScript、Java、.NET&#xff09;。它的特点包括&a…...

DBAPI如何优雅的获取单条数据

API如何优雅的获取单条数据 案例一 对于查询类API&#xff0c;查询的是单条数据&#xff0c;比如根据主键ID查询用户信息&#xff0c;sql如下&#xff1a; select id, name, age from user where id #{id}API默认返回的数据格式是多条的&#xff0c;如下&#xff1a; {&qu…...

Spring数据访问模块设计

前面我们已经完成了IoC和web模块的设计&#xff0c;聪明的码友立马就知道了&#xff0c;该到数据访问模块了&#xff0c;要不就这俩玩个6啊&#xff0c;查库势在必行&#xff0c;至此&#xff0c;它来了。 一、核心设计理念 1、痛点在哪 应用离不开数据&#xff08;数据库、No…...

Go 语言并发编程基础:无缓冲与有缓冲通道

在上一章节中&#xff0c;我们了解了 Channel 的基本用法。本章将重点分析 Go 中通道的两种类型 —— 无缓冲通道与有缓冲通道&#xff0c;它们在并发编程中各具特点和应用场景。 一、通道的基本分类 类型定义形式特点无缓冲通道make(chan T)发送和接收都必须准备好&#xff0…...

现有的 Redis 分布式锁库(如 Redisson)提供了哪些便利?

现有的 Redis 分布式锁库&#xff08;如 Redisson&#xff09;相比于开发者自己基于 Redis 命令&#xff08;如 SETNX, EXPIRE, DEL&#xff09;手动实现分布式锁&#xff0c;提供了巨大的便利性和健壮性。主要体现在以下几个方面&#xff1a; 原子性保证 (Atomicity)&#xff…...

AI+无人机如何守护濒危物种?YOLOv8实现95%精准识别

【导读】 野生动物监测在理解和保护生态系统中发挥着至关重要的作用。然而&#xff0c;传统的野生动物观察方法往往耗时耗力、成本高昂且范围有限。无人机的出现为野生动物监测提供了有前景的替代方案&#xff0c;能够实现大范围覆盖并远程采集数据。尽管具备这些优势&#xf…...

【SpringBoot自动化部署】

SpringBoot自动化部署方法 使用Jenkins进行持续集成与部署 Jenkins是最常用的自动化部署工具之一&#xff0c;能够实现代码拉取、构建、测试和部署的全流程自动化。 配置Jenkins任务时&#xff0c;需要添加Git仓库地址和凭证&#xff0c;设置构建触发器&#xff08;如GitHub…...

在RK3588上搭建ROS1环境:创建节点与数据可视化实战指南

在RK3588上搭建ROS1环境:创建节点与数据可视化实战指南 背景介绍完整操作步骤1. 创建Docker容器环境2. 验证GUI显示功能3. 安装ROS Noetic4. 配置环境变量5. 创建ROS节点(小球运动模拟)6. 配置RVIZ默认视图7. 创建启动脚本8. 运行可视化系统效果展示与交互技术解析ROS节点通…...