From 457bf223e6bc7b8b757da70a73e6392a46e86df7 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sat, 8 Mar 2025 22:27:42 +0100 Subject: [PATCH] CMakePrintSystemInformation: Update documentation --- Modules/CMakePrintSystemInformation.cmake | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/Modules/CMakePrintSystemInformation.cmake b/Modules/CMakePrintSystemInformation.cmake index 45ad38e84c..98e48e5210 100644 --- a/Modules/CMakePrintSystemInformation.cmake +++ b/Modules/CMakePrintSystemInformation.cmake @@ -5,10 +5,26 @@ CMakePrintSystemInformation --------------------------- -Print system information. +This module can be used for diagnostics to print system information. -This module serves diagnostic purposes. Just include it in a -project to see various internal CMake variables. +Examples +^^^^^^^^ + +Including this module in a project: + +.. code-block:: cmake + + include(CMakePrintSystemInformation) + +prints various internal CMake variables. For example:: + + CMAKE_SYSTEM is Linux-6.11.0-17-generic Linux 6.11.0-17-generic x86_64 + CMAKE_SYSTEM file is Platform/Linux + CMAKE_C_COMPILER is /usr/bin/cc + CMAKE_CXX_COMPILER is /usr/bin/c++ + CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS is -shared + CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS is -shared + ... #]=======================================================================] message("CMAKE_SYSTEM is ${CMAKE_SYSTEM} ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}")