- Infos im HLRS Wiki sind nicht rechtsverbindlich und ohne Gewähr -
- Information contained in the HLRS Wiki is not legally binding and HLRS is not responsible for any damages that might result from its use -

CMake: Difference between revisions

From HLRS Platforms
Jump to navigationJump to search
No edit summary
 
(Add information for using cmake on Hunter / Cray Programming Environment)
 
(2 intermediate revisions by the same user not shown)
Line 8: Line 8:
}}
}}


== Hermit special ==


On Hermit you have to use the cross compilation feature using the Catamount target to configure and build your program:
== Hunter special ==


{{File|
To build software with cmake using the Cray Programming Environment on Hunter one has to specify the system name so that cmake uses the right toolchain:
filename=CMakeLists.txt
{{Command|command=cmake -DCMAKE_SYSTEM_NAME=CrayLinuxEnvironment ... }}
|content = set(CMAKE_SYSTEM_NAME Catamount)<br>...
 
For more information see the cmake documentation for [https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-the-cray-linux-environment Cross Compiling for the Cray Linux Environment]
 
== Hazelhen special ==
 
If your program shall be build for the compute nodes there is a special cmake module which has to be used instead of the system one.
{{command|command=
module load tools/cmake
}}
Then create a file "toolchain.cmake" with the following content:
{{file| filename=toolchain.cmake
| content=<pre>
SET(CMAKE_SYSTEM_NAME Hazelhen)
SET(CMAKE_C_COMPILER      cc)
SET(CMAKE_CXX_COMPILER    CC)
SET(CMAKE_Fortran_COMPILER ftn)
</pre>}}
To build your program call cmake using this toolchain:
{{command|command=
cmake -DCMAKE_TOOLCHAIN_FILE=<path>/toolchain.cmake
}}
}}



Latest revision as of 14:43, 6 December 2024

In software development, cmake is a cross-platform, open-source configuration and build system. A file called CMakeLists.txt specifies how to derive the target program from each of its dependencies. It combines the normal build toolchain - which consists of the autotools, configure script and make under Unix/Linux - in a single portable way.
Developer:
Platforms:
Category: Build Tool
License:
Website: http://www.cmake.org/


Hunter special

To build software with cmake using the Cray Programming Environment on Hunter one has to specify the system name so that cmake uses the right toolchain:

cmake -DCMAKE_SYSTEM_NAME=CrayLinuxEnvironment ...


For more information see the cmake documentation for Cross Compiling for the Cray Linux Environment

Hazelhen special

If your program shall be build for the compute nodes there is a special cmake module which has to be used instead of the system one.

module load tools/cmake

Then create a file "toolchain.cmake" with the following content:

File: toolchain.cmake
SET(CMAKE_SYSTEM_NAME Hazelhen)
SET(CMAKE_C_COMPILER       cc)
SET(CMAKE_CXX_COMPILER     CC)
SET(CMAKE_Fortran_COMPILER ftn)

To build your program call cmake using this toolchain:

cmake -DCMAKE_TOOLCHAIN_FILE=<path>/toolchain.cmake


See also

External links