Difference between revisions of "Applications/Cmake"
m |
m (→Next Steps) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Application Details== | ==Application Details== | ||
− | *Description: CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces | + | *Description: CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler-independent configuration files, and generate native makefiles and workspaces |
*Version: 3.5.1 | *Version: 3.5.1 | ||
*Module: cmake/3.5.1 | *Module: cmake/3.5.1 | ||
Line 7: | Line 7: | ||
==Usage== | ==Usage== | ||
− | CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces | + | CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler-independent configuration files, and generate native makefiles and workspaces |
The build process with CMake takes place in two stages. First, standard build files are created from configuration files. Then the platform's native build tools are used for the actual building. | The build process with CMake takes place in two stages. First, standard build files are created from configuration files. Then the platform's native build tools are used for the actual building. | ||
− | Each build project contains a CMakeLists.txt file in every directory that controls the build process. The CMakeLists.txt file has one or more commands in the form COMMAND (args...), with COMMAND representing the name of each command and args the list of arguments, each separated by white space. While there are many built-in rules for compiling the software libraries (static and dynamic) and executables, there are also provisions for custom build rules. Some build dependencies can be determined automatically. | + | Each build project contains a CMakeLists.txt file in every directory that controls the build process. The CMakeLists.txt file has one or more commands in the form COMMAND (args...), with COMMAND representing the name of each command and args the list of arguments, each separated by white space. While there are many built-in rules for compiling the software libraries (static and dynamic) and executables, there are also provisions for custom-build rules. Some build dependencies can be determined automatically. |
Line 47: | Line 47: | ||
− | == | + | ==Next Steps== |
* [https://cmake.org/ https://cmake.org/] | * [https://cmake.org/ https://cmake.org/] | ||
− | + | {{Modulepagenav}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 10:39, 16 November 2022
Application Details
- Description: CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler-independent configuration files, and generate native makefiles and workspaces
- Version: 3.5.1
- Module: cmake/3.5.1
- Licence: GNU
Usage
CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler-independent configuration files, and generate native makefiles and workspaces
The build process with CMake takes place in two stages. First, standard build files are created from configuration files. Then the platform's native build tools are used for the actual building.
Each build project contains a CMakeLists.txt file in every directory that controls the build process. The CMakeLists.txt file has one or more commands in the form COMMAND (args...), with COMMAND representing the name of each command and args the list of arguments, each separated by white space. While there are many built-in rules for compiling the software libraries (static and dynamic) and executables, there are also provisions for custom-build rules. Some build dependencies can be determined automatically.
Usage Examples
cmake_minimum_required (VERSION 2.6) project (Tutorial) # The version number. set (Tutorial_VERSION_MAJOR 1) set (Tutorial_VERSION_MINOR 0) # configure a header file to pass some of the CMake settings # to the source code configure_file ( "${PROJECT_SOURCE_DIR}/TutorialConfig.h.in" "${PROJECT_BINARY_DIR}/TutorialConfig.h" ) # add the binary tree to the search path for include files # so that we will find TutorialConfig.h include_directories("${PROJECT_BINARY_DIR}") # add the executable add_executable(Tutorial tutorial.cxx)
Module
[username@login01 ~]$ module add cmake/3.5.1