Difference between revisions of "CMake"

From HPC Wiki
Jump to navigation Jump to search
Line 1: Line 1:
'cmake' is not 'make' but use it!
+
CMake is an open-source cross-platform build system generator.
  
CMake is an open-source cross-platform build system generator. It is especially useful if an application depends on several other directories (e.g. libraries) in addition to code or if certain parts need to be compiled and linked in a specific order. The build process is controlled by CMakeLists.txt files which consist of commands and arguments and must be present in all directories, including subdirectories. It is possible to use both predefined and custom commands.
+
__TOC__
  
Further information aswell as tutorials are available on the [https://cmake.org/ CMake website].
+
== General ==
 +
Cmake is especially useful if an application depends on several other directories (e.g. libraries) in addition to code or if certain parts need to be compiled and linked in a specific order. The build process is controlled by CMakeLists.txt files which consist of commands and arguments and must be present in all directories, including subdirectories. It is possible to use both predefined and custom commands.
 +
 
 +
== Usage on the RWTH Cluster ==
 +
 
 +
In order to modify the settings for the build process in an interactive GUI, change to the "build" directory of your project and execute the following command:
 +
 
 +
ccmake .
 +
 
 +
This will give you an overview of all arguments for the build process in alphabetical order. You can edit an option by pressing [enter]. Afterwards, make sure to configure your settings by pressing [c] and then [g] to generate, so that your changes will go into effect during the next build process.
 +
 
 +
== References ==
 +
[https://cmake.org/ CMake website].

Revision as of 09:34, 11 January 2019

CMake is an open-source cross-platform build system generator.

General

Cmake is especially useful if an application depends on several other directories (e.g. libraries) in addition to code or if certain parts need to be compiled and linked in a specific order. The build process is controlled by CMakeLists.txt files which consist of commands and arguments and must be present in all directories, including subdirectories. It is possible to use both predefined and custom commands.

Usage on the RWTH Cluster

In order to modify the settings for the build process in an interactive GUI, change to the "build" directory of your project and execute the following command:

ccmake .

This will give you an overview of all arguments for the build process in alphabetical order. You can edit an option by pressing [enter]. Afterwards, make sure to configure your settings by pressing [c] and then [g] to generate, so that your changes will go into effect during the next build process.

References

CMake website.