当前位置:网站首页>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
边栏推荐
- lock4j--分布式锁中间件--自定义获取锁失败的逻辑
- Flume configuration 4 - Custom source+sink
- proxmox集群节点崩溃处理
- Union find
- The era of data security solutions
- Application of twelve factors (4)
- Tag based augmented reality using OpenCV
- Nutch2.1分布式抓取
- Flume configuration 1 - basic case
- 一个mysql里有3306端口下,一个mysql有20多个数据库,怎么一键备份20多个数据库,做系统备份,防止数据误删除?
猜你喜欢
【网络方向实训】-企业园区网络设计-【Had Done】
Flume配置1——基础案例
Tiger painter mengxiangshun's digital collection is on sale in limited quantities and comes with Maotai in the year of the tiger
Linux安装MySQL8
日本樱桃一颗拍出1980元天价,网友:吃了有上当的感觉
苹果iPhone手机升级系统内存空间变小不够如何解决?
如何设置 Pod 到指定节点运行
数据链路层
一个超赞的开源的图片去水印解决方案
There is no small green triangle on the method in idea
随机推荐
Hangfire详解
0/1分数规划专题
Startservice() procedure
Chapter II (physical layer)
How to use the configuration in thinkphp5
[compilation principle] type check
How to use filters in jfinal to monitor Druid for SQL execution?
Flume ng configuration
【Try to Hack】vulnhub narak
Oracle保留字查询
Flume-ng配置
La collection numérique Meng xiangshun, artiste national du tigre peint, est disponible en quantité limitée et est offerte avec Maotai de l'année du tigre
Configuration du Flume 4 - source personnalisée + sink
liunx指令
idea中方法上没有小绿色三角
Three.js开发:粗线的画法
Several policies of Shenzhen Futian District to support investment attraction in 2022
Hangfire details
Dynamics crm: among locally deployed servers, sandbox, unzip, VSS, asynchronous and monitor services
剑指 Offer 59 - I. 滑动窗口的最大值