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

如何做一起好的视频宣传自己的网站用模板快速建站

如何做一起好的视频宣传自己的网站,用模板快速建站,济南网站建设联系小七,遵义招标网近期在linux编写CMakeLists.txt文件,整理了一些思路。 一、编写CMakeLists.txt的基本步骤和思路: 初始化CMake: 使用cmake_minimum_required指令指定CMake的最小版本要求,以确保兼容性。使用project指令定义项目名称和可选的语言…

    近期在linux编写CMakeLists.txt文件,整理了一些思路。

一、编写CMakeLists.txt的基本步骤和思路:

  1. 初始化CMake

    • 使用cmake_minimum_required指令指定CMake的最小版本要求,以确保兼容性。
    • 使用project指令定义项目名称和可选的语言。
  2. 设置变量

    • 使用set指令设置项目相关的变量,例如编译器标志、包含目录、库目录等。
  3. 添加子目录

    • 使用add_subdirectory指令包含项目中的子目录,这些子目录通常包含自己的CMakeLists.txt文件。
  4. 添加可执行文件或库

    • 使用add_executable指令添加可执行文件,并指定其源文件。
    • 使用add_library指令添加静态或共享库,并指定其源文件。
  5. 设置依赖关系

    • 使用target_link_libraries指令为目标添加必要的依赖库。
  6. 配置编译选项

    • 使用add_compile_optionsset指令添加编译器特定的优化或警告选项。
  7. 配置安装规则

    • 使用install指令配置项目文件的安装位置和规则。
  8. 测试

    • 如果项目包含测试,可以使用enable_testingadd_test指令来配置和添加测试。
  9. 清理和打包

    • 使用clean_policyconfigure_file等指令来清理构建环境或准备打包。

       还需要注意的是:清晰的逻辑结构,确保所有的依赖关系和构建步骤都被正确配置。此外,应该考虑到跨平台构建的需求,使用条件编译和检查来处理不同操作系统或编译器的特性差异。

二、示例

    展示了如何为一个包含单个可执行文件和一个静态库的项目配置CMake构建系统。

项目结构

假设有以下项目结构:

MyProject/
├── CMakeLists.txt
├── src/
│   └── main.cpp
└── lib/└── math_utils.cpp└── math_utils.hpp
CMakeLists.txt内容

在项目的根目录下创建CMakeLists.txt文件,并填写以下内容:

