当前位置:网站首页>Cmake开发-多目录工程
Cmake开发-多目录工程
2022-06-29 20:09:00 【Wildcraner】
单文件:
第一步:创建CmakeLists.txt文件
第二步:编写CmakeLists
# 设置最小版本
cmake_minimum_required(VERSION 3.0)
# 设置项目名称
project (SWAP)
#设置头文件路径
include_directories( include )
#添加变量
set(TEST_MATH main.cpp src/swap.cpp)
#生成可执行文件
add_executable(swap_02 ${
TEST_MATH})
第三步:运行
# 1. 在当前目录下,创建build文件夹
mkdir build
# 2. 进入到build文件夹
cd build
# 3. 编译上级目录的CMakeLists.txt,生成Makefile和其他文件
cmake ..
# 4. 执行make命令,生成target
make
边栏推荐
- Flume配置3——拦截器过滤
- A great open source image watermarking solution
- data link layer
- Nutch2.1分布式抓取
- Real time tracking of bug handling progress of the project through metersphere and dataease
- 【编译原理】语义分析
- freemarker模板框架生成图片
- Flume理论
- 2021 CCPC 哈尔滨 E. Power and Modulo (思维题)
- [notes] take notes again -- learn by doing Verilog HDL – 008
猜你喜欢
![[compilation principle] type check](/img/fc/458871e2df4e0384f65e09faa909d7.png)
[compilation principle] type check
![[network orientation training] - Enterprise Park Network Design - [had done]](/img/12/17f95378fcc6d0fef15feb99cc4f49.png)
[network orientation training] - Enterprise Park Network Design - [had done]
![[fishing artifact] code tool for lowering the seconds of UI Library -- form part (I) design](/img/ad/0efd744334bf648b149aa1841b58af.png)
[fishing artifact] code tool for lowering the seconds of UI Library -- form part (I) design

畫虎國手孟祥順數字藏品限量發售,隨贈虎年茅臺

Flume configuration 1 - basic case

【Try to Hack】vulnhub narak

.NetCore统一认证授权学习——第一次授权(2)

童年经典蓝精灵之百变蓝爸爸数字藏品中奖名单公布

【编译原理】类型检查

File contains vulnerability
随机推荐
Hangfire详解
Codeforces Global Round 21 C D E
Flume配置1——基础案例
Command execution (RCE) vulnerability
Union find
CorelDRAW最新24.1.0.360版本更新介绍讲解
There is no small green triangle on the method in idea
.NetCore统一认证授权学习——Run(1)
Linux安装MySQL5
Freemaker template framework generates images
lock4j--分布式锁中间件--自定义获取锁失败的逻辑
【译】十二因子应用(四)
数据链路层
[compilation principle] semantic analysis
一次 Keepalived 高可用的事故,让我重学了一遍它!
wangeditor富文本编辑器使用(详细)
How to solve the problem of insufficient memory space in Apple iPhone upgrade system?
How to use filters in jfinal to monitor Druid for SQL execution?
Several policies of Shenzhen Futian District to support investment attraction in 2022
Zotero journal Automatic Matching Update Influencing Factors