summaryrefslogtreecommitdiffstats
path: root/Source/cmcmd.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'bootstrap-ninja'Brad King2020-08-111-1/+1
|\ | | | | | | | | | | | | 491dddfbde Bootstrap: Add support for Ninja Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3652
| * Bootstrap: Add support for NinjaKyle Edwards2020-08-101-1/+1
| |
* | cmake: Change cmake_llvm_rc separator from -- to ++ to avoid conflictThomas Bernard2020-08-071-2/+6
|/
* cmake: Add -E create_hardlinkSibi Siddharthan2020-07-151-0/+29
| | | | | Fixes: #20950 Signed-off-by: Sibi Siddharthan <sibisiddharthan.github@gmail.com>
* Clean a few string conversionsVitaly Stakhovsky2020-07-091-12/+7
|
* cmake: add dedicated error for -E compare_files invalid argumentsAsit Dhal2020-06-151-1/+1
| | | | | | Return 2 when user provides invalid arguments Fixes: #20815
* cmake: remove -E compare_files error message if files differAsit Dhal2020-06-101-2/+0
| | | | | | It is not an error for the files to be different. Fixes: #20803
* Refactoring: Third-parties public headers are under cm3p prefixMarc Chevrier2020-05-071-2/+1
| | | | Fixes: #20666
* Merge topic 'win-user-manifest-rc'Brad King2020-04-221-3/+12
|\ | | | | | | | | | | | | 7ca13e04fa Windows: Merge user-provided manifests into compiled resource Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4484
| * Windows: Merge user-provided manifests into compiled resourceKenney Phillis2020-04-211-3/+12
| | | | | | | | | | | | Previously we merged user-provided manifests only into the manifest file given to the linker. Merge them into the manifest file that is compiled as a resource too.
* | Refactoring: add cm::contains to <cmext/algorithm>Marc Chevrier2020-04-171-2/+1
| |
* | Merge topic 'cat_cmd_20557'Kyle Edwards2020-04-161-0/+35
|\ \ | | | | | | | | | | | | | | | | | | a625f30785 cmake -E: add cat command. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4600
| * | cmake -E: add cat command.Johnny Jazeix2020-04-151-0/+35
| |/ | | | | | | | | | | Concatenate files and print on the standard output. FIXES: #20557
* | clang-tidy: address bugprone-branch-clone lintsBen Boeckel2020-04-131-3/+2
|/ | | | | | | | | Arguably, many of these are bugs in `clang-tidy`. An if/else tree with other conditionals between cloned blocks may be relying on the intermediate logic to fall out of the case and inverting this logic may be non-trivial. See: https://bugs.llvm.org/show_bug.cgi?id=44165
* Merge topic 'llvm-rc-include-path'Brad King2020-04-071-5/+15
|\ | | | | | | | | | | | | 35a29ec827 llvm-rc: Restore include path for data after explicit preprocessing Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4570
| * llvm-rc: Restore include path for data after explicit preprocessingThomas Bernard2020-04-061-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 1c2d031cbd (Add -E cmake_llvm_rc to preprocess files for llvm-rc, 2020-01-14, v3.17.0-rc1~24^2) with llvm-rc we explicitly preprocess RC source files and then compile separately without -I flags. This broke cases where the RC source references data files adjacent to itself or in the include path. This change adds the expansion of the include paths when calling the llvm-rc in order for the resource files to be picked up correctly by llvm-rc. Since the RC compiled file is first preprocessed, the file being compiled by llvm-rc resides in the build directory. In order for llvm-rc to find the resource data specified relative to the .rc file being compiled, the source file path is preppended in the include list so that the original source path takes priority over all the other includes paths specified. A space was added in the CMAKE_INCLUDE_FLAG_RC to make the include directive work properly for llvm-rc. Checks on the rc.exe showed that the syntax change doesn't affect it's proper operation. Fixes: #20529
* | Merge topic 'llvm-rc-stderr'Brad King2020-03-271-0/+9
|\ \ | |/ | | | | | | | | | | dc93cbb0d8 llvm-rc: Print stderr output when calling tools through cmake_llvm_rc Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4525
| * llvm-rc: Print stderr output when calling tools through cmake_llvm_rcThomas Bernard2020-03-261-0/+9
| | | | | | | | | | | | The stored error pipe is output if the program fails. Fixes: #20494
* | Merge topic 'cleanup-endls-3'Brad King2020-03-261-6/+8
|\ \ | | | | | | | | | | | | | | | | | | 8e3a65d963 Refactor: Avoid `std::endl` where it's not necessary (part 3) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4517
| * | Refactor: Avoid `std::endl` where it's not necessary (part 3)Alex Turbov2020-03-241-6/+8
| |/ | | | | | | | | | | | | | | | | | | | | | | The `std::endl` manipulator, except inserting `\n` character, also performs `os.flush()`, which may lead to undesired effects (like disk I/O in the middle of forming data strings). For the `std::stringstream` it also has no meaning. * replace multiple `operator<<` calls on a string literal w/ the only call and the only (bigger) string literal; * replace one character string literal used in `operator<<` w/ a char literal.
* | replace "std::string::find(x) == 0" with cmHasPrefix()Rolf Eike Beer2020-03-231-3/+3
| |
* | replace "substr(0, xx) ==" with cmHasPrefix()Rolf Eike Beer2020-03-231-3/+2
|/
* Add -E cmake_llvm_rc to preprocess files for llvm-rcThomas Bernard2020-02-041-0/+111
| | | | | | | | | llvm-rc requires preprocessed rc files. The CMake command line tool cmake_llvm_rc enables channing the preprocessor call and the resource compiler and make this appear as single compilation step. When llvm-rc is detected as resource compiler, the RC compilation step is set to use this command.
* GlobalGenerator family: modernize memory managementMarc Chevrier2020-01-071-4/+4
|
* Refactoring: use append functions from cmext/algorithmMarc Chevrier2019-12-171-3/+5
|
* cmLocalGenerator: modernize memory managementMarc Chevrier2019-12-091-1/+1
|
* Add support for WINDOWS_EXPORT_ALL_SYMBOLS when cross-compiling to WindowsIsuru Fernando2019-12-061-8/+7
| | | | Implement `__create_def` using `llvm-nm` (when given as `CMAKE_NM`).
* cmake -E: Add rm with improved semantics over remove and remove_directoryJohnny Jazeix2019-11-131-10/+82
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-6/+9
| | | | | 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.
* Autogen: Make cmQtAutoMocUic a free functionSebastian Holtermann2019-09-281-2/+2
|
* Autogen: Make cmQtAutoRcc a free functionSebastian Holtermann2019-09-281-2/+1
|
* Autogen: Refactor json info file reading interfaceSebastian Holtermann2019-09-281-7/+7
|
* Autogen: Variable renames and cleanupsSebastian Holtermann2019-09-251-4/+4
|
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-4/+4
|
* clang-tidy: modernize-use-autoRegina Pfeifer2019-09-101-1/+1
| | | | | | Set the MinTypeNameLength option to an impossibly high value in order to limit the diagnostics to iterators. Leave new expressions and cast expressions for later.
* Windows: Prevent auto exports to be regenerated on every buildDaniel Eiband2019-09-091-8/+25
| | | | | | | Check modified time stamps of input files against an existing exports file before generating the auto exports. Fixes: #19650
* clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-031-2/+2
|
* Merge topic 'clang-ipo-support'Brad King2019-09-031-2/+11
|\ | | | | | | | | | | | | | | | | | | dca9c33abc Tests: Remove old IPO test c856d4556b bindexplib: supporting llvm bitcode formats using llvm-nm 079b8e2916 Clang: prefer lld-link over link.exe 6e3655db2c Clang: add LTO support for GNU-command line clang on windows Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3527
| * bindexplib: supporting llvm bitcode formats using llvm-nmZsolt Parragi2019-08-301-2/+11
| |
* | Merge topic 'remove_directory-symlink'Brad King2019-08-301-4/+11
|\ \ | |/ |/| | | | | | | | | e6c9a8bac3 cmake: Teach -E remove_directory to remove directory symlinks Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3738
| * cmake: Teach -E remove_directory to remove directory symlinksJon Chronopoulos2019-08-301-4/+11
| | | | | | | | | | | | | | If the argument to `remove_directory` is a symlink to a directory, remove the symlink instead. Issue: #19533
* | Source sweep: Replace cmExpandList with the shorter cmExpandedListSebastian Holtermann2019-08-231-6/+3
|/ | | | | | | | | | | | This replaces the code pattern ``` std::vector<std::string> args; cmExpandList(valueStr, args, ...) ``` with ``` std::vector<std::string> args = cmExpandedList(valueStr, ...) ```
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 'isolate-declarations'Brad King2019-08-221-2/+4
|\ | | | | | | | | | | | | d331021255 clang-tidy: isolate declarations for readability Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3704
| * clang-tidy: isolate declarations for readabilityRegina Pfeifer2019-08-201-2/+4
| |
* | Merge topic 'cm-contains'Brad King2019-08-211-7/+1
|\ \ | |/ |/| | | | | | | | | | | | | 2dfc52675c cmAlgorithms: Add cmContains Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Sebastian Holtermann <sebholt@web.de> Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de> Merge-request: !3700
| * cmAlgorithms: Add cmContainsRegina Pfeifer2019-08-191-7/+1
| | | | | | | | Also, use the new function where applicable.
* | Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-4/+3
|/ | | | | | | | | This replaces invocations of - `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn` - `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND` - `cmSystemTools::IsOn` with `cmIsOn` - `cmSystemTools::IsOff` with `cmIsOff`
* Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgumentSebastian Holtermann2019-08-141-6/+5
|
* Refactor: Convert all instances of CMAKE_BUILD_WITH_CMAKE to CMAKE_BOOTSTRAPKitware Robot2019-08-091-12/+12
|