summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Refactor: Use anonymous namespace instead of `static`sAlex Turbov2019-07-091-61/+55
| | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
* Refactor: Remove one-time used macrosAlex Turbov2019-07-091-31/+30
| | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
* Refactor: Optimize some stream output operationsAlex Turbov2019-07-091-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
* | Merge topic 'jobs-positive-value'Brad King2019-05-031-3/+21
|\ \ | |/ |/| | | | | | | | | 6ad699358b cmake: --build -j <jobs> should not accept 0. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3255
| * cmake: --build -j <jobs> should not accept 0.Fred Baksik2019-05-011-3/+21
| | | | | | | | Fixes #19059
* | message(): Add support for log levelsAlex Turbov2019-04-281-0/+2
|/ | | | | Relates: #18943 Co-Authored-By: Craig Scott <craig.scott@crascit.com>
* Merge topic 'cmake--install'Kyle Edwards2019-03-191-0/+125
|\ | | | | | | | | | | | | | | | | | | | | 73f23d1e00 cmake: add '--install <dir>' option Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alex Turbov <i.zaufi@gmail.com> Acked-by: Bartosz <gang65@poczta.onet.pl> Acked-by: Cristian Adam <cristian.adam@gmail.com> Rejected-by: Alex Turbov <i.zaufi@gmail.com> Merge-request: !3069
| * cmake: add '--install <dir>' optionJiang Yi2019-03-161-0/+125
| | | | | | | | Fixes: #19023
* | cmake: add short version of '--target <tgt>...' optionBartosz Kosiorek2019-03-121-3/+5
| |
* | cmake: Reformat '--parallel' and '--verbose' options in helpBartosz Kosiorek2019-03-121-5/+5
|/
* cmake: Teach --build mode to support multiple targetsBartosz Kosiorek2019-03-051-16/+28
| | | | Fixes: #16136
* cmakemain: Remove ignored --use-stderr option from command line helpBartosz Kosiorek2019-03-041-1/+0
|
* Merge branch 'master' into cmake_role-vs-fixKyle Edwards2019-02-261-17/+21
|\
| * cmake: Progress functions use `std::string` paramVitaly Stakhovsky2019-02-111-6/+7
| |
| * cmSystemTools: MessageCallback and Message() accept std::string argumentVitaly Stakhovsky2019-02-071-11/+14
| |
* | CMAKE_ROLE: Fix value in --build for Visual Studio generatorsKyle Edwards2019-02-261-1/+1
|/ | | | Fixes: #18990
* MessageCallback: Remove unused bool& argumentRegina Pfeifer2019-01-291-13/+10
|
* Use `std::function` for callbacksRegina Pfeifer2019-01-291-17/+29
|
* cmake: Add options for verbose output to --build modeFlorian Maushart2019-01-281-1/+8
| | | | | | | | | | | | While we already support `VERBOSE` environment variable and `CMAKE_VERBOSE_MAKEFILE` cached variable, add `-v` and `--verbose` command line options to be able to activate verbose output directly from CMake's build tool mode command line. Also make `msbuild` honor the verbosity setting. `xcodebuild` still doesn't honor the verbosity setting as it will need a policy added and reworking of cmGlobalGenerator and cmsys to support multiple command invocation.
* Merge topic 'cmake_build_jobs_supports_no_space'Brad King2019-01-231-19/+36
|\ | | | | | | | | | | | | | | f2fca92686 cmake: --build supports '-jN' e463133cd2 Tests: Remove unused files from RunCMake.CommandLine test Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2819
| * cmake: --build supports '-jN'Robert Maynard2019-01-221-19/+36
| |
* | Merge topic 'help-mark-default-generator'Brad King2019-01-221-4/+2
|\ \ | |/ |/| | | | | | | | | | | | | dfd5ae7da7 Help: Mark default CMake generator with asterisk 6023fe7ff2 ccmake: Append rather than replace Generators section of docs 7408cd3929 cmake: Return generator docs directly Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2682
| * cmake: Return generator docs directlyArtur Ryt2019-01-181-4/+2
| | | | | | | | | | | | | | | | | | The GetGeneratorDocumentation() function was not accurately named and required the vector to populate to be passed as a function argument. This commit makes the slightly renamed function return by value, making it a true getter as implied by its name. Some minor refactoring of the implementation also makes the steps of populating the vector clearer.
* | clang-tidy: Use emplaceRegina Pfeifer2019-01-171-6/+6
|/
* Properties: Add CMAKE_ROLE global propertyKyle Edwards2019-01-171-5/+17
| | | | | This property allows scripts to determine whether they're in project mode, script mode, find-package mode, CTest, or CPack.
* cmake: Stop processing if -P option lacks file nameCraig Scott2019-01-131-5/+5
| | | | | | | While an error message was being logged, processing was continuing nonetheless except with the -P argument omitted. This could have allowed unintended effects if the remaining arguments formed a valid set of command line options.
* cmake: -S and -B can be used to specify source and build directoriesRobert Maynard2018-09-151-1/+2
| | | | | | Document the previously internal option of '-B' and provide a matching source directory option with '-S'. Both '-B', and '-S' can be used independently of each other.
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-30/+37
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* cmake: Add options for parallel builds to --build modeFlorian Maushart2018-05-251-1/+49
| | | | | | | While we already support `cmake --build . -- -j`, the options after `--` are specific to the native build tool. Add new options `--parallel [<N>]` and `-j [<N>]` to abstract this and map to the proper option for the native build tool.
* Extend libuv file translate mode workaround to all executablesBrad King2018-01-231-16/+1
| | | | | | | | | | | | | | | Since libuv commit v1.14.1~7 (win: add uv__once_init() calls, 2017-08-30) the libuv initialization of the file translate mode may take place even if we do not use a uv loop. This change was included in our libuv update commit f4a26c748b (libuv 2018-01-19). Therefore use of libuv even through `cmSystemTools::GetRealPath` in any executable may trigger its file translate mode setting. Factor out the logic added to `cmake.exe` by commit v3.9.0-rc4~10^2 (cmake: Fix default file translate mode when using libuv, 2017-06-13) and re-use to initialize all executables. Issue: #16962
* cmake: Add --open option for IDE generatorsGregor Jasny2017-10-131-0/+43
|
* Merge topic 'string-clear'Brad King2017-09-191-2/+2
|\ | | | | | | | | | | | | 5db3aac1 Meta: replace empty-string assignments with `clear()`. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1276
| * Meta: replace empty-string assignments with `clear()`.Pavel Solodovnikov2017-09-151-2/+2
| |
* | bootstrap: Make libuv available during bootstrapBrad King2017-09-171-3/+4
|/ | | | | | | On UNIX, build only the parts of libuv we need for the filesystem, process, and poll abstractions using the POSIX poll() backend. This avoids many platform-specific conditions. On Windows, build all of libuv; there are no conditional alternatives anyway.
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-8/+6
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* use static_cast<> for casts from void*Rolf Eike Beer2017-09-011-1/+1
|
* Merge topic 'fix-find-package-mode'Brad King2017-08-301-1/+1
|\ | | | | | | | | | | | | 18454ea4 cmake: Fix --find-package mode with imported targets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1208
| * cmake: Fix --find-package mode with imported targetsBrad King2017-08-291-1/+1
| | | | | | | | | | | | | | | | The change in commit v3.9.0-rc1~116^2~6 (cmakemain: use script role for -P, 2017-05-11) accidentally left project commands out of find-package mode, causing packages that provide imported targets to break. Fixes: #17124
* | Merge topic 'cstyle-casts'Daniel Pfeifer2017-08-301-5/+5
|\ \ | | | | | | | | | | | | | | | | | | 190e3825 Replace C-style casts Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1176
| * | Replace C-style castsDaniel Pfeifer2017-08-271-5/+5
| | |
* | | IWYU: Mark cmConfigure.h with pragma: keepDaniel Pfeifer2017-08-261-2/+1
|/ / | | | | | | Also remove `#include "cmConfigure.h"` from most source files.
* | Use C++11 nullptrDaniel Pfeifer2017-08-241-13/+12
| |
* | Make libuv available to all parts of CMakeBrad King2017-08-081-11/+6
|/ | | | | | | The libuv library provides many useful platform abstractions and better process management than KWSys. We'd like to use it everywhere instead of just in the server mode. Drop the `CMAKE_USE_LIBUV` option and use libuv everywhere except during bootstrap.
* cmake: Fix default file translate mode when using libuvBrad King2017-06-141-0/+16
| | | | | | | | | | | | | On Windows, libuv's one-time initialization changes the C runtime library's `_fmode` setting to `_O_BINARY`, thus causing files to open as binary after that instead of the default `_O_TEXT` mode. See upstream libuv issue 840. Work around the problem by performing libuv initialization early and then restoring `_fmode`. In particular, this currently affects server mode. Without this fix, the `_fmode` setting changes when the server mode initializes libuv. Fixes: #16962
* cmakemain: use script role for -PDaniel Pfeifer2017-05-111-1/+3
|
* cmake: initialize with Role that controls which commands to registerDaniel Pfeifer2017-05-081-4/+4
|