Difference between revisions of "CMake"

From KitwarePublic
Jump to: navigation, search
(Basic Introductions: Remove dead link (also couldn't find the blog post in the archive of the new blog at snikt.net))
(13 intermediate revisions by 6 users not shown)
Line 27: Line 27:
 
* [[CMake Platform Dependent Issues|Platform Dependent Information]]
 
* [[CMake Platform Dependent Issues|Platform Dependent Information]]
 
* [[CMake Released Versions|Documentation for previous releases]]
 
* [[CMake Released Versions|Documentation for previous releases]]
 +
* [[CMake Life Cycle Considerations]]
 
* [[CMake Version Compatibility Matrix|Matrix for checking backwards-compatibility of current features]]
 
* [[CMake Version Compatibility Matrix|Matrix for checking backwards-compatibility of current features]]
 +
* [[CMake builtin documentation handling]]
 +
* [http://www.aosabook.org/en/cmake.html The architecture of Open Source Applications - CMake]
  
 
==Tutorials==
 
==Tutorials==
Line 36: Line 39:
 
* [http://clubjuggler.livejournal.com/138364.html CMake: The Cross Platform Build System]
 
* [http://clubjuggler.livejournal.com/138364.html CMake: The Cross Platform Build System]
 
* [http://www.elpauer.org/stuff/learning_cmake.pdf "Learning CMake"] - Slides of a CMake workshop, including CPack, CTest and CDash
 
* [http://www.elpauer.org/stuff/learning_cmake.pdf "Learning CMake"] - Slides of a CMake workshop, including CPack, CTest and CDash
 +
* [https://github.com/TheErk/CMake-tutorial CMake tutorial] - Slides (with LaTeX bearmer source) of a CMake tutorial including CPack, CTest.
 
* [http://www.visgraf.impa.br/seminar/slides/rodlima_cmake_presentation.pdf "CMake: Behind the Scenes of Code Development"] - Slides of an introductory talk/tutorial about CMake and its benefits
 
* [http://www.visgraf.impa.br/seminar/slides/rodlima_cmake_presentation.pdf "CMake: Behind the Scenes of Code Development"] - Slides of an introductory talk/tutorial about CMake and its benefits
* [http://snikt.net/index.php/2010/04/01/howto-use-cmake-with-cc-projects Howto use cmake with C/C++ projects] A simple walk-through about creating a cmake C project including integration of subversion, doxygen and how-to add optional project parts as configurables
 
 
* [http://hackerwithin.org/thw/plugin_wiki/page/buildsystems The Hacker Within: Build Systems] Explains why and how to use build systems with a CMake example.
 
* [http://hackerwithin.org/thw/plugin_wiki/page/buildsystems The Hacker Within: Build Systems] Explains why and how to use build systems with a CMake example.
 
* Syntax of the CMake language
 
* Syntax of the CMake language
Line 44: Line 47:
 
** [[CMake:VariablesListsStrings| On variables, lists, strings, maps, regexps, etc.]]
 
** [[CMake:VariablesListsStrings| On variables, lists, strings, maps, regexps, etc.]]
 
* How CMake simplifies the build process by Bruno Abinader
 
* How CMake simplifies the build process by Bruno Abinader
** [http://cabledogs.org/abinader/2009/12/07/how-cmake-simplifies-the-build-process-part-1-basic-build-system/ Part 1 - Basic build system]
+
** [http://www.bruno.abinader.com.br/2012/04/11/how-cmake-simplifies-the-build-process-part-1-basic-build-system/ Part 1 - Basic build system]
** [http://cabledogs.org/abinader/2009/12/09/how-cmake-simplifies-the-build-process-part-2-advanced-build-system/ Part 2 - Advanced build system]
+
** [http://web.archive.org/web/20101030232202/http://cabledogs.org/abinader/2009/12/09/how-cmake-simplifies-the-build-process-part-2-advanced-build-system/ Part 2 - Advanced build system]
 
* [http://rachid.koucha.free.fr/tech_corner/cmake_manual.html Empirical approach to CMAKE] by Rachid Koucha
 
* [http://rachid.koucha.free.fr/tech_corner/cmake_manual.html Empirical approach to CMAKE] by Rachid Koucha
  
Line 63: Line 66:
  
 
* [http://qtnode.net/wiki?title=Qt_with_cmake Qt with CMake] <br>Explains how to use CMake to build software with Qt4, Qt3 and KDE3.
 
* [http://qtnode.net/wiki?title=Qt_with_cmake Qt with CMake] <br>Explains how to use CMake to build software with Qt4, Qt3 and KDE3.
 +
 +
* [http://mikemcquaid.com/2012/01/deploying-qt-applications-with-deployqt4/ Deploying Qt4 applications with CMake] <br>Explains how to use the DeployQt4.cmake module coming with CMake 2.8.7.
  
 
* [[CMake:How To Build KDE4 Software | How to build KDE4 software with CMake]]
 
* [[CMake:How To Build KDE4 Software | How to build KDE4 software with CMake]]
Line 73: Line 78:
  
 
* [http://www.smslana.eu Building Sms applications with CMake]
 
* [http://www.smslana.eu Building Sms applications with CMake]
 +
 +
* [http://blog.quickforge.co.uk/2011/10/exploration-of-cross-compiling-on-windows-for-arm-linux-distributions/ Cross compiling from Windows to ARM Linux]
  
 
* [[CMakeForFLTK| Using CMake to build an FLTK application]]
 
* [[CMakeForFLTK| Using CMake to build an FLTK application]]
Line 117: Line 124:
  
 
====Visual Studio====
 
====Visual Studio====
* [http://vcproj2cmake.sf.net vcproj2cmake.rb (requires Ruby) SourceForge project] Creates '''and maintains''' CMakeLists.txt files by extracting info from Visual Studio project files. Elaborate script for development side-by-side the updated original static .vcproj files, supports script hooks and powerful definition mappings. Patches and new project members very welcome. Older script versions below:
+
* [http://vcproj2cmake.sf.net vcproj2cmake.rb (requires Ruby) SourceForge project] Creates '''and 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:
 
** [http://www.eskilson.se/vcproj2cmake.rb Original vcproj2cmake.rb version (requires Ruby)]  
 
** [http://www.eskilson.se/vcproj2cmake.rb Original vcproj2cmake.rb version (requires Ruby)]  
 
** Slightly newer version here [http://dgwarp.hd.free.fr/vcproj2cmake.rb vcproj2cmake.rb], see:[[User_talk:Dweeves]] for details
 
** Slightly newer version here [http://dgwarp.hd.free.fr/vcproj2cmake.rb vcproj2cmake.rb], see:[[User_talk:Dweeves]] for details
Line 180: Line 187:
 
===Tutorials===
 
===Tutorials===
 
* [[CMake:Packaging With CPack|Packaging with CPack]]<br>Introduction to CPack, installing and packaging of software.
 
* [[CMake:Packaging With CPack|Packaging with CPack]]<br>Introduction to CPack, installing and packaging of software.
 +
* [https://github.com/TheErk/CMake-tutorial CMake tutorial] - Slides from a CMake tutorial (including LaTeX beamer source) including CPack.
 
* [[CMake:CPackConfiguration|CPack Variables]]<br>
 
* [[CMake:CPackConfiguration|CPack Variables]]<br>
 
* [[CMake:CPackPackageGenerators|Supported package formats]]<br>
 
* [[CMake:CPackPackageGenerators|Supported package formats]]<br>

Revision as of 11:09, 3 April 2013

CMake-logo-download.jpg

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.

You will find here not only documentation for CMake, but also for CPack and CTest.

CMake

Primary Resources - Look here first!

Development Topics

Tutorials

Basic Introductions

Finding stuff and platform checking

  • 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 use CMake with specific Libraries

  • Qt with CMake
    Explains how to use CMake to build software with Qt4, Qt3 and KDE3.

Recipes

Converters from other buildsystems to 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.

qmake

Visual Studio

Basic CMakeLists.txt from-scratch-generator

  • 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

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.

More Information

More Topics

CDash


CPack

Tutorials

Recipes




CMake: [Welcome | Site Map]