CMake ![CMake-logo-download.jpg](https://i-blog.csdnimg.cn/blog_migrate/57fb112210cbfb426aea9ced760f3f42.jpeg)
Welcome to CMake, the cross-platform, open-source make system. CMake is used to control the software compilation process using simple platform and compiler independent configuration files. CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice. CMake is quite sophisticated: it is possible to support complex environments requiring system configuration, pre-processor generation, code generation, and template instantiation.
欢迎光临CMake,一个跨平台,开源的make系统。CMake用于使用简洁的平台和编译器无关配置文件来控制软件编译过程。CMake生成本地makefiles和工作空间,它们能被用于逆所选择的编译环境。CMake十分精巧:它可用于支持复杂环境,这些环境要求系统配置,预处理发生器,代码发生器以及模版实例化。
You will find here not only documentation for CMake, but also for CPack and CTest.
在此你不仅能找到用于CMake的文档,也可以找到CPack和CTEST的文档。
Contents目录
CMake
Primary Resources - Look here first!基本资源-首先看此处
- Where can I download CMake?
- CMake Documentation
- Useful CMake Variables
- FAQ (Frequently asked questions)
- CMake Mailing List (for searchable archives seeCMake FAQ )
- CMake 2.6 Notes
- Getting Started With CMake Screencasts @PlayControl.net
Development Topics开发主题
- Cross compiling
- RPATH handling
- Assembler Support
- Editors/IDEs with CMake syntax support
- Docs for Specific Project Generators (Eclipse, KDevelop3, CodeBlocks, Makefile)
- Contributed macros
- Module Maintainers
- Platform Dependent Information
- Current CMake Version ChangeLog
- Documentation for previous releases
- CMake Life Cycle Considerations
- Matrix for checking backwards-compatibility of current features
- CMake builtin documentation handling
- The architecture of Open Source Applications - CMake
Tutorials
Basic Introductions基本介绍
- A Simple CMake Example
- Cross-Platform Software Development Using CMake
- CMake: The Cross Platform Build System
- "Learning CMake" - Slides of a CMake workshop, including CPack, CTest and CDash
- CMake tutorial - Slides (with LaTeX bearmer source) of a CMake tutorial including CPack, CTest.
- "CMake: Behind the Scenes of Code Development" - Slides of an introductory talk/tutorial about CMake and its benefits
- The Hacker Within: Build Systems Explains why and how to use build systems with a CMake example.
- Syntax of the CMake language
- How CMake simplifies the build process by Bruno Abinader
- Empirical approach to CMAKE by Rachid Koucha
- Minimal examples (wiki page)
Finding stuff and platform checking 查找素材和平台检查
- How to write platform checks with CMake
Describes how to implement platform or configure checks with CMake.
- How to package your project for use by others, create FooConfig.cmake files, and exporting and importing targets.
- How to find libraries
Describes how to use external libraries in a CMake project and how to write your own find modules for libraries that don't already have one.
- How to find and use existing frameworks on OS X
A quick example to help OS X users find frameworks automatically.
How to use CMake with specific Libraries 如何使用带有特定库的CMake
- Qt with CMake
Explains how to use CMake to build software with Qt4, Qt3 and KDE3.
- Deploying Qt4 applications with CMake
Explains how to use the DeployQt4.cmake module coming with CMake 2.8.7.
- How to use CMake to create Matlab MEX files
Describes how to use CMake when developing Matlab Executable (MEX) files for use with The Mathworks Matlab scripting language.
Recipes秘诀
Converters from other buildsystems to CMake 从别的构建系统到CMake的转换器
All converters listed here are not "complete", i.e. the generated CMake files are not 100% finished, in all cases some work is left for the developer.
automake/autotools/autoconf
- am2cmake (requires Ruby)Converts automake/autotools/libtool based projects to CMake, specialized in converting from KDE 3 to KDE 4, should also work for others. This one has been used for converting the KDE buildsystem to CMake.
- Alternative Automake2CMake (requires PHP) Converts KDevelop projects that use automake to CMake.
qmake
- qmake converter (requires Ruby) Converts projects that use Qt's qmake.
Visual Studio
- vcproj2cmake.rb (requires Ruby) SourceForge project Createsand maintains CMakeLists.txt files by extracting info from Visual Studio project files (.vcproj/.vcxproj). Elaborate script for development side-by-side the updated original static .vc[x]proj files, supports script hooks and powerful definition mappings. Patches and new project members very welcome. Older script versions below:
- Original vcproj2cmake.rb version (requires Ruby)
- Slightly newer version here vcproj2cmake.rb, see:User_talk:Dweeves for details
- vcproj2cmake.ps1(PowerShell version) Creates CMakeLists.txt. it supports vcproj configuration and detect 'exclude from build' option
- folders4cmake (requires Java) Use Visual Studio project files to generate corresponding "source_group" information that you can use inside your own CMake scripts. Supports Visual Studio 9/10 project files (full round-trip possible).
Basic CMakeLists.txt from-scratch-generator
来自刮擦发生器的基本CMakeLists.txt
- gencmake (requires Ruby)Creates basic CMakeLists.txt files from looking at the existing files.
- CMakeListGenerator (Win32)Creates complete CMakeLists.txt files as described in the README using a combination of file and directory structure analysis. Supports resolving dependencies between multiple archives.
Success Stories成功故事
More Topics更多主题
- Fortran Issues
- Generating dependency graphs with CMake
- Experiments With Lua
- Performance Tips
- Replacing deprecated INSTALL_FILES, INSTALL_PROGRAMS and INSTALL_TARGETS commands
- GNU style directory layout with CMake
- CMake TODO
- Creating Qt Assistant Docs
- Writing FindXXX.cmake modules that work with static libraries
- Writing FindXXX.cmake modules that work when multiple versions of packages are installed
- CMake:Improving Find* Modules
- C Plugins for Loadable Commands
For anyone who wonders what the load_command command is for. - PC-Lint support for CMake
CTest
Tutorials教程
- Testing With CTest
Introduces to testing with CTest, submitting dashboards, and using CMake to add tests to the test system.
- CTest Scripting
Describes the scripting with CTest which can significantly simplify and automate testing and submitting dashboards.
- Generating Input Files For CTest
Describe more in details the concepts behind testing with CTest and also explans how to use CTest without using CMake.
- Buildmanagement With CTest
Describes how to setup a central configuration for all CTest scripts.
More Information更多信息
- Configuring CTest Submission Methods
- CTest Nightly, Experimental, Continuous, ...
- CTest:Coverage
- Media:CTest Running Modes.pdf
- CTest Frequently asked questions
More Topics更多主题
CDash
CPack
Tutorials教程
- Packaging with CPack
Introduction to CPack, installing and packaging of software. - CMake tutorial - Slides from a CMake tutorial (including LaTeX beamer source) including CPack.
- CPack Variables
- Supported package formats
- CPack Win32 Newbie Checklist
- Component Install With CPack