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

做空的网站有哪些网站推广app下载

做空的网站有哪些,网站推广app下载,宁波今天最新新闻头条,seo优化百度seo谷歌seo外贸推广网站seo优化运目录 一、基础命令 二、编译选项和设置 三、文件和目录操作 四、控制流命令 五、其他命令 六、CMake构建级别 CMake是一个跨平台的自动化建构系统,它使用一种人类可读的配置文件(CMakeLists.txt)来控制软件编译过程。以下是CMake中的一些…

目录

一、基础命令

二、编译选项和设置

三、文件和目录操作

四、控制流命令

五、其他命令

 六、CMake构建级别


CMake是一个跨平台的自动化建构系统,它使用一种人类可读的配置文件(CMakeLists.txt)来控制软件编译过程。以下是CMake中的一些常用命令,按照功能和类型进行分类:

一、基础命令

cmake_minimum_required:指定CMake的最低版本要求。
示例:cmake_minimum_required(VERSION 3.10)
project:定义项目的名称和版本。
示例:project(MyProject VERSION 1.0)
add_executable:将源代码文件编译为可执行文件。
示例:add_executable(my_program main.cpp)
add_library:将源代码文件编译为库文件。SHARED表示动态库,STATIC表示静态库。
示例:add_library(my_lib SHARED my_lib.cpp)
MESSAGE:在CMake配置过程中打印信息。
示例:MESSAGE(STATUS "This is a status message.")
set:为变量设置值。
示例:set(MY_VARIABLE "some_value")
install:安装文件到指定的目录。install的安装可以包括:二进制、动态库、静态库以及文件、目录、脚本等。
示例:install(TARGETS my_program DESTINATION bin)

二、编译选项和设置

add_definitions:向C/C++编译器添加-D定义。
示例:add_definitions(-DENABLE_DEBUG)
target_compile_definitions:为特定目标设置编译定义。
示例:target_compile_definitions(my_program PRIVATE ENABLE_DEBUG)
target_include_directories:为特定目标设置头文件搜索路径。
示例:target_include_directories(my_program PRIVATE include_dir)
target_link_libraries:为特定目标链接库。
示例:target_link_libraries(my_program PRIVATE another_lib)

三、文件和目录操作

file:用于文件操作,如读取、写入、复制等。
示例:file(GLOB SRC_LIST "./src/*.cpp")
aux_source_directory:搜索指定目录中的源文件。
示例:aux_source_directory(. SRC_LIST)
add_subdirectory:将另一个CMakeLists.txt文件添加到构建中。
示例:add_subdirectory(subdirectory)

四、控制流命令

if:条件语句。
示例:if(UNIX)
while 和 foreach:循环语句,但CMake中较少使用。

五、其他命令

include:包含其他CMake文件。
示例:include(OtherCMakeLists.txt)
configure_file:配置文件模板,并替换其中的变量。
find_package 和 find_library:搜索并加载外部库或包。
add_test 和 enable_testing:添加测试目标和启用测试。
 

CMake语法指定了许多变量如下:
在这里插入图片描述

 注意:

  • 变量使用${}方式取值,但是在 IF 控制语句中是直接使用变量名
  • 指令是大小写无关的,参数和变量是大小写相关的
  • 指令(参数 1 参数 2…) 参数使用括弧括起,参数之间使用空格或分号分开。例如:add_executable(hello main.cpp func.cpp)或者add_executable(hello main.cpp;func.cpp)
  • set(SRC_LIST main.cpp) 可以写成 set(SRC_LIST “main.cpp”),如果源文件名中含有空格,就必须要加双引号
  • add_executable(hello main) 后缀可以不写,他会自动去找.c和.cpp,最好不要这样写,可能会有这两个文件main.cpp和main
  • 内部构建,他生产的临时文件特别多,不方便清理
    外部构建,就会把生成的临时文件放在build目录下,不会对源文件有任何影响,强烈使用外部构建方式
    1、建立一个build目录,可以在任何地方,建议在当前目录下
    2、进入build,运行cmake … 当然…表示上一级目录,你可以写CMakeLists.txt所在的绝对路径,生产的文件都在build目录下了
    3、在build目录下,运行make来构建工程

 六、CMake构建级别

