summaryrefslogtreecommitdiff
path: root/Source/cmakemain.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Refactoring: Third-parties public headers are under cm3p prefixMarc Chevrier2020-05-071-2/+4
| | | | Fixes: #20666
* Fix build warnings for unused functionsWouter Klouwen2020-05-011-0/+2
| | | | | | | | | | This commit addresses two sources of build errors when using the warning flag -Werror=unused-function for GCC in the default compiler flags. The affected functions are not used when building in bootstrap mode and therefore should be ifdefed out. No functional changes.
* cmState::GetCacheEntryProperty: return cmPropVitaly Stakhovsky2020-03-251-4/+4
|
* cmState::GetCacheEntryValue: return cmPropVitaly Stakhovsky2020-03-171-1/+1
|
* cmake: add command line options to output script profiling dataWouter Klouwen2020-03-071-0/+6
| | | | | | | | | | | | | | | For users of CMake who want to optimize their scripts if they take a while to run, this commit adds the ability to output profiling data. To enable this output, it adds the two command line parameters to select the output path and format. This commit adds the first profiling format of type ``google-trace``, which is the output is a JSON file containing Duration events as per the Google Trace Format specification: https://docs.google.com/document/d/1CvAClvFfyA5R- PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#
* Refactor: Allow generators to decide default configuration for buildKyle Edwards2020-02-041-1/+1
| | | | And allow them to read any cache values they need.
* Merge topic 'traceJSON'Kyle Edwards2019-12-271-0/+1
|\ | | | | | | | | | | | | | | e113ab1168 trace: Add test for the JSON-v1 trace 482497e0de trace: Add JSON output format Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4102
| * trace: Add JSON output formatDaniel Mensinger2019-12-231-0/+1
| | | | | | | | | | | | | | | | Add a new `--trace-format=` flag, to enable the new JSON trace output format. This new format is easier to parse by machines than the existing format. This new format also removes the ambiguity of the whitespace in the "old" format (e.g. is that whitespace part of a file path, or does it seperate arguments)
* | Merge topic 'add_find_call_debugging'Kyle Edwards2019-12-201-0/+1
|\ \ | |/ |/| | | | | | | | | | | | | f3c9396260 Help: Document CMAKE_FIND_DEBUG_MODE 204b8d9f4e find_*: Use debug logging infrastructure a7ea20649d find_*: Add debug logging infrastructure Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3935
| * find_*: Add debug logging infrastructureRobert Maynard2019-12-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Enable debug messages a new `--find-debug` command-line option or via the `CMAKE_FIND_DEBUG_MODE` variable. This work was started by Chris Wilson, continued by Ray Donnelly, and then refactored by Robert Maynard to collect information into a single message per find query. Co-Author: Ray Donnelly <mingw.android@gmail.com> Co-Author: Chris Wilson <chris+github@qwirx.com>
* | Refactoring: use append functions from cmext/algorithmMarc Chevrier2019-12-171-10/+11
|/
* Windows: Restore suppression of error report popups in CI buildsBrad King2019-11-151-1/+0
| | | | | | | | | | | | | On Windows, libuv uses `_CrtSetReportHook` to install a handler it uses to suppress assertions on invalid file descriptors in `_get_osfhandle`. This removes the handler we install in CI environments to suppress interactive popups. Move installation of our handler to after libuv is initialized so that our handler is actually used. Unfortunately this also removes libuv's handler and so may cause Debug builds under CI to abort on invalid file descriptors instead of simply converting them to `INVALID_HANDLE_VALUE`. If this becomes a problem we may need to modify libuv to make its hook more configurable.
* message: Support logging a context with each messageAlex Turbov2019-10-121-0/+1
|
* CLI: Rename --loglevel to --log-level for naming consistencyCraig Scott2019-10-101-2/+3
| | | | | | | Other multi-word command line options use hyphens to separate the words, so the --loglevel option introduced in CMake 3.15 was inconsistent in this regard. Rename it to --log-level but still support the original --loglevel name to preserve backward compatibility.
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-2/+2
| | | | | 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.
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-2/+2
|
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is generated by a python script that uses regular expressions to search for string concatenation patterns of the kind ``` std::string str = <ARG0>; str += <ARG1>; str += <ARG2>; ... ``` and replaces them with a single `cmStrCat` call ``` std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...); ``` If any `<ARGX>` is itself a concatenated string of the kind ``` a + b + c + ...; ``` then `<ARGX>` is split into multiple arguments for the `cmStrCat` call. If there's a sequence of literals in the `<ARGX>`, then all literals in the sequence are concatenated and merged into a single literal argument for the `cmStrCat` call. Single character strings are converted to single char arguments for the `cmStrCat` call. `std::to_string(...)` wrappings are removed from `cmStrCat` arguments, because it supports numeric types as well as string types. `arg.substr(x)` arguments to `cmStrCat` are replaced with `cm::string_view(arg).substr(x)`
* Merge topic 'trace-redirect'Brad King2019-08-201-0/+2
|\ | | | | | | | | | | | | 3c94069660 Add --trace-redirect parameter to redirect trace output to a file Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3645
| * Add --trace-redirect parameter to redirect trace output to a fileIgor Ivanov2019-08-101-0/+2
| |
* | Merge topic 'cmStringAlgorithms_ulong'Kyle Edwards2019-08-161-2/+2
|\ \ | | | | | | | | | | | | | | | | | | 935fbe0b04 cmStringAlgorithms: Add cmStrToLong and cmStrToULong Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3681
| * | cmStringAlgorithms: Add cmStrToLong and cmStrToULongSebastian Holtermann2019-08-101-2/+2
| |/ | | | | | | | | | | | | | | This adds the following functions to cmStringAlgorithms: - `cmStrToLong`: moved from `cmSystemTools::StringToLong` - `cmStrToULong`: moved from `cmSystemTools::StringToULong` Overloads of the given functions for `std::string` are added as well.
* | Refactor: Convert all instances of CMAKE_BUILD_WITH_CMAKE to CMAKE_BOOTSTRAPKitware Robot2019-08-091-9/+9
|/
* cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.hSebastian Holtermann2019-07-291-0/+1
| | | | | This adds the `cmStringAlgorithms.h` header and moves all string functions from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
* Refactor: Use anonymous namespace instead of `static`sAlex Turbov2019-07-101-61/+55
| | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
* Refactor: Remove one-time used macrosAlex Turbov2019-07-101-31/+30
| | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
* Refactor: Optimize some stream output operationsAlex Turbov2019-07-101-3/+1
| | | | | | | - remove redundant `std::flush` right after `std::endl` - join some string literals Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
* Help: Use consistent levels for cmake --loglevel and message()Craig Scott2019-07-081-1/+1
| | | | | | | | | | The message() command requires uppercase log levels. Even though the cmake --loglevel option is not case sensitive, show the supported values as uppercase to match the message() docs as closely as possible, since they are related to the same feature. Also fixes the wrong string being shown for the warning level by cmake --help.
* Use cmAppend to append ranges to std::vector instancesSebastian Holtermann2019-05-231-1/+1
|
* Merge topic 'std-pipes-always'Brad King2019-05-031-0/+1
|\ | | | | | | | | | | | | | | c85524a94a Ensure stdin, stdout, and stderr pipes are always open Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kyle Edwards <kyle.edwards@kitware.com> Merge-request: !3282
| * Ensure stdin, stdout, and stderr pipes are always openBrad King2019-05-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | On non-Windows platforms libuv assumes that file descriptors 0-2 are always used for standard pipes and never for anything else. Otherwise, libuv may re-use one of these descriptors and then fail an assertion when closing it. Similarly, On Windows platforms our ConsoleBuf implementation assumes that the standard handles are always open. If CMake is run with any standard pipes closed, open them with `/dev/null` or `NUL` to satisfy these assumptions. Fixes: #19219