Commit Graph
164 Commits
Author SHA1 Message Date
Aiden Woodruff abee191e93 Help/tutorial: reword Installation Commands intro
Signed-off-by: Aiden Woodruff <aiden.woodruff@kitware.com>
2026-06-22 12:08:38 -04:00
Aiden Woodruff 15bd933fc4 Help/tutorial: fix minor typos
Signed-off-by: Aiden Woodruff <aiden.woodruff@kitware.com>
2026-06-22 12:08:38 -04:00
Brad King d7c0609e0d Merge topic 'tutorial-step-3-fix'
788364b927 Tutorial: Fix potentially misleading guidance on -D flags in script mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12089
2026-05-21 09:44:03 -04:00
Vito Gamberini 788364b927 Tutorial: Fix potentially misleading guidance on -D flags in script mode 2026-05-20 14:07:56 -04:00
Xia Lei de6c5a50ca Tutorial: Fix typo in Before You Begin
Fix a spelling error.  Change "MinRelSize" to "MinSizeRel".
2026-05-19 14:00:47 -04:00
Brad King 433725108d Merge topic 'tutorial-foo-capitalization'
077c43747d Tutorial: Fix typo in prose about matching "Foo"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12065
2026-05-15 12:13:46 -04:00
Brad King 17540b8f47 Tutorial: Fix Sphinx cross-reference to preset installDir field
Fix a logical conflict between commit 653356bed0 (Tutorial: Describe
install prefix, 2026-05-14) and commit f26e9fcbae (Help: Generate
presets JSON schema, documentation, 2026-04-08).
2026-05-15 11:44:34 -04:00
Bo Rydberg 077c43747d Tutorial: Fix typo in prose about matching "Foo" 2026-05-15 11:24:29 -04:00
Brad King 0ab34febed Merge topic 'tutorial-misc-fixes'
4b093ae12e Tutorial: Move multi-config install note to the first exercise
653356bed0 Tutorial: Describe install prefix
fdc4511f18 Tutorial: Fix some typos

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Vito Gamberini <vito.gamberini@kitware.com>
Merge-request: !12062
2026-05-15 10:07:27 -04:00
Tyler Yankee 4b093ae12e Tutorial: Move multi-config install note to the first exercise
The context is needed when running all exercises in this step.

Revise both this note and its mirror for `ctest` in Step 7 to
cross-reference the relevant flags.
2026-05-14 18:22:14 -04:00
Tyler Yankee 653356bed0 Tutorial: Describe install prefix
Give a brief overview of what the install prefix is and the various
ways it can be set.
2026-05-14 18:11:41 -04:00
Tyler Yankee fdc4511f18 Tutorial: Fix some typos 2026-05-14 17:54:34 -04:00
Tyler Yankee 95edd93948 presets: Support loading from arbitrary file
Allow CMake, CTest, and CPack to read presets from a path given by
command-line argument instead of always requiring `CMakePresets.json`
or `CMakeUserPresets.json` in the source tree. This makes the presets
feature more extensible to cases in which the user doesn't have access
to the presets defined in the source tree (e.g., if the source tree is
not writable).

For now, there is no equivalent implementation of such an option in the
`cmake-gui`, nor for the recent presets functionality implemented in
`ctest_configure` and `ctest_build`.

Fixes: #27329
2026-04-30 08:04:26 -04:00
Tyler Yankee 43f5fc8ac8 Help, Tests: Consolidate presets terminology and references
References to `CMake[User]Presets.json` should correspond to behavior
pertaining to those files in particular, while references to presets
files generally should be disambiguated from that.

Re-spell "preset file" to "presets file" where applicable.

Make a few references to `cmake-presets(7)` more consistent.

Issue: #27329
2026-04-30 07:49:40 -04:00
Brad King 1bfcd47309 Help: Replace C++ reference links with their permanent redirects 2026-04-20 10:50:31 -04:00
Gustaf Borgström 53a2a77d19 Tutorial: Add missing entry in Step4 file list
The root's `CMakeLists.txt` is also one of the files the need editing in
Exercise 1, but was missing.
2026-03-26 13:38:29 -04:00
Brad King c64b6c50f7 Merge topic 'patch-1'
1d8d22c0be Tutorial: fix a thinko in a TODO item

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Tyler Yankee <tyler.yankee@kitware.com>
Merge-request: !11552
2026-01-19 09:15:53 -05:00
Tyler Yankee 435e403e5a Tutorial: Fix typo in Step 5 2026-01-15 11:38:45 -05:00
Brad King 6a34488391 Merge topic 'tutorial-typo'
f4e4bb12f9 Tutorial: Fix typo

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11554
2026-01-08 10:29:13 -05:00
shynur f4e4bb12f9 Tutorial: Fix typo 2026-01-07 13:43:44 -05:00
shynur 1d8d22c0be Tutorial: fix a thinko in a TODO item 2026-01-07 13:39:47 -05:00
Craig Scott 0854e3d598 Help,Comments: Fix occurrences of doubled words 2025-12-21 21:03:33 +11:00
Tyler Yankee 58fc663688 Tutorial: Provide MSVC example to build Vendor library
Allow Windows users who aren't familiar with MSVC-equivalent commands to
GCC and/or don't have the GNU toolchain installed (via MinGW, etc.) to
practice this example.
2025-12-11 09:09:35 -05:00
Tyler Yankee 1ad84c5301 Tutorial: Fix path to file in exercise solution 2025-12-09 15:23:34 -05:00
Vito Gamberini fb58de1a56 Tutorial: Add Step 0 to prepare the working environment
Adds a "Step 0" to the tutorial which discusses minutia about where to
get CMake, how to run it, and most importantly deals at length with
various generator issues which aren't covered elsewhere.
2025-10-29 09:49:23 -04:00
Brad King b22a77e337 Merge topic 'doc-cmake.org-tutorial-archive' into release-4.2
5473a45fd8 Tutorial: Restore source archive when published on cmake.org

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11370
2025-10-29 09:31:10 -04:00
Brad King 5473a45fd8 Tutorial: Restore source archive when published on cmake.org
Restore commit 4cb616fed6 (Tutorial: Provide a source archive when
published on cmake.org, 2022-04-27, v3.23.2~22^2).  Its effects were
accidentally reverted by commit 9784834b4c (Help: Use `*.rst` extension
for included files, 2025-04-07, v4.1.0-rc1~354^2).

Reported-by: Vito Gamberini <vito.gamberini@kitware.com>
2025-10-29 09:17:14 -04:00
Vito Gamberini 058511c6b6 Tutorial: Update IPO example in Step 6 2025-10-16 09:09:51 -04:00
Vito Gamberini c8adfdb0a8 Tutorial: Fix typos and mislabeled code blocks 2025-10-03 18:01:06 -04:00
Vito Gamberini 07518509db Tutorial: Fix example FILE_SET names
FILE_SET names begin with lowercase letters, the examples use uppercase

Fixes #27282
2025-10-02 19:00:43 -04:00
Adrien Ollier fcc2800f64 Tutorial: text not correctly rendered
There are some restrictions on backquotes markup.
One of them is it must be separated from
surrounding text by non-word characters.
2025-09-26 17:42:59 +02:00
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
Brad King 7c8eca5ecb Merge topic 'doc-tutorial-typo'
e07effe49c Help: Fix wording in tutorial workflow description

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10716
2025-04-28 11:18:05 -04:00
Brad King e07effe49c Help: Fix wording in tutorial workflow description 2025-04-25 11:10:10 -04:00
Alex Turbov 9784834b4c Help: Use *.rst extension for included files
So, editor(s) can correctly highlight the RST syntax in the included files.
2025-04-14 03:07:46 +04:00
Daniel Pfeifer 593a079a8f Tutorial: Cleanup CTestConfig.cmake
* Remove `CTEST_PROJECT_NAME`, as it is no longer used.
* Set `CTEST_SUBMIT_URL` instead of `CTEST_DROP_*`.
* Remove `CTEST_SUBMIT_URL`, as it is not used.
2025-04-07 20:22:54 +02:00
Nikita Nemkin 9c963de998 Help: Remove stray spaces and one colon 2025-01-31 12:23:29 -05:00
Alex Turbov bc4c71627a Help: Fix typos found by the rst-backticks hook
The corresponding `pre-commit` configuration is coming in the
separate MR.

Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
2025-01-27 01:43:26 +04:00
Kitware Robot 0b96ae1f6a Revise C++ coding style using clang-format with "east const"
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.

Issue: #26123
2025-01-23 13:09:50 -05:00
Nirav Nirmal e61ba188b6 Tutorial: Add missing entry in Step 1 list of files to edit
Exercise 3 requires editing `TutorialConfig.h.in`.
2025-01-08 09:43:06 -05:00
Brice Decaestecker dccf2bdb75 Tutorial: Restore TODO 4 comment in step 7
Restore a comment added by commit f9ef15f3dc (Tutorial: Update step 7
style, 2022-10-07, v3.26.0-rc1~482^2) that was accidentally removed by
commit 8ddf32196c (Tutorial: Refactor MathFunctions code, 2023-02-10,
v3.27.0-rc1~441^2).
2024-11-27 09:28:34 -05:00
FrankYin ea544235e5 Tutorial: Fix grammar typo in Step 11
Fix and improve wording in the "Adding Export Configuration" step.
2024-05-17 11:25:39 -04:00
betsy.mcphail baf6a37ffa Tutorial: Set CPACK_GENERATOR in Step 9
In addition to CPACK_SOURCE_GENERATOR also set CPACK_GENERATOR.
2024-05-09 14:03:06 -04:00
Brad King ddb608b1d9 Merge topic 'fix-tutorial'
6d48bd21ac Tutorial: Clarify the expected change to target_include_directories
4d56db038d Tutorial: Make `INSTALL_DESTINATION` consistent with installed destination
da22b269b2 Tutorial: Add missing `$` in generator expression

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9120
2024-01-08 09:43:29 -05:00
Kevin Albertson 6d48bd21ac Tutorial: Clarify the expected change to target_include_directories
The expectation is to modify the existing `target_include_directories`,
not add add a new `target_include_directories` command.
2024-01-05 13:22:39 -05:00
Kevin Albertson 4d56db038d Tutorial: Make INSTALL_DESTINATION consistent with installed destination 2024-01-05 13:21:08 -05:00
Kevin Albertson da22b269b2 Tutorial: Add missing $ in generator expression 2024-01-05 13:21:08 -05:00
Bhavith C 20f74231db Help: Fix Step3 Mathfunction example
- TODO 6 has to be Link SqrtLibrary
- TODO 7 has to be Link MathFunctions

Signed-off-by: Bhavith C <bhavithc.acharya@gmail.com>
2023-12-23 22:57:00 +05:30