Commit Graph

63 Commits

Author SHA1 Message Date
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
Alexander Pivovarov
dfb47335da Tutorial: Step12 install MathFunctionsConfigVersion.cmake 2021-04-20 13:43:13 -07:00
Betsy McPhail
174b1e5da5 Tutorial: Remove incorrect instructions from Step 5
The first section of Step 5 is not tested, incorrect, and not the
recommended solution.

Fixes: #21539
2021-01-14 13:05:09 -05:00
fazl
b42a63605c Tutorial: Fix minor typo in index.rst
s/mqsqrt.h/mysqrt.h/
2021-01-04 12:02:09 -05:00
Betsy McPhail
9b988d9e57 Help: Cleanup guides
* Move sections to be same level as Introduction in "Using Dependecies"
* Rename "Importing Exporting Targets" to "Importing Exporting Guide"
* Add an Introduction header to the Tutorial and Importing Exporting Guide
2020-09-25 15:29:05 -04:00
Brad King
9d9a6a8532 Merge topic 'tutorial-update'
63af35019a Tutorial: Add missing `language` option to literalinclude

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5046
2020-07-23 11:08:38 -04:00
Betsy McPhail
63af35019a Tutorial: Add missing language option to literalinclude 2020-07-22 16:17:41 -04:00
Jean-Christophe Fillion-Robin
207373802e Fix typos identified using codespell
See https://github.com/codespell-project/codespell#readme

The following command was used:

```
codespell -q6 --skip="\
.git,\
*.json,\
./Copyright.txt,\
./Help/command/foreach.rst,\
./Help/prop_test/REQUIRED_FILES.rst,\
./Help/variable/CTEST_COVERAGE_COMMAND.rst,\
./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\
./Modules/CMakeRCInformation.cmake,\
./Modules/Internal/CPack/NSIS.template.in,\
./Modules/FindMatlab.cmake,\
./Modules/MatlabTestsRedirect.cmake,\
./Modules/Platform/Windows-Clang.cmake,\
./Modules/Platform/Windows-Intel-Fortran.cmake,\
./Modules/Platform/Windows-MSVC.cmake,\
./Source/CMakeVersion.cmake,\
./Source/cmConvertMSBuildXMLToJSON.py,\
./Source/cmCreateTestSourceList.cxx,\
./Source/cmGlobalVisualStudio10Generator.cxx,\
./Source/cmExportBuildFileGenerator.cxx,\
./Source/cmExportInstallAndroidMKGenerator.cxx,\
./Source/cmExportInstallFileGenerator.cxx,\
./Source/cmExportSet.cxx,\
./Source/cmExportTryCompileFileGenerator.cxx,\
./Source/cmFindPackageCommand.cxx,\
./Source/cmInstallCommand.cxx,\
./Source/cmGeneratorExpressionLexer.cxx,\
./Source/cmLocalVisualStudio7Generator.cxx,\
./Source/cmOrderDirectories.cxx,\
./Source/cmTarget.cxx,\
./Source/kwsys/*,\
./Source/QtDialog/CMakeSetupDialog.ui,\
./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\
./Source/CTest/cmParseCoberturaCoverage.h,\
./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\
./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\
./Tests/RunCMake/GoogleTest/xml_output.cpp,\
./Tests/RunCMake/Make/TargetMessages*,\
./Utilities/*,\
" \
-L "\
dependees,\
endwhile,\
fo,\
filetest,\
helpfull,\
nd,\
objext,\
stoll,\
supercedes,\
superceded,\
vas,\
varn,\
"
```
2020-07-22 12:44:47 -04:00
Betsy McPhail
8a80b8fbe4 Tutorial: Clarify Steps 1, 2 and 3 2020-07-17 12:17:26 -04:00
Brad King
3252bc4476 Merge topic 'tutorial_install_when_built_static'
0fdfd6bf37 Tutorial: Install correctly when built statically

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4906
2020-06-18 09:41:31 -04:00
Robert Maynard
7c3204fc7d Tutorial: Correct Step9 wording
on some platforms -fPIC is implicit so you won't get an error
2020-06-16 15:43:32 -04:00
Robert Maynard
0fdfd6bf37 Tutorial: Install correctly when built statically
When built statically we failed to install the SqrtLibrary
2020-06-16 15:38:57 -04:00
Brad King
dd62ee376e Tutorial: Restore MakeTable.cxx in step 6
In commit c754a3d4b7 (Tutorial: Remove MakeTable.cxx from Steps 5 and 6,
2020-04-23) it was incorrect to remove the file from step 6.  The
instructions for that step show the addition of a reference to it from
the `CMakeLists.txt` file.  Each step shows the addition of content to
lead to the next step, so removing the file from step 6 was an
off-by-one error.

Issue: #20618
2020-04-27 08:30:10 -04:00
Brad King
2844ef87c6 Merge topic 'tutorial-remove-maketable'
c754a3d4b7 Tutorial: Remove MakeTable.cxx from Steps 5 and 6

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4658
2020-04-24 08:33:05 -04:00
Betsy McPhail
c754a3d4b7 Tutorial: Remove MakeTable.cxx from Steps 5 and 6
This file is not referenced until Step 6 and, therefore, should be added to
the source code at Step 7.

Fixes: #20618
2020-04-23 11:57:34 -04:00
Betsy McPhail
d0797f62d9 Tutorial: Clarify Step 5
Fixes: #20619
2020-04-23 11:47:20 -04:00
Betsy McPhail
07223c5c27 Tutorial: Update Step 5 to work on Windows
`log` and `exp` should be found on Windows systems now, as expected.

Update tests to be more specific in looking for the expected outcome of
the tutorial.
2020-02-27 14:58:24 -05:00
Brad King
c5d7c29137 Help: Replace UTF-8 apostrophe with ascii apostrophe
Also replace UTF-8 graphical characters with simple dashes.

Fixes: #20349
2020-02-12 14:37:41 -05:00
Betsy McPhail
fc2d1b1347 Tutorial: Clarify Step 5 2020-01-16 15:54:01 -05:00
Betsy McPhail
a7d25358a0 Tutorial: Add the PRIVATE keyword to target_link_libraries command 2020-01-10 11:38:00 -05:00
Betsy McPhail
cf2afb1065 Tutorial: Remove 'Consumer' example
This example was incomplete and did not follow the format of the tutorial.
2020-01-10 11:38:00 -05:00
Betsy McPhail
77b515f3eb Tutorial: Improve "MultiPackage" example
Rename to Step 12 and ensure that it follows Step 11
2020-01-10 11:37:54 -05:00
Betsy McPhail
3a510a47b0 Tutorial: Add links to relevant CMake documentation
Add links for commands, properties and variables.
2020-01-09 14:49:28 -05:00
Arkadiusz Drabczyk
02aa03eb0a Tutorial: replace Unicode EN DASH with ASCII dash
Unicode EN DASH is problematic:

- it cannot be easily found in web browsers, editors etc.
- it doesn't work when copied and run in the terminal
2019-11-18 06:51:58 +11:00
Craig Scott
9682adb6ad Tutorial: clean up typos, grammar and formatting 2019-11-04 12:44:34 +11:00
Kitware Robot
ed98209ddc Revise include order using clang-format-6.0
Run the `clang-format.bash` script to update our C and C++ code to a new
include order `.clang-format`.  Use `clang-format` version 6.0.
2019-10-01 12:26:36 -04:00
Betsy McPhail
6f6a32a0f6 Tutorial: Improve Step 9
* Move USE_MYMATH from configured header to target_compile_definitions
2019-08-19 11:49:05 -04:00
Betsy McPhail
6a35d630dc Tutorial: Improve Step 8
* Remove comments from CTestConfig.cmake
* Update directions
2019-08-19 11:49:05 -04:00
Betsy McPhail
61d4d990d6 Tutorial: Improve Step 7
* Update directions
2019-08-19 11:49:05 -04:00
Betsy McPhail
a36731c634 Tutorial: Improve Step 6
* Print message when using the table
* Remove duplicated comment
* Remove HAVE_LOG and HAVE_EXP checks, use generated table instead
2019-08-19 11:49:05 -04:00
Betsy McPhail
df9cdf629c Tutorial: Improve Step 5
* Updated output message
* Use 'target_compile_definitions' for HAVE_LOG and HAVE_EXP

Previously, the change from using TutorialConfig.h to
target_compile_definitions happened without explanation as part of Step 8.
2019-08-19 11:49:05 -04:00
Betsy McPhail
442c0f0d46 Tutorial: Improve Step 4
* Clarify directions
2019-08-19 11:49:05 -04:00