summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmake: Stop parsing after `--` when detecting script modeRobert Maynard2023-02-081-5/+7
| | | | | | | | The fix in commit 08aa516880 (cmake: Stop parsing after `--` when detecting script mode, 2022-12-06, v3.26.0-rc1~216^2) only corrected the case where `-P -- -P <arg>` occurred and not `-P -- -P -<other>`. Fixes: #24220
* cmake: Stop parsing after `--` when detecting script modeRobert Maynard2022-12-061-0/+5
| | | | Fixes #24220
* cmDocumentationEntry: Drop all user provided ctors for C++ >= 14Alex Turbov2022-11-171-4/+6
| | | | | | | | | | | There is no need for them cuz: - the last field has a default value - all static instances use 2 arguments convertible to `std::string` - "dynamic" instances used for _Generator_ doc entries access fields diectly using default constructed instance Moreover, compiler may generate move ctor/assign when needed.
* cmDocumentation: `char*[][2]` → `cmDocumentationEntry[N]`Alex Turbov2022-11-171-14/+10
| | | | | | | | | | Use fixed size arrays of `cmDocumentationEntry` items instead of open arrays of two `char` pointers when describe program options help screens. Also, drop `const char*[][2]` overloads of methods of `cmDocumentation` and `cmDocumentationSection` classes in the sake of generic (template) appenders introduced earlier.
* ctest.cxx: Eliminate redundand trenary operatorAlex Turbov2022-11-171-1/+1
|
* cmakemain.cxx: Remove always true preprocessor `#if` blockAlex Turbov2022-11-171-2/+0
|
* cmake: --build improve detection of no build dirRobert Maynard2022-11-141-19/+7
| | | | Fixes #24157
* Merge topic 'cmake-presets-workflow-arguments'Brad King2022-10-271-5/+27
|\ | | | | | | | | | | | | | | | | | | | | 7ecbe324b0 cmake --workflow: add --fresh option 7d9aa0f00c cmake::Workflow: Refactor to use enum class argument 322193afcd cmake --workflow: print usage and exit on unrecognized argument 70aef29427 cmake --workflow: print usage message Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7825
| * 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: Honor CMAKE_GENERATOR env var in --help outputJuan Ramos2022-10-211-1/+1
|/
* 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
| |