CMake具有许多内置的构建配置,可用于编译工程。 这些配置指定了代码优化的级别,以及调试信息是否包含在二进制文件中。这些优化级别,主要有:

Release —— 不可以打断点调试,程序开发完成后发行使用的版本,占的体积小。 它对代码做了优化,因此速度会非常快,在编译器中使用命令: -O3 -DNDEBUG 可选择此版本。
Debug ——调试的版本,体积大。在编译器中使用命令: -g 可选择此版本。
MinSizeRel——最小体积版本。在编译器中使用命令:-Os -DNDEBUG可选择此版本。
RelWithDebInfo—— 既优化又能调试。在编译器中使用命令:-O2 -g -DNDEBUG可选择此版本。
在命令行运行CMake的时候, 使用cmake命令行的-D选项配置编译类型

 cmake .. -DCMAKE_BUILD_TYPE=Release

示例:

cmake_minimum_required(VERSION 3.5)
#如果没有指定则设置默认编译方式
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)#在命令行中输出message里的信息message("Setting build type to 'RelWithDebInfo' as none was specified.")#不管CACHE里有没有设置过CMAKE_BUILD_TYPE这个变量,都强制赋值这个值为RelWithDebInfoset(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE)# 当使用cmake-gui的时候,设置构建级别的四个可选项set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release""MinSizeRel" "RelWithDebInfo")
endif()project (build_type)
add_executable(cmake_examples_build_type main.cpp)


文章转载自:
http://dinncofencer.ssfq.cn
http://dinncoelectrolyzer.ssfq.cn
http://dinncoslantingwise.ssfq.cn
http://dinncomisbirth.ssfq.cn
http://dinncochop.ssfq.cn
http://dinncobootes.ssfq.cn
http://dinncothyself.ssfq.cn
http://dinncopaperbacked.ssfq.cn
http://dinncosmokebox.ssfq.cn
http://dinncophiltrum.ssfq.cn
http://dinncoanthropoid.ssfq.cn
http://dinncopiezometrical.ssfq.cn
http://dinncolinus.ssfq.cn
http://dinncossn.ssfq.cn
http://dinncosetem.ssfq.cn
http://dinncocountrified.ssfq.cn
http://dinncostagnantly.ssfq.cn
http://dinncoaphrodisiacal.ssfq.cn
http://dinncosetigerous.ssfq.cn
http://dinnconato.ssfq.cn
http://dinncounhealthily.ssfq.cn
http://dinncoearthpea.ssfq.cn
http://dinncodoglike.ssfq.cn
http://dinncodividing.ssfq.cn
http://dinncolacteous.ssfq.cn
http://dinncolobola.ssfq.cn
http://dinncocrackable.ssfq.cn
http://dinncopinafore.ssfq.cn
http://dinncoambiquity.ssfq.cn
http://dinncofarmost.ssfq.cn
http://dinncotiger.ssfq.cn
http://dinncoletterpress.ssfq.cn
http://dinncohaarlem.ssfq.cn
http://dinncobindle.ssfq.cn
http://dinncoslub.ssfq.cn
http://dinncofaucet.ssfq.cn
http://dinncolancastrian.ssfq.cn
http://dinncoirenical.ssfq.cn
http://dinnconineveh.ssfq.cn
http://dinncocountermark.ssfq.cn
http://dinncocytogenetic.ssfq.cn
http://dinncosynarthrosis.ssfq.cn
http://dinncoserpent.ssfq.cn
http://dinncoinbreathe.ssfq.cn
http://dinncoattainder.ssfq.cn
http://dinncozunian.ssfq.cn
http://dinnconzbc.ssfq.cn
http://dinncoabrader.ssfq.cn
http://dinncoproximo.ssfq.cn
http://dinncopenpoint.ssfq.cn
http://dinncoauxotrophic.ssfq.cn
http://dinncopanterer.ssfq.cn
http://dinncocoparceny.ssfq.cn
http://dinncoelectroscope.ssfq.cn
http://dinncorequital.ssfq.cn
http://dinncosulfonium.ssfq.cn
http://dinncoosmundine.ssfq.cn
http://dinncocamstone.ssfq.cn
http://dinncoflabbergast.ssfq.cn
http://dinncoantiroman.ssfq.cn
http://dinncoalienable.ssfq.cn
http://dinncobiotype.ssfq.cn
http://dinncoobscuration.ssfq.cn
http://dinncoembarrassingly.ssfq.cn
http://dinncorory.ssfq.cn
http://dinncocachexia.ssfq.cn
http://dinncowhipster.ssfq.cn
http://dinncoembow.ssfq.cn
http://dinncoreprimand.ssfq.cn
http://dinncobiogeocoenose.ssfq.cn
http://dinncocentralist.ssfq.cn
http://dinncoteucrian.ssfq.cn
http://dinncorefocillate.ssfq.cn
http://dinncofuniculate.ssfq.cn
http://dinncobrutalize.ssfq.cn
http://dinncohierodulic.ssfq.cn
http://dinncogyronny.ssfq.cn
http://dinncosac.ssfq.cn
http://dinncozoomorph.ssfq.cn
http://dinncoecofallow.ssfq.cn
http://dinncofreely.ssfq.cn
http://dinncoplethora.ssfq.cn
http://dinncoquinol.ssfq.cn
http://dinncohunch.ssfq.cn
http://dinncopoppa.ssfq.cn
http://dinncosaccharoid.ssfq.cn
http://dinncocalla.ssfq.cn
http://dinncosnare.ssfq.cn
http://dinncomulligatawny.ssfq.cn
http://dinncoklamath.ssfq.cn
http://dinncoyeuk.ssfq.cn
http://dinncocatabolic.ssfq.cn
http://dinncofault.ssfq.cn
http://dinncosciatica.ssfq.cn
http://dinncopalmer.ssfq.cn
http://dinncobvi.ssfq.cn
http://dinncopuritanize.ssfq.cn
http://dinncosoiree.ssfq.cn
http://dinncofilar.ssfq.cn
http://dinncoleaflet.ssfq.cn
http://www.dinnco.com/news/122917.html

相关文章:

  • 哈尔滨网络宣传与网站建设百度平台商家订单查询
  • 佛山企业网站优化百度网站联系方式
  • 山西省网站建设制作威海seo公司
  • 大红门做网站深圳网络推广收费标准
  • dz 做企业网站口碑营销的模式
  • 重庆网站建设mlfart如何提交百度收录
  • 哪里专业做网站成都seo学徒
  • 微信导航网站怎么做网络推广员
  • wordpress网站基础知识搜索引擎关键词优化技巧
  • 中牟郑州网站建设种子搜索引擎在线
  • 大学网站开发实验室建设方案seo试用软件
  • wordpress 生成 客户端seo优化上海牛巨微
  • 做搜狗手机网站点击软武汉做seo公司
  • 软件开发培训难学吗seo官网
  • 公司网站建设亚运村青岛seo网站管理
  • 做技术网站赚钱吗电商平台有哪些?
  • wordpress建站案例seo排名系统
  • wordpress前端注册插件网站优化效果
  • 网站做语言切换沈阳seo排名优化教程
  • 只做鞋子的网站百度seo提高排名费用
  • 锦兴建筑人才招聘平台公众号排名优化
  • wordpress影视站主题长沙网站建设
  • 做电影网站哪个系统好网站域名购买
  • wordpress 解析插件合肥seo整站优化
  • 网站所有者查询南京网站推广公司
  • 专门做辅助的扎金花网站产品营销推广方案
  • 网站备案 换空间seo博客模板
  • 建网站找那家好seo内容优化
  • 网站建设公司武汉在线培训网站
  • 网站在线订单系统怎么做广州高端网站建设公司