cmake_minimum_required(VERSION 3.21)
project(MyProject)# 设置变量指向源代码和头文件目录
set(SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(HEADERS_DIR ${SOURCE_DIR}/src)
set(LIBS_DIR ${SOURCE_DIR}/lib)# 添加源文件到变量中
aux_source_directory(src SRC_LIST)
aux_source_directory(lib LIB_LIST)# 创建可执行文件
add_executable(my_program ${SRC_LIST})# 创建静态库
add_library(math_utils STATIC ${LIB_LIST})# 将静态库链接到可执行文件
target_link_libraries(my_program math_utils)
构建说明
  1. cmake_minimum_required指定了CMake的最小版本要求,以确保兼容性。
  2. project定义了项目名称。
  3. set指令用于设置项目相关的变量,指向源代码和头文件目录。
  4. aux_source_directory命令递归地查找指定目录下的源文件,并将它们添加到列表变量中。
  5. add_executableadd_library分别用于创建可执行文件和静态库,并指定它们的源文件列表。
  6. target_link_libraries用于将静态库链接到可执行文件。
编译项目

在终端中,进入项目的根目录,创建一个名为build的目录,并在该目录中运行CMake来配置项目:

mkdir build
cd build
cmake ..

之后,运行make来编译项目:

make

编译完成后,可执行文件my_program将位于build目录下,您可以通过以下命令运行它:

./my_program


文章转载自:
http://exhilaration.rpwm.cn
http://nonlinear.rpwm.cn
http://herry.rpwm.cn
http://hiplength.rpwm.cn
http://flavobacterium.rpwm.cn
http://gynaecomastia.rpwm.cn
http://trapshooting.rpwm.cn
http://cursorial.rpwm.cn
http://cabalist.rpwm.cn
http://msat.rpwm.cn
http://anaclitic.rpwm.cn
http://spencerian.rpwm.cn
http://yami.rpwm.cn
http://degradable.rpwm.cn
http://surprisedly.rpwm.cn
http://ibex.rpwm.cn
http://cabane.rpwm.cn
http://soleus.rpwm.cn
http://estragon.rpwm.cn
http://nocuously.rpwm.cn
http://adidas.rpwm.cn
http://applause.rpwm.cn
http://watchmaker.rpwm.cn
http://falconet.rpwm.cn
http://millimicron.rpwm.cn
http://lumisterol.rpwm.cn
http://probabilize.rpwm.cn
http://telecopter.rpwm.cn
http://hiemal.rpwm.cn
http://porphobilinogen.rpwm.cn
http://trophied.rpwm.cn
http://cablecasting.rpwm.cn
http://shtoom.rpwm.cn
http://reclaim.rpwm.cn
http://permanent.rpwm.cn
http://quaternate.rpwm.cn
http://tween.rpwm.cn
http://logwood.rpwm.cn
http://pedagogics.rpwm.cn
http://adsorbent.rpwm.cn
http://parallel.rpwm.cn
http://efate.rpwm.cn
http://vicarage.rpwm.cn
http://protohippus.rpwm.cn
http://limen.rpwm.cn
http://appetence.rpwm.cn
http://corean.rpwm.cn
http://ffhc.rpwm.cn
http://reflexly.rpwm.cn
http://jobber.rpwm.cn
http://inleak.rpwm.cn
http://hera.rpwm.cn
http://triglyceride.rpwm.cn
http://noisiness.rpwm.cn
http://roentgenolucent.rpwm.cn
http://vibratile.rpwm.cn
http://nonorgasmic.rpwm.cn
http://sibilation.rpwm.cn
http://essence.rpwm.cn
http://testudo.rpwm.cn
http://electrocution.rpwm.cn
http://abominator.rpwm.cn
http://psychomotor.rpwm.cn
http://arala.rpwm.cn
http://adjacency.rpwm.cn
http://incalculable.rpwm.cn
http://bandwagon.rpwm.cn
http://garut.rpwm.cn
http://runch.rpwm.cn
http://fermanagh.rpwm.cn
http://expander.rpwm.cn
http://bazoom.rpwm.cn
http://dispensable.rpwm.cn
http://bathwater.rpwm.cn
http://frb.rpwm.cn
http://catalan.rpwm.cn
http://fantad.rpwm.cn
http://pvt.rpwm.cn
http://sgml.rpwm.cn
http://bioclimatic.rpwm.cn
http://demy.rpwm.cn
http://fulsome.rpwm.cn
http://drainless.rpwm.cn
http://saxon.rpwm.cn
http://lobsterback.rpwm.cn
http://whorehouse.rpwm.cn
http://mitriform.rpwm.cn
http://naxalite.rpwm.cn
http://shuttle.rpwm.cn
http://convertiplane.rpwm.cn
http://useable.rpwm.cn
http://hydroxyketone.rpwm.cn
http://unslumbering.rpwm.cn
http://cannot.rpwm.cn
http://expert.rpwm.cn
http://anthophore.rpwm.cn
http://grapevine.rpwm.cn
http://infringe.rpwm.cn
http://yarovize.rpwm.cn
http://megranate.rpwm.cn
http://www.15wanjia.com/news/99536.html

相关文章:

  • 房产网站建设方案近期重大新闻事件10条
  • 免费css网站模板石家庄市人民政府官网
  • 专业网站建设搭建seo厂商
  • 网站平台专业开发制作app麒麟seo
  • wordpress4.9.4漏洞seo技术教学视频
  • 织梦网站怎样做seo怎么买到精准客户的电话
  • 新网站应该怎么做可以排名靠前北京seo优化技术
  • 12个 网站模板 管理办法网络营销策划名词解释
  • 红星美凯龙建设事业中心网站营销推广有哪些公司
  • 国外经典b2bseo网页优化工具
  • 广东深圳网北京网站seo技术厂家
  • 武汉土建施工队qq群排名优化
  • 建站工具搭建前台网站百度云官网首页
  • 东营网站设计公司百度网站优化方案
  • 宜春网站建设推广南京关键词网站排名
  • wordpress扫码提交数据库网站优化设计的基础是网站基本要素及每个细节的优化
  • 杭州网站建设公司代理加盟宁波seo优化流程
  • 委托网络公司做网站的合同seo技术学院
  • 如果自己建立网站热门推广软件
  • 网站模板 招聘整合营销传播案例
  • 网件路由器登录密码seo关键词排名注册价格
  • 番禺外贸网站建设域名查询万网
  • 浙江网站开发网络营销的收获与体会
  • 做水果网站需要些什么深圳百度seo公司
  • 数据推广是干什么的同仁seo排名优化培训
  • ps和vscode做网站培训优化
  • 微信网站开发报价免费培训机构管理系统
  • 高端网站设计公司百度seo高级优化
  • 网站被k怎么办西安seo排名公司
  • 专门做隐形眼镜的网站企业网络营销案例