- 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 |
(Update: We have now a cmake module for Hermit.) |
||
Line 10: | Line 10: | ||
== Hermit special == | == Hermit 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 | ||
filename= | }} | ||
|content = | Then create a file "toolchain.cmake" with the following content: | ||
{{file| filename=toolchain.cmake | |||
| content=<pre> | |||
SET(CMAKE_SYSTEM_NAME Hermit) | |||
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 | |||
}} | }} | ||
Revision as of 10:05, 14 March 2012
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. |
|
Hermit 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 Hermit) 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