Commit Graph

111 Commits

Author SHA1 Message Date
Brad King
7e580e48a4 Merge topic 'tutorial_genExp_rearrange'
ccba87b05b Tutorial: Move step 10 to step 4

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7506
2022-08-10 09:21:32 -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
Alex Turbov
04843d743e Help: Replace a bunch of more `--option to :option:` role 2022-08-04 19:34:45 +04:00
Alex Turbov
b57f27b087 Help: Replace mentions of `-T and -A` options with role 2022-08-04 19:34:45 +04:00
Alex Turbov
d25b232dee Help: Replace mentions of `-G option with :option:-G` role 2022-08-04 19:34:45 +04:00
Alex Turbov
63940e1cab Help: Replace mentions of `-C option with :option:-C` role 2022-08-04 19:34:44 +04:00
Brad King
1cde77e526 Merge topic 'doc-find_package-BYPASS_PROVIDER'
4f7a0c25d2 Help: Document BYPASS_PROVIDER keyword for find_package()
76370e06b8 Help: Minor grammar fix for the Using Dependencies manual

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7501
2022-07-25 12:02:20 -04:00
Craig Scott
76370e06b8 Help: Minor grammar fix for the Using Dependencies manual 2022-07-23 21:30:53 +10:00
Brad King
1cee9a9012 Merge topic 'tutorial_cdash_rearrange'
6c77ccec51 Tutorial: Move step 8 to step 5. Shift steps 5-7 to 6-8.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7480
2022-07-22 10:13:49 -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
Markus Ferrell
bc0aef31ee Tutorial: Add reference links for step 1 commands 2022-07-19 13:18:55 -04:00
FeRD (Frank Dana)
8d8d8ac772 Help: Mark features new to 3.24 in Using Dependencies Guide
The sections on FetchContent's FIND_PACKAGE_ARGS and on
Dependency Providers only apply to CMake 3.24+, so add
versionadded markers at the start of both sections.
2022-06-27 13:26:46 -04:00
Craig Scott
92e93f5c9e Help: Overhaul and expand the Using Dependencies Guide
The guide previously only focused on the find_package() command,
with a bias towards libraries. FetchContent was not mentioned at all.
Reorganise and update the existing content. Add new sections to cover
providing dependencies with FetchContent and dependency providers.
Improve discoverability of the guide by mentioning it at the beginning
of the find_package(), FetchContent and dependency provider docs.
2022-06-09 22:55:11 +10: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
Brad King
4cb616fed6 Tutorial: Provide a source archive when published on cmake.org
Provide readers following the tutorial on `cmake.org` a direct link to
download the tutorial's source examples.  Previously readers had to
fetch the CMake source tree separately and look for the tutorial source
examples inside it.

Fixes: #22475
2022-04-28 13:36:20 -04:00
Martin Duffy
27589da705 Help/guide: Fix wrong header file reference
Step 2 references mysqrt.h instead of MathFunctions.h.
MathFunctions/mysqrt.h doesn't exist until Step 9.
2022-04-21 14:25:06 -04:00
Øystein Sørensen
6892002fcb Tutorial: Fix casing of reference to License.txt
Correct a tiny typo in the Step 7 tutorial.  Change so `License.txt`
correctly starts with a capital `L`.
2022-03-21 15:58:26 -04:00
Connor Imes
5317015e68 Help: use package-specific var for supported component list
Always using `_supported_components` causes conflicts when transitive
dependencies also set this variable, e.g., because the developers
followed these code samples.

An even more general approach could be to set
`_${CMAKE_FIND_PACKAGE_NAME}_supported_components` instead, but such a
change should then be applied to other variables for consistency.

Fixes: #23112
2022-02-14 10:16:52 -05:00
Brad King
6baf3b27c9 Merge topic 'ide_guide'
6a5936c596 Help: Add IDE Integration Guide section on IDEs supporting CMake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6851
2022-01-13 15:23:04 -05:00
Semyon Kolton
6a5936c596 Help: Add IDE Integration Guide section on IDEs supporting CMake 2022-01-12 15:48:39 -05:00
Kyle Edwards
94de63effa Guide: Recommend -C for IDE presets instead of -D
Issue: #23083
2022-01-07 12:43:53 -05:00
Brad King
29c80aec94 Merge topic 'tutorial-cpack-source-archive'
39c410624a Tutorial: in step 7, disambiguate installed/source archive
44c527bc63 Tutorial: Package only one source archive

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6765
2021-12-01 09:47:57 -05:00
Joachim Wuttke (h)
39c410624a Tutorial: in step 7, disambiguate installed/source archive 2021-11-30 12:32:12 -05:00
Joachim Wuttke (h)
44c527bc63 Tutorial: Package only one source archive 2021-11-30 12:31:55 -05:00
Joachim Wuttke (h)
4f524797dc Tutorial: Order install(TARGETS) EXPORT option consistently with docs 2021-11-30 12:23:56 -05:00
makise-homura
e5d9fce03f LCC: Add dedicated support for MCST LCC compiler
Divert LCC compiler as a new one, instead of treating it as GNU.

Since old times, Elbrus C/C++/Fortran Compiler (LCC) by MCST has been
passing checks for GNU compilers, so it has been identified as GNU.
Now, with intent of seriously upstreaming its support, it has been
added as a separate LCC compiler, and its version displays not a
supported GCC version, but LCC version itself (e.g. LCC 1.25.19 instead
of GNU 7.3.0).

This commit adds its support for detection, and also converts basically
every check like 'is this compiler GNU?' to 'is this compiler GNU or
LCC?'. The only places where this check is untouched, is where it
regards other platforms where LCC is unavailable (primarily non-Linux),
and where it REALLY differs from GNU compiler.

Note: this transition may break software that are already ported to
Elbrus, but hardly relies that LCC will be detected as GNU; still such
software is not known.
2021-10-15 05:05:19 +03:00
Joseph Snyder
5a86ce5428 Tutorial: Step 4 improvements
Small changes to the text and CMake code for the fourth step of the
tutorial:

* Remove parameter from endfunction call
* Standardize on "binary directory" for test location
* Add additional information about a Release build.

Issue: #22663
2021-10-07 11:53:51 -04:00
Joseph Snyder
5632933304 Tutorial: Add version update instructions to Step 10
Add instructions to update the cmake_minimum_required version to 3.15
just before the usage of COMPILE_LANG_AND_ID

Issue: #22663
2021-10-05 09:22:33 -04:00
Brad King
6fbd94cf5b Merge topic 'tutorial_update_step_11'
6dade88d1c Tutorial: Add documentation on Package helper functions
1bf25b5b5f Tutorial: Remove information about EXPORT keyword

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6575
2021-10-05 09:04:37 -04:00
Brad King
f3a6d295e8 Merge topic 'tutorial-regex'
0f17b37b96 Tutorial: Fix regexps in sample CMakeLists.txt files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6572
2021-10-04 10:31:57 -04:00
Brad King
162413664f Merge topic 'tutorial-step1'
14600a42c8 Tutorial: Update Step 1 instructions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6576
2021-10-04 10:29:00 -04:00
Joseph Snyder
6dade88d1c Tutorial: Add documentation on Package helper functions
Add documentation for the configure_package_config_file() and
write_basic_package_version_file() commands.

Update the comment for the installation of those files to allow a
stopping point for the code display.

Issue: #22663
2021-09-30 14:43:28 -04:00
Joseph Snyder
1bf25b5b5f Tutorial: Remove information about EXPORT keyword
Remove the text that implies that the EXPORT keyword will also install
the generated CMake file.
2021-09-30 13:06:20 -04:00
Betsy McPhail
01c332c9c7 Tutorial: Clarify instructions in Step 5 2021-09-30 12:18:41 -04:00
Betsy McPhail
14600a42c8 Tutorial: Update Step 1 instructions
To demonstrate how simple a CMake project can be, move the `Build and Run`
section earlier in the step.
2021-09-30 12:04:52 -04:00
Christophe Bernard
0f17b37b96 Tutorial: Fix regexps in sample CMakeLists.txt files
Replace original regexp `[-nan|nan|0]` with `(-nan|nan|0)`
which is what the author most likely intended to write in the
first place.
2021-09-30 08:55:41 -04:00
Brad King
09dd52c9d2 Merge topic 'tutorial_update_step_8'
f55a02a26e Tutorial: Enhance CTestConfig info in Step 8

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6565
2021-09-28 09:56:14 -04:00
Joseph Snyder
f55a02a26e Tutorial: Enhance CTestConfig info in Step 8
Add a copy of the CTestConfig.cmake from Step 9 into the directory for
Step 8.

Expand the information about the contents of the CTestConfig file and
write a brief explanation of where on CDash to acquire the CTestConfig
file for a specific project.

CMake Issue: #22663
2021-09-27 10:11:17 -04:00
Joseph Snyder
68e0f72744 Tutorial: Describe placement of add_subdirectory
Clarify that the process of making a target optional in the second step
of the tutorial is further steps to the work done before, not
a separate addition to the file.

Do this by ensuring that the paragraph which describes the work done
mentions the placement and use of the previous command.
This is done to avoid duplication of the add_subdirectory call.

CMake Issue: #22663
2021-09-24 08:59:23 -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
Brad King
9c703ff741 Tutorial: Add infrastructure to preserve old links when renaming steps 2021-06-17 12:10:14 -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
25dde20cc5 Tutorial: Fix links after splitting steps 2021-06-17 11:55:18 -04:00
Josef Angstenberger
d1c3e7e78a Tutorial: Split steps into separate files
Fixes: #21737
2021-06-17 11:53:55 -04:00
Brad King
13fdb26323 Tutorial: Break up intro paragraph 2021-06-17 10:33:07 -04:00
Josef Angstenberger
7072d83772 Help: Fix typos and spelling in documentation 2021-05-07 17:00:17 +02:00
Brad King
d31b6657a6 Merge topic 'doc-preset-schema-relative'
75dadc4558 Help: Use relative path for IDE Integration guide link to preset schema

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !6083
2021-05-04 11:15:21 -04:00
Brad King
75dadc4558 Help: Use relative path for IDE Integration guide link to preset schema
This allows the integration guide to build as part of a larger set of
documentation.
2021-05-03 15:36:45 -04:00
Alexander Pivovarov
dfb47335da Tutorial: Step12 install MathFunctionsConfigVersion.cmake 2021-04-20 13:43:13 -07:00