CMake和CCMake的区别 -- cmake-curses-gui
来源:互联网 发布:哔哩哔哩录制软件 编辑:程序博客网 时间:2024/04/28 18:43
上一篇:“Install CMake”中已经安装好CMake,本文安装CCMake。
自从2年前一起接触了CMake和CCMake这两个概念,一直机械性的重复着使用那一套编译路子。从没仔细研究过这2者有什么区别?今天重装环境,偶然查了会,了解到CCMake is the GUI for manipulating files generated by / used by the cmake system.
网友这么总结:
ccmake is curses (terminal handling library) interface to CMake.
cmake is the CLI (Command Line Interface)
事实上有三个相关概念:
cmake: A command line interface (CLI).
ccmake: An ncurses (terminal) GUI. (only available on Unix-like systems)
cmake-gui: A Qt-based GUI.
cmake is a console program so you need to fire up a console to use it. Then, in the console, switch to your designated build directory. If it doesn't exist yet, create it. The most basic form of calling cmake looks like this:
cmake /path/to/source/dir
cmake stores a lot of configuration settings in the project’s cache. This cache can be viewed and edited using the CMake GUI. This can be quite useful for seeing how a project is configured as the settings are presented in a nice list. You can also change these values so you can set your build type to “Release” to make a release build or you can add specific compiler flags.
Like cmake, ccmake is a console program, but it uses ncurses to make editing the cache variables more accessible. It inherits cmake's command line options, so anything said above about cmake essentially also applies to ccmake. To start, type
ccmake /path/to/source/dir
You will be presented with a ncurses UIwhich lets you edit the contents of the CMake cache. Use the cursor keys to navigate to any variable you want to change, then press Enter. If the variable is boolean, this will switch its state from ON to OFF or vice versa. Otherwise you can type in the new value of the variable and press Enter again to finish your edit. A short help text to each variable is displayed at the bottom in a status bar. Once you are done, press 'c' to reconfigure the build, then press 'g' to generate the native build system and exit ccmake. If you want to quit without generating, press 'q'.
By default, ccmake only displays a part of the available cache variables. Others may be marked as advanced settings and will only be shown to you if you press 't' - this toggles the display of advanced variables.
cmake-gui is a true graphical frontend for CMake, that is you don't have to mess with command line options. Once you've started cmake-gui, it will look similar to the first picture below. The first thing to do is to tell it the location of the source and build directories which is done via the two path selectors at the top.
摘录自:
https://secure.mash-project.eu/wiki/index.php/CMake:_Getting_Started#ccmake
参考:
http://johnlamp.net/cmake-tutorial-3-gui-tool.html (讲的非常好,有空学习、翻译一下)
http://www.itk.org/Wiki/ITK/Configuring_and_Building
CCMake的安装:
CCMake包含在cmake-curses-gui包中,所以安装很简单,已安装完CMake以后,只需执行如下命令:
sudo apt-get install cmake-curses-gui
即可完成CCMake的安装。- CMake和CCMake的区别 -- cmake-curses-gui
- ubuntu下使用ccmake和cmake版本工具实践
- make和cmake的区别
- make和cmake的区别
- cmake和make的区别
- CMAKE 和 MAKE 区别
- cmake和make区别
- cmake和make区别
- CMake和Make之间的区别
- CMake和Make之间的区别-学习
- suse linux安装cmake时ccmake没有安装上的原因
- CMake can't find Curses
- Cmake的介绍和使用 Cmake实践
- Cmake的介绍和使用 Cmake实践
- Cmake的介绍和使用 Cmake实践
- Cmake的介绍和使用 Cmake实践
- Cmake的介绍和使用 Cmake实践
- Cmake的介绍和使用 Cmake实践
- JAVA如何把一个float四舍五入到小数点后2位,4位,或者其它指定位数.
- eclipse adt bundle不显示Android SDK菜单
- ubuntu下firefox汉化
- Android API Guides 之 进程 线程 [译]
- ASP.NET网站支持多语言
- CMake和CCMake的区别 -- cmake-curses-gui
- Spark Streaming的三种运用场景
- Error: The version of SQL Server in use does not support datatype 'datetime2'
- 斯坦福NG机器学习:K-means笔记
- Hive与Hbase结合使用
- 用JAVA 创建自己的 A4 打印语言
- oracle表分区详解
- 面试题积累(转载+经验)
- 学习object-c时遇到的一个问题,报了一大堆的错,半天没头绪.原来是小问题,记载一下