首页 > 其他分享 >Tool-CMake

Tool-CMake

时间:2023-04-12 22:56:56浏览次数:40  
标签:cmake Tool source build https org CMake

Tool-CMake

https://cmake.org/
https://cmake.org/download/
https://cmake.org/documentation/
https://cmake.org/runningcmake/
Book: Mastering CMake 3.1 Edition by Ken Martin (Author), Bill Hoffman (Author)
https://github.com/Kitware/CMake


https://gitlab.kitware.com/cmake/community/-/wikis/home
https://cmake.org/cmake/help/latest/index.html


https://cmake.org/cmake/help/latest/guide/tutorial/index.html

Intro

CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice. The suite of CMake tools were created by Kitware in response to the need for a powerful, cross-platform build environment for open-source projects such as ITK and VTK.
CMake is part of Kitware’s collection of commercially supported open-source platforms for software development.


In the C/C++ ecosystem, the best tool for project configuration is CMake. CMake allows you to specify the build of a project, in files named CMakeLists.txt, with a simple syntax (much simpler than writing Makefiles). From those files, CMake can generate projects for the most popular IDEs and build systems on different OSs. It is a must-have tool. It is the de-facto standard in the industry for the C/C++ multiplatform and even for single OS development.

Building CMake from Scratch

1.UNIX/Mac OSX/MinGW/MSYS/Cygwin
You need to have a C++ compiler (supporting C++11) and a make installed. Run the bootstrap script you find in the source directory of CMake. You can use the --help option to see the supported options. You may use the --prefix=<install_prefix> option to specify a custom installation directory for CMake. Once this has finished successfully, run make and make install.

For example, if you simply want to build and install CMake from source, you can build directly in the source tree:

$ ./bootstrap && make && sudo make install
Or, if you plan to develop CMake or otherwise run the test suite, create a separate build tree:

$ mkdir cmake-build && cd cmake-build
$ ../cmake-source/bootstrap && make

2.Windows
There are two ways for building CMake under Windows:

a.Compile with MSVC from VS 2015 or later. You need to download and install a binary release of CMake. You can get these releases from the CMake Download Page. Then proceed with the instructions below for Building CMake with CMake.

b.Bootstrap with MinGW under MSYS2. Download and install MSYS2. Then install the required build tools:

$ pacman -S --needed git base-devel mingw-w64-x86_64-gcc
and bootstrap as above.

Building CMake with CMake

You can build CMake as any other project with a CMake-based build system: run the installed CMake on the sources of this CMake with your preferred options and generators. Then build it and install it. For instructions how to do this, see documentation on Running CMake.

To build the documentation, install Sphinx and configure CMake with -DSPHINX_HTML=ON and/or -DSPHINX_MAN=ON to enable the "html" or "man" builder. Add -DSPHINX_EXECUTABLE=/path/to/sphinx-build if the tool is not found automatically.

Running CMake

https://cmake.org/runningcmake/

  1. Running CMake for Windows / Microsoft Visual C++ (MSVC)
  2. Running CMake on Unix
  3. Running CMake from the command line
  4. CMake cache

CMake Wiki

https://gitlab.kitware.com/cmake/community/-/wikis/home

CMake Reference Documentation

https://cmake.org/cmake/help/latest/index.html

Command-Line Tools

  • cmake(1)
  • ctest(1)
  • cpack(1)

Interactive Dialogs

  • cmake-gui(1)
  • ccmake(1)

Reference Manuals

  • cmake-buildsystem(7)
  • cmake-commands(7)
  • cmake-compile-features(7)
  • cmake-configure-log(7)
  • cmake-developer(7)
  • cmake-env-variables(7)
  • cmake-file-api(7)
  • cmake-generator-expressions(7)
  • cmake-generators(7)
  • cmake-language(7)
  • cmake-modules(7)
  • cmake-packages(7)
  • cmake-policies(7)
  • cmake-presets(7)
  • cmake-properties(7)
  • cmake-qt(7)
  • cmake-server(7)
  • cmake-toolchains(7)
  • cmake-variables(7)
  • cpack-generators(7)

Guides

  • CMake Tutorial
  • User Interaction Guide
  • Using Dependencies Guide
  • Importing and Exporting Guide
  • IDE Integration Guide

标签:cmake,Tool,source,build,https,org,CMake
From: https://www.cnblogs.com/yongchao/p/17311636.html

相关文章

  • percona-toolkit安装
    ########################yum-yinstallperl-ExtUtils-CBuilderyum-yinstallperl-ExtUtils-MakeMakeryum-yinstallperl-DBD-MySQLtar-xzvfpercona-toolkit-3.5.2_x86_64.tar.gzcdpercona-toolkit-3.5.2perlMakefile.PLmakemakeinstall#默认......
  • Office Tool Plus
    OfficeToolPlus/windows下载链接:https://pan.baidu.com/s/1FFX14Mb83N5nd6fiaUwZog提取码:bzho这是一款支持在线安装并激活Office各个版本的软件,免安装,双击“exe”运行程序即可打开软件。进入软件后,我们只需要点击左侧的“部署”按钮。在此界面中点击“添加产品”按钮选择......
  • 更新 Python 的 setuptools 包
    [......
  • antd 表单里加tooltip不生效问题
    antd的form表单的label后面加一个问号icon,hover展示提示,但是加进去之后,hover不提示,最后发现原因是因为labelCol,不清楚为啥,反正去掉就能提示,加上就不提示,所以最后把这个labelCol去掉了,自己在CSS里写的样式 修改antdform表单自己的样式,需要在global.less文件里写  ......
  • CliToolkit 工具
    目标&背景在游戏开发过程中,通常我们会为了更好的测试、校验逻辑正确性等,开发很多工具,最常见的就是GM1指令,以及一些为运营同学开发的运营工具,如:发送邮件,开启活动等等这样我们就可以将工具分为两大类游戏内建GM指令部分工具可以直接丢进UnityEditor开发运营工具(We......
  • Java:使用hutool工具类UrlBuilder、urlQuery构建url查询参数
    依赖<dependency><groupId>cn.hutool</groupId><artifactId>hutool-all</artifactId><version>5.4.6</version></dependency>url查询参数构建packagecom.example;importcn.hutool.core.net.url.UrlQuery;im......
  • platformio+esp32 编译时下载PACKAGES错误 Tool Manager ERROR
    如图,readtimeoutToolManegerl:Lookingforanothermirror.....  编译时一共需要三个[email protected](2.04)[email protected](3.0.0)[email protected]+2021r2-patch3都存在下载时超时,一直找寻......
  • cmake学习
    -DCMAKE_BUILD_TYPE=Debug和Release有什么区别-DCMAKE_BUILD_TYPE是用于指定CMake构建类型的CMake变量。它有两个常见的值,即"Debug"和"Release",它们分别用于在构建C++/C项目时指定不同的构建类型。区别如下:Debug构建类型:Debug构建类型用于在开发阶段进行调试和测......
  • CMake学习记录——下
    转载来自:https://subingwen.cn/cmake/CMake-advanced/1.嵌套的CMake如果项目很大,或者项目中有很多的源码目录,在通过CMake管理项目的时候如果只使用一个CMakeLists.txt,那么这个文件相对会比较复杂,有一种化繁为简的方式就是给每个源码目录都添加一个CMakeLists.txt文件(头文......
  • ExtJS-UI组件-Toolbar
    ExtJS教程汇总:https://www.cnblogs.com/cqpanda/p/16328016.html转载请注明出处:https://www.cnblogs.com/cqpanda/p/17183638.html更新记录2023年3月6日初始化。说明工具栏。基本使用{xtype:'panel',closable:true,draggable:true,title:'MyB......