summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmake --workflow: add --fresh optionKyle Edwards2022-10-261-1/+10
| | | | Fixes: #24073
* cmake::Workflow: Refactor to use enum class argumentKyle Edwards2022-10-261-4/+8
|
* cmake --workflow: print usage and exit on unrecognized argumentKyle Edwards2022-10-261-0/+2
| | | | Issue: #24073
* cmake --workflow: print usage messageKyle Edwards2022-10-251-1/+8
|
* cmake: Add --workflow modeKyle Edwards2022-09-271-0/+65
| | | | Fixes: #23118
* Help: Use placeholder instead of listing choices in option linesAlex Turbov2022-08-141-6/+5
| | | | | This avoids any ambiguity with whether the choices are literal values or not. It also makes the option lines more concise.
* Help: Short options first, then long, then Windows styleAlex Turbov2022-08-141-2/+2
|
* Help: Value for `--graphviz=` option actually is mandatoryAlex Turbov2022-08-041-1/+1
| | | | Before it was `[file]` that AFAIK means optional.
* cmake: In -P mode ignore flags like `--version` after `--`Robert Maynard2022-07-221-1/+1
| | | | Fixes: #21031
* clang-tidy: address `google-readability-casting` lintsBen Boeckel2022-05-241-2/+2
| | | | At least those involving `static_cast`.
* Merge topic 'ignore-werror-command-arg'Brad King2022-05-191-0/+3
|\ | | | | | | | | | | | | 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/+3
| | | | | | | | | | | | | | Add command-line option `--compile-no-warning-as-error` to ignore value of `COMPILE_WARNING_AS_ERROR`. Issue: #19085
* | Refactor: Use cmCommandLineArgument::setTo{True,Value}()Kyle Edwards2022-04-181-68/+19
| |
* | Merge topic 'correct_list-presets_parsing'Brad King2022-04-121-2/+3
|\ \ | |/ |/| | | | | | | | | | | 45299a8f9b cmake: --list=presets=[type] doesn't generate incorrect warnings Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7164
| * cmake: --list=presets=[type] doesn't generate incorrect warningsRobert Maynard2022-04-111-2/+3
| | | | | | | | Fixes #23407
* | cmake: Add --fresh option to clear the cache and start from scratchBrad King2022-03-221-0/+2
|/ | | | | | | 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 --build: prioritize --resolve-package-references over presetCarsten Rudolph2022-02-151-1/+1
| | | | Fixes: #23224
* Merge topic 'message-flush'Brad King2022-01-281-2/+2
|\ | | | | | | | | | | | | 634587e322 message: Restore explicit flushing of messages on stderr Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6913
| * message: Restore explicit flushing of messages on stderrBrad King2022-01-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the `cmake` command-line tool, the `message()` command with no message mode argument prints the message stderr using the C++ `cerr` stream. Since commit 0a0a0f8a74 (cmMessenger: Color messages to terminal by type, 2021-05-18, v3.21.0-rc1~146^2) and an update by commit c7a8c9c811 (cmMessenger: Revert to non-color messages on Windows, 2021-07-20, v3.21.1~15^2), we print the newline at the end of the message using just `\n`. We've now observed some cases of output on stdout and stderr getting jumbled when the two go to the same file descriptor. Previously the newline was printed with `endl`, which implicitly flushes. Flush explicitly to restore that behavior. Fixes: #23155
* | cmGlobalVisualStudio10Generator: Auto restore NuGet packages.Carsten Rudolph2022-01-221-0/+23
| |
* | cmBuildOptions: Split build arguments into separate object.Carsten Rudolph2022-01-221-1/+3
| |
* | cmake: Add filtered debug-find optionsJohn Parent2021-12-171-0/+4
| | | | | | | | | | | | | | | | | | | | 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
* | Rename cmProp in cmValueMarc Chevrier2021-09-211-3/+3
|/
* cmMessenger: Revert to non-color messages on WindowsBrad King2021-07-201-0/+11
| | | | | | | | | | | | | | | Since commit 0a0a0f8a74 (cmMessenger: Color messages to terminal by type, 2021-05-18, v3.21.0-rc1~146^2) the message output no longer goes through our custom streambuf on Windows that converts output encoding. This can cause messages to be printed with the wrong encoding in a Windows Console. It also causes messages to have a mix of LF and CRLF newlines because `stderr` converts LF to CRLF but our custom streambuf does not. Revert to using just `cerr` for messages on Windows. Another approach will be needed to achieve color output on Windows later. Fixes: #22444
* Help: Clarify 'cmake --build' signature alternativesBrad King2021-07-131-1/+4
| | | | | | | | | | | | | | | | 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 'message-color'Brad King2021-05-211-11/+16
|\ | | | | | | | | | | | | | | 0a0a0f8a74 cmMessenger: Color messages to terminal by type bceb8e2ed2 cmMessenger: Pass title inside a metadata structure Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6105
| * cmMessenger: Color messages to terminal by typeMarius Messerschmidt2021-05-201-4/+7
| | | | | | | | Fixes: #16183
| * cmMessenger: Pass title inside a metadata structureMarius Messerschmidt2021-05-191-10/+12
| |
* | cmCommandLineArgument: Understands which commands require partial matchingRobert Maynard2021-05-191-2/+4
|/ | | | | Allows us to provide better error messages when commands such as `--target` are passed invalid input.
* cmake: `--build` and `--install` error out when encountering bad flagsRobert Maynard2021-05-131-2/+24
| | | | Fixes #22186
* cmake: Add support for '--build --prefix=<prefix>' form of the argumentBrad King2021-02-231-1/+2
| | | | | | | 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
* cmake-presets: Add build and test presetsSam Freed2021-02-011-8/+41
| | | | Fixes: #21391
* cmake: --install now uses cmCommandLineArgumentRobert Maynard2021-01-061-54/+51
| | | | | This makes `--install` use the same parsing rules as the rest of the the cmake executable
* cmake: --build now uses cmCommandLineArgumentRobert Maynard2021-01-061-83/+95
| | | | | This makes `--build` use the same parsing rules as the rest of the the cmake executable
* cmake: Use shared parsing code for all cmake argv parsingRobert Maynard2021-01-061-43/+98
|
* ccmake: Don't list --preset in --helpKyle Edwards2020-10-271-0/+2
| | | | | | And show available options in cmake-gui. Fixes: #21313
* CMakePresets.json: Rework how --preset argument is handledKyle Edwards2020-10-261-2/+1
| | | | | | | | 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-E-cat-binary' into release-3.19Brad King2020-10-151-12/+11
|\ | | | | | | | | | | | | | | | | f7a5f28318 cmake: Fix '-E cat' command for binary files on Windows 90b39a5209 cmConsoleBuf: Factor out cout/cerr console buffer management f1fdd15863 clang-format: Fix include block order in ctest.cxx and cpack.cxx Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5364
| * cmake: Fix '-E cat' command for binary files on WindowsJohnny Jazeix2020-10-141-5/+8
| | | | | | | | | | | | | | Reset `std::cout` to write in binary mode with no encoding conversions. Co-Author: Brad King <brad.king@kitware.com> Fixes: #21295
| * cmConsoleBuf: Factor out cout/cerr console buffer managementBrad King2020-10-141-9/+5
| |
* | CMake: Add presets functionalityKyle Edwards2020-10-051-1/+6
| |
* | cmake: Update --help output to discourage use of --find-package modeBrad King2020-08-041-1/+1
| | | | | | | | Fixes: #21056
* | Merge topic 'supported-profiling-formats'Brad King2020-07-131-1/+3
|\ \ | |/ | | | | | | | | | | | | 9c3beb532f cmake: Show supported formats in --help output for --profiling-format Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: dublet <github@dublet.org> Merge-request: !5001
| * cmake: Show supported formats in --help output for --profiling-formatCraig Scott2020-07-111-1/+3
| | | | | | Fixes: #20943
* | Merge topic 'uv-check-return'Brad King2020-07-021-1/+3
|\ \ | |/ | | | | | | | | | | | | 0fddcc1e5b cmake: Tolerate nullptr from uv_default_loop Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kyle Edwards <kyle.edwards@kitware.com> Merge-request: !4962
| * cmake: Tolerate nullptr from uv_default_loopBrad King2020-07-011-1/+3
| | | | | | | | | | | | | | `uv_default_loop()` can return `nullptr` when running on a Linux kernel configured without `CONFIG_EVENTFD`. Fixes: #20899
* | cmake: Remove broken '--warn-unused-vars' optionBrad King2020-06-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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/+139
|/ | | | | | provide an argument for default directory permissions in cmake --install Fixes: #20700
* Single location for cmProp typedefVitaly Stakhovsky2020-06-011-0/+1
|