CMake: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
(→‎CMake: Reorganize page to put this wiki's content first, and to better indicate to users where to look)
Line 17: Line 17:
* ''Getting Started With CMake'' Screencasts @[http://playcontrol.net/ewing/screencasts/getting_started_with_cmake_.html PlayControl.net]
* ''Getting Started With CMake'' Screencasts @[http://playcontrol.net/ewing/screencasts/getting_started_with_cmake_.html PlayControl.net]


==Development Topics==
==Reference Material==
* [[CMake Useful Variables|Useful CMake Variables]]
* [https://cmake.org/cmake/help/v3.9/manual/cmake-properties.7.html?highlight=properties List of CMake Properties]
====The CMake Language====
* [https://cmake.org/HTML/syntax.html A quick introduction to CMake syntax]
* [[CMake:VariablesListsStrings| On variables, lists, strings, maps, regexps, etc.]]
* [[CMake/Language Syntax | Language syntax]]
 
==Guides==
====General====
* [[CMake Cross Compiling| Cross compiling]]
* [[CMake Cross Compiling| Cross compiling]]
* [[CMake HowToDoPlatformChecks| How to write platform checks with CMake]]
* [[CMake:How_To_Find_Libraries | How to find libraries]]
* [[CMake:Install Commands| How to install things]]
====Specific====
* [[CMake RPATH handling|RPATH handling]]
* [[CMake RPATH handling|RPATH handling]]
* [[CMake Editors Support|Editors/IDEs with CMake syntax support]]
* [[BuildingWinDLL| How to export symbols from a Windows DLL for the non-Windows Developer]]
* [[RecipeAddSoVersionToDLLs|Appending the SO version to DLLs]]
* [[CMake_Build_Rules | Advanced Usage of CMake Build Rules]]
* [[CMake_Checking_Platform | How to Check the Current Platform]]
==Development Topics==
* [[CMake/Assembler|Assembler Support]]
* [[CMake/Assembler|Assembler Support]]
* [[CMake Editors Support|Editors/IDEs with CMake syntax support]]
* [[CMake Generator Specific Information|Docs for Specific Project Generators]] (Eclipse, KDevelop3, CodeBlocks, Makefile)
* [[CMake Generator Specific Information|Docs for Specific Project Generators]] (Eclipse, KDevelop3, CodeBlocks, Makefile)
* [[CMake User Contributed Macros| Contributed macros]]
* [[CMake User Contributed Macros| Contributed macros]]
Line 43: Line 63:
* [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://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
 
** [https://cmake.org/HTML/syntax.html A quick introduction to CMake syntax]
** [[CMake/Language Syntax | Language syntax]] (wiki page)
** [[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
** [https://brunoabinader.com/how-cmake-simplifies-the-build-process-part-1-basic-build-system Part 1 - Basic build system]
** [https://brunoabinader.com/how-cmake-simplifies-the-build-process-part-1-basic-build-system Part 1 - Basic build system]
Line 54: Line 71:


===Finding stuff and platform checking===
===Finding stuff and platform checking===
* [[CMake HowToDoPlatformChecks| How to write platform checks with CMake]]<br>Describes how to implement platform or configure checks with CMake.


* [[CMake/Tutorials#CMake_Packages|How to package your project for use by others]], create FooConfig.cmake files, and exporting and importing targets.
* [[CMake/Tutorials#CMake_Packages|How to package your project for use by others]], create FooConfig.cmake files, and exporting and importing targets.
* [[CMake:How_To_Find_Libraries | How to find libraries]] <br>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.


* [[CMake:HowToUseExistingOSXFrameworks | How to find and use existing frameworks on OS X]]<br> A quick example to help OS X users find frameworks automatically.
* [[CMake:HowToUseExistingOSXFrameworks | How to find and use existing frameworks on OS X]]<br> A quick example to help OS X users find frameworks automatically.
Line 89: Line 102:
* [[CMake:How To Process Lots Of Input Files | How to process lots of input files with a processor built by CMake]]
* [[CMake:How To Process Lots Of Input Files | How to process lots of input files with a processor built by CMake]]


* [[BuildingWinDLL| How to export symbols from a Windows DLL for the non-Windows Developer]]


* [[VSConfigSpecificSettings| Configuration Specific Settings for Visual Studio Generated Project Files]]
* [[VSConfigSpecificSettings| Configuration Specific Settings for Visual Studio Generated Project Files]]
Line 109: Line 121:
* [[RecipeAddUninstallTarget|Adding an uninstall target to your project]]
* [[RecipeAddUninstallTarget|Adding an uninstall target to your project]]


* [[RecipeAddSoVersionToDLLs|Appending the SO version to DLLs]]


==Converters from other buildsystems to CMake==
==Converters from other buildsystems to CMake==
Line 149: Line 160:
* [[CMake:Experiments With Lua|Experiments With Lua]]
* [[CMake:Experiments With Lua|Experiments With Lua]]
* [[CMake Performance Tips|Performance Tips]]
* [[CMake Performance Tips|Performance Tips]]
* [[CMake:Install Commands| Replacing deprecated INSTALL_FILES, INSTALL_PROGRAMS and INSTALL_TARGETS commands]]
* [[CMake:GNU style example | GNU style directory layout with CMake]]
* [[CMake:GNU style example | GNU style directory layout with CMake]]
* [[CMake:OpenTasks| CMake TODO]]
* [[CMake:OpenTasks| CMake TODO]]

Revision as of 02:18, 20 September 2017

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!

Reference Material

The CMake Language

Guides

General

Specific

Development Topics

Tutorials

Basic Introductions

Finding stuff and platform checking

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]