summaryrefslogtreecommitdiffstats
path: root/Help/manual/cmake.1.rst
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'ignore-werror-command-arg'Brad King2022-05-191-0/+5
|\ | | | | | | | | | | | | 65f7053d6c COMPILE_WARNING_AS_ERROR: Add command-line option Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7268
| * COMPILE_WARNING_AS_ERROR: Add command-line optionMartin Duffy2022-05-181-0/+5
| | | | | | | | | | | | | | Add command-line option `--compile-no-warning-as-error` to ignore value of `COMPILE_WARNING_AS_ERROR`. Issue: #19085
* | Merge topic 'HelpExit'Brad King2022-05-051-0/+12
|\ \ | | | | | | | | | | | | | | | | | | | | | 0aea13d20b Help: for message(FATAL_ERROR), document nonzero exit code cc97725137 Help: document exit code of command cmake(1) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7175
| * | Help: for message(FATAL_ERROR), document nonzero exit codeJoachim Wuttke (h)2022-05-051-2/+3
| | |
| * | Help: document exit code of command cmake(1)Joachim Wuttke (h)2022-05-041-0/+11
| |/
* | Help: From Environment Variables section, link to cmake -E env etcJoachim Wuttke (h)2022-05-051-0/+2
|/
* Merge topic 'cmake-fresh'Brad King2022-03-251-0/+7
|\ | | | | | | | | | | | | | | 9f1471739d cmake: Add --fresh option to clear the cache and start from scratch Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !7099
| * cmake: Add --fresh option to clear the cache and start from scratchBrad King2022-03-221-0/+7
| | | | | | | | | | | | | | Simplify the workflow to re-run CMake from scratch as if a build tree were never before processed, regardless of whether it has been. Fixes: #23119
* | cmake -E tar: Add --touch optionKasper Laudrup2022-03-231-0/+6
|/ | | | | | | | Similar to GNU tar add a --touch option to the tar extract command to skip extracting the timestamps from the files in the archive effectively touching them as if they were just created. Issue: #22746
* Merge topic 'doc-multiple-src-paths'Brad King2022-03-181-0/+7
|\ | | | | | | | | | | | | 1b8669c1d6 Help: Document warning about multiple source paths Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7082
| * Help: Document warning about multiple source pathsBrad King2022-03-181-0/+7
| | | | | | | | | | | | | | | | Although passing multiple source paths was never documented, it was not diagnosed by CMake 3.22 and below. In CMake 3.23 we now diagnose extra paths and warn. Document this change and add a release note. Issue: #23334
* | Merge topic 'doc-src-bld-selection'Brad King2022-03-171-0/+20
|\ \ | |/ | | | | | | | | | | fea270d3ed Help: Document cmake source and binary dir selection rules Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7076
| * Help: Document cmake source and binary dir selection rulesRobert Maynard2022-03-171-0/+20
| | | | | | | | Co-authored-by: Brad King <brad.king@kitware.com>
* | Merge topic 'vs-package-restore-docs'Brad King2022-02-161-11/+10
|\ \ | |/ | | | | | | | | | | | | d92469e572 Help: Clarify how package resolve mode is intended to be used f320a31087 cmake --build: prioritize --resolve-package-references over preset Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6984
| * Help: Clarify how package resolve mode is intended to be usedCarsten Rudolph2022-02-151-4/+4
| | | | | | | | Fixes: #23223
| * cmake --build: prioritize --resolve-package-references over presetCarsten Rudolph2022-02-151-7/+6
| | | | | | | | Fixes: #23224
* | Merge topic 'doc-debug-find-pkg-var'Brad King2022-02-141-4/+5
|\ \ | |/ | | | | | | | | | | | | 8efd4b5378 cmake::GetDebugFindPkgOutput: Use consistent argument name 546922a57b Help: Fix typo and improve docs for --debug-find-pkg|var options Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6977
| * Help: Fix typo and improve docs for --debug-find-pkg|var optionsCraig Scott2022-02-141-4/+5
| | | | | | Amends d7b18895bc (cmake: Add filtered debug-find options, 2021-12-07)
* | Trace: include `line_end` field in json-v1 formatBraulio Valdivielso Martinez2022-02-091-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After !6954 got merged, it has become easier for tools to get full stack-traces for runtime traces of a CMake program. The trace information already included in the JSON objects (line number, source file path) allows tools that display these stack traces to print the CMake source code associated to them. However, CMake commands may spawn multiple lines, and the JSON information associated to a trace only contains the line in which the command started, but not the one in which it ended. If tools want to print stack traces along the relevant source code, and they want to print the whole command associated to the stack frame, they will have to implement their own CMake language parser to know where the command ends. In order to simplify the life of those who want to write tooling for CMake, this commit adds a `line_end` field to the json-v1 trace format. If a given command spans multiple lines, the `line_end` field will contain the line of the last line spanned by the command (that of the closing parenthesis associated to the command).
* | Merge topic 'trace-global-frame'Brad King2022-02-091-3/+10
|\ \ | | | | | | | | | | | | | | | | | | | | | a41d6e4d7a Trace: add global_frame field to json-v1 format Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6954
| * | Trace: add global_frame field to json-v1 formatBraulio Valdivielso Martinez2022-02-071-3/+10
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tools using the json-v1 format might want to trace stack frames across different `CMakeLists.txt` files, in order to, for example, provide stacktraces that span from the top-level `CMakeLists.txt` in a project. One would think that `frame` lets you do that, but it doesn't, because it tells you the depth of the stack within the current `CMakeLists.txt`, so it gets reset across calls to `add_subdirectory`. The solution involves adding a field with a "global frame". This value gets incremented on calls to `add_subdirectory`, which makes it easier for tools to reconstruct "global stacktraces". I considered changing the current "frame" value, but I didn't because it would be a breaking change. I cannot think of any use-case where "frame" is more useful to "global-frame", but maybe I'm missing something.
* | cmcmd: add end of options delimiter to cmake -E commandsPeter Würth2022-02-031-5/+16
|/ | | | | | | | | | | | | | | Implements a -- delimiter, that indicates the end of options (starting with a dash -) of a command and separates them from the subsequent operands (positional arguments). The following commands are affected: - env: Implemented the -- delimiter. - cat: The -- delimiter was already kind of considered, but its occurence did not stop the options parsing. - rm: Here the command already implemented the -- delimiter as specified, but it was not documented. Fixes #22970
* Help: add versionadded markup to cmake -E commandsPeter Würth2022-02-031-11/+109
|
* Presets: add resolve packages setting to build presets.Carsten Rudolph2022-01-221-0/+13
|
* cmGlobalVisualStudio10Generator: Auto restore NuGet packages.Carsten Rudolph2022-01-221-0/+11
|
* cmake: Add filtered debug-find optionsJohn Parent2021-12-171-0/+14
| | | | | | | | | | Add a `--debug-find-pkg=` option to debug find calls for specific packages. Add a `--debug-find-var=` option to debug find calls for specific return variables. Fixes: #21880
* Help: Clarify 'cmake --build' signature alternativesBrad King2021-07-131-1/+2
| | | | | | | | | | | | | | | | Documentation added by * commit 4f4f2028b8 (Help: Add documentation for buildPresets and testPresets, 2021-01-13, v3.20.0-rc1~51^2~7) * commit 676ecf0d37 (cmake-presets: Add build and test presets, 2020-12-14, v3.20.0-rc1~51^2~6) used square brackets in the `cmake --build` signature to indicate non-optional alternatives, which is not a typical convention. A common convention is to use parentheses instead, but in this case it is probably clearer to list the two signatures separately. Fixes: #22413
* Merge topic 'capabilties-generator-platforms'Brad King2021-05-111-0/+6
|\ | | | | | | | | | | | | 66be34853c cmake: add supported platforms to cmake -E capabilties report Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6102
| * cmake: add supported platforms to cmake -E capabilties reportscheffle2021-05-101-0/+6
| |
* | Help: Fix typos and spelling in documentationJosef Angstenberger2021-05-071-1/+1
|/
* cmake(1): Change wording for fields in presetsfriendlyanon2021-04-211-3/+3
| | | | | | The placement of the word "optionally" implied that the fields mentioned before are not optional, which is not the case starting from version 3 of the presets.
* Help: Add 3.20 release note for error on unknown argumentsBrad King2021-04-141-0/+1
| | | | | | | This was left out of commit 1b6c5333a0 (cmake: Error out on unknown arguments starting with `-`., 2020-11-30, v3.20.0-rc1~370^2). Fixes: #22060
* cmake: Add support for '--build --prefix=<prefix>' form of the argumentBrad King2021-02-231-1/+1
| | | | | | | The main `cmake --preset` argument for configure presets supports both forms, so support it for `cmake --build --preset` too. Issue: #21855
* cmake: Document '--preset <preset>' form of the argumentBrad King2021-02-231-1/+1
| | | | | | This form already works. Document it and add tests. Issue: #21855
* Help: Add documentation for buildPresets and testPresetsSam Freed2021-02-011-3/+19
|
* Merge topic 'cmake-presets-path-arg'Craig Scott2020-10-271-17/+15
|\ | | | | | | | | | | | | b7d7eca66d CMakePresets.json: Rework how --preset argument is handled Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5416
| * CMakePresets.json: Rework how --preset argument is handledKyle Edwards2020-10-261-17/+15
| | | | | | | | | | | | | | | | If a path argument with no -S or -B leads to a cache directory, use that directory as the binary directory. Otherwise, use the binary directory from the preset. Fixes: #21311
* | Merge topic 'cmake-presets-doc-move'Kyle Edwards2020-10-201-328/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | 4a123fc28c Help: Clarify purpose of warnings and errors 6c74bcfc20 Help: Make architecture and toolset descriptions generic 45766789a0 Help: Add inheritance to CMakePresets.json example 88c9d6f6eb Help: Add documentation for debug field efab856008 Help: Show environment field 2208db114c Help: Show multiple ways of doing cacheVariables d30f85193f Help: Move vendor field into example b9c8c57860 Help: s/unusedVars/unusedCli/ ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5373
| * Help: Move CMakePresets.json documentation into a separate fileKyle Edwards2020-10-191-328/+4
| |
* | server: remove deprecated 'cmake -E server' modeBrad King2020-10-141-0/+1
|/ | | | | | The server mode has been deprecated since commit 996e1885c4 (server: deprecate in favor of the file-api, 2019-04-19, v3.15.0-rc1~198^2). Clients should now be using the file-api. Remove the server mode.
* Help: Fix invalid code-block in cmake(1) manualKyle Edwards2020-10-141-1/+1
| | | | Fixes: #21304
* Tests: Test the CMakePresets.json example in the documentationKyle Edwards2020-10-091-25/+2
|
* Help: Fix documentation of CMakePresets.json's cacheVariablesKyle Edwards2020-10-091-4/+3
| | | | | | cacheVariables is a map with variable names as the keys, but the example in the documentation was not updated to reflect this. Fix the example.
* CMakePresets.json: Prohibit empty variable namesKyle Edwards2020-10-061-15/+17
|
* Help: Add presets documentation and release notesKyle Edwards2020-10-051-0/+368
|
* cmake_language: Add signature to DEFER calls to later timesBrad King2020-09-291-1/+6
| | | | Fixes: #19575
* Fix typos identified using codespellJean-Christophe Fillion-Robin2020-07-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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,\ " ```
* cmake: Add -E create_hardlinkSibi Siddharthan2020-07-151-0/+7
| | | | | Fixes: #20950 Signed-off-by: Sibi Siddharthan <sibisiddharthan.github@gmail.com>
* cmake: Remove broken '--warn-unused-vars' optionBrad King2020-06-291-3/+3
| | | | | | | | | | | | | This option has been broken since commit b9f9915516 (cmMakefile: Remove VarUsageStack., 2015-05-17, v3.3.0-rc1~52^2). That commit removed the check that an initialized variable has actually been used and caused the option to warn on every variable ever set. This was not caught by the test suite because the test for the feature only checked that warnings appear when needed and not that they do not appear when not needed. The option was never very practical to use. Remove it to avoid the runtime cost of usage tracking and checks for every variable (which we were doing even when the option was not used).
* cmake-install: implement default directory permissionsAsit Dhal2020-06-251-0/+3
| | | | | | provide an argument for default directory permissions in cmake --install Fixes: #20700