Check{,C,CXX,OBJC,OBJCXX,Fortran}SourceCompiles: Update documentation

Changes:

- Added intro code blocks showing how to include these modules.
- Added examples sections.
- Used "command" instead of "macro".
- Commands sections added to have a clearer overview of the modules at
  first encounter.
- Reworded commands arguments a bit.
- Added a rubric title for variables that affect the checks.
- CheckFortranSourceCompiles: Added CMake version when SRC_EXT option
  was introduced.
- Listed CMAKE_TRY_COMPILE_TARGET_TYPE variable in the rubric together
  with CMAKE_REQUIRED_* variables and added an include RST file for it.
- Used lowercase style for check_fortran_source_compiles().
This commit is contained in:
Peter Kokot
2025-05-26 02:35:45 +02:00
parent cfcff29087
commit e6f9ebbbe1
12 changed files with 501 additions and 143 deletions

View File

@@ -35,7 +35,7 @@ exercise, complete ``TODO 1`` through ``TODO 5``.
Start by editing ``MathFunctions/CMakeLists.txt``. Include the
:module:`CheckCXXSourceCompiles` module. Then, use
``check_cxx_source_compiles`` to determine whether ``log`` and ``exp`` are
``check_cxx_source_compiles()`` to determine whether ``log`` and ``exp`` are
available from ``cmath``. If they are available, use
:command:`target_compile_definitions` to specify ``HAVE_LOG`` and ``HAVE_EXP``
as compile definitions.