Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Pro-Vzz
carla_cpp
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
dev
Breadcrumbs
carla_cpp
/
CMakeLists.txt
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
18 lines (15 loc) · 1.64 KB
dev
Breadcrumbs
carla_cpp
/
CMakeLists.txt
Copy path
Top
File metadata and controls
Code
Blame
18 lines (15 loc) · 1.64 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 要求 CMake 的最低版本为 3.5.1。这确保了使用的 CMake 功能在指定版本及以上可用。
# 之所以指定这个最低版本,是因为后续构建项目时可能会使用到该版本及以上的 CMake 所提供的特定功能,
# 只有确保 CMake 版本达到要求,才能保证这些功能正常可用,避免因版本过低而出现不兼容或功能缺失等问题
cmake_minimum_required(VERSION 3.5.1)
project(CARLA)
# 设置项目名称为 CARLA。
# 项目名称在整个构建过程中起着关键作用,它会被用于区分和识别与该项目相关联的各种构建目标、
# 源文件以及配置信息等。例如,在后续生成库文件、可执行文件等目标时,会基于这个项目名称来组织和管理它们,
# 同时在配置不同的编译选项、链接选项等过程中,也都是围绕这个项目名称所代表的项目主体来进行操作的。
include("Build/CMakeLists.txt.in")#包含制定路径下的另一个CMake列表文件# 包含指定路径下的另一个 CMake 列表文件,即 "Build/CMakeLists.txt.in"。
# 这样做通常是为了复用一些通用的 CMake 配置代码或者引入额外的构建规则、依赖设置等内容。
# 比如该被包含的文件中可能定义了一些通用的编译选项、源文件分组规则、第三方库的引入方式等,
# 通过包含这个文件,就可以把其中的配置整合到当前的构建体系中来,避免在当前 CMakeLists.txt 文件中重复编写相同的配置代码,
# 使得整个项目的构建配置更加模块化和易于维护。
add_subdirectory("LibCarla/cmake")#将指定目录添加子目录进行处理
You can’t perform that action at this time.