1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-22 07:25:02 +08:00

15 Commits

Author SHA1 Message Date
Vito Gamberini
058e7da541 Tutorial: Add redirect pages for removed steps 2025-09-17 11:57:34 -04:00
Vito Gamberini
b2e3e3e30e Tutorial: Rewrite using conventions enabled by CMake 3.23
This is a full re-write of the CMake Tutorial for CMake 3.23, both
the functionality it provides, as well as the modern workflows that
developers use when interfacing with CMake.

Issue: #22663, #23086, #23799, #26053, #26105, #26153, #26914
2025-09-17 11:57:23 -04:00
Peter Kokot
e6f9ebbbe1 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().
2025-05-26 02:49:32 +02:00
Markus Ferrell
a8679c997d Tutorial: Extend literal include to contain full code changes in solution
The solution for step 7 todo 5 did not include all of the code changes.
Modify it to include the needed `#endif` code change.
2023-06-15 09:29:16 -04:00
Markus Ferrell
8ddf32196c Tutorial: Refactor MathFunctions code
Propagate the refactor in Step 10 MathFunctions through all of the
steps. Use MathFunctions/MathFunctions.cxx instead of Tutorial.cxx
to determine which sqrt library is called. Adds .h files which
correspond to their .cxx files by name.
2023-02-23 09:42:10 -05:00
Markus Ferrell
f9ef15f3dc Tutorial: Update step 7 style 2022-10-27 10:08:56 -04:00
Markus Ferrell
92edbce342 Tutorial: Update step 5 style 2022-10-06 12:08:43 -04:00
Markus Ferrell
ccba87b05b Tutorial: Move step 10 to step 4
Shifts steps 4-9 to 5-10.
2022-08-08 17:15:48 -04:00
Markus Ferrell
6c77ccec51 Tutorial: Move step 8 to step 5. Shift steps 5-7 to 6-8. 2022-07-19 15:32:42 -04:00
Brad King
5c84eca210 Tutorial: Simplify logic checking for cmath functions
Since commit 07223c5c27 (Tutorial: Update Step 5 to work on Windows,
2020-02-18, v3.18.0-rc1~655^2) the logic does not work on non-Windows
platforms when cmake is re-run on an existing build tree.  It is also
more complicated than we'd like for a tutorial example.  Avoid the need
to consider the `m` library case by performing the check as C++.

Since `check_cxx_symbol_exists` cannot handle overloaded functions
like `exp` and `log`, check with `check_cxx_source_compiles` instead.
This also presents a more general-purpose example in the tutorial.

Fixes: #23524
2022-06-01 13:57:47 -04:00
Betsy McPhail
01c332c9c7 Tutorial: Clarify instructions in Step 5 2021-09-30 12:18:41 -04:00
Brad King
73898c4922 Tutorial: Make code snippets linkable
Extend the change from commit 9e5bbb69ea (Tutorial: Add captions for
code blocks, 2021-06-11) to also add a Sphinx named target to code
blocks.  Name each target after the change the code block makes.
2021-06-18 12:31:45 -04:00
Josef Angstenberger
9e5bbb69ea Tutorial: Add captions for code blocks 2021-06-17 11:57:56 -04:00
Josef Angstenberger
fe60154fe8 Tutorial: Small formatting improvements
- Use inline literals for all code fragments and names.
- Add missing console code-blocks.
- Always use c++, not c as code language.
2021-06-17 11:57:56 -04:00
Josef Angstenberger
d1c3e7e78a Tutorial: Split steps into separate files
Fixes: #21737
2021-06-17 11:53:55 -04:00