summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'modernize-use-auto'Brad King2019-09-121-25/+18
|\ | | | | | | | | | | | | d25a5a7ec9 clang-tidy: modernize-use-auto Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3783
| * clang-tidy: modernize-use-autoRegina Pfeifer2019-09-101-25/+18
| | | | | | | | | | | | 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.
* | cmMakefile: set GENERATED property of outputs upfrontDaniel Eiband2019-09-061-28/+20
|/ | | | | | | Setting the GENERATED property of outputs upfront is a precondition for delayed custom command creation (generator expressions in outputs). Issue: 12877
* clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-041-2/+3
| | | | | | | | Automate the conversion with perl -i -0pe 's/typedef ([^;]*) ([^ ]+);/using $2 = $1;/g' then manually fix a few places.
* clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-031-1/+1
|
* Merge topic 'add-non-empty-configurations-getter'Brad King2019-09-031-0/+10
|\ | | | | | | | | | | | | 10507c6dc0 cmMakefile: Add configurations getter with empty configuration default Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3759
| * cmMakefile: Add configurations getter with empty configuration defaultDaniel Eiband2019-08-301-0/+10
| |
* | cmSourceFile: Rename mutating GetFullPath() overloadDaniel Eiband2019-08-291-2/+2
|/ | | | Rename mutating GetFullPath() overload to ResolveFullPath().
* Merge topic 'source_sweep_ostringstream_single'Brad King2019-08-261-14/+10
|\ | | | | | | | | | | | | 3b2b02825d Source sweep: Replace std::ostringstream when used with a single append Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3726
| * Source sweep: Replace std::ostringstream when used with a single appendSebastian Holtermann2019-08-231-14/+10
| | | | | | | | | | | | | | This replaces `std::ostringstream`, when it is written to only once. If the single written argument was numeric, `std::to_string` is used instead. Otherwise, the single written argument is used directly instead of the `std::ostringstream::str()` invocation.
* | Source sweep: Replace cmExpandList with the shorter cmExpandedListSebastian Holtermann2019-08-231-28/+14
|/ | | | | | | | | | | | 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-31/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 'cm-contains'Brad King2019-08-211-12/+11
|\ | | | | | | | | | | | | | | | | 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-12/+11
| | | | | | | | Also, use the new function where applicable.
* | Merge topic 'trace-redirect'Brad King2019-08-201-1/+8
|\ \ | | | | | | | | | | | | | | | | | | 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-1/+8
| | |
* | | Merge topic 'string-literal-append'Brad King2019-08-191-2/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | da26b3be89 avoid adding multiple consecutive string literals to std::string Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3698
| * | | avoid adding multiple consecutive string literals to std::stringRolf Eike Beer2019-08-181-2/+1
| | |/ | |/| | | | | | | While at it change some single character additions to be of type char.
* | | Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-7/+7
|/ / | | | | | | | | | | | | | | | | 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-18/+18
| |
* | Refactor: Convert all instances of CMAKE_BUILD_WITH_CMAKE to CMAKE_BOOTSTRAPKitware Robot2019-08-091-16/+16
| |
* | Merge topic 'cmStringAlgorithms_move_functions'Brad King2019-08-071-5/+4
|\ \ | |/ |/| | | | | | | | | | | 959b97a27f Tests: testStringAlgorithms: Add cmTrimWhitespace, cmEscapeQuotes, cmTokenize 7fbcc16dcd cmStringAlgorithms: cmIsSpace, cmTrimWhitespace, cmEscapeQuotes, cmTokenize Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3647
| * cmStringAlgorithms: cmIsSpace, cmTrimWhitespace, cmEscapeQuotes, cmTokenizeSebastian Holtermann2019-08-051-5/+4
| | | | | | | | | | | | | | | | | | | | This adds the following functions to `cmStringAlgorithms`: - `cmIsSpace` - `cmTrimWhitespace` (moved from `cmSystemTools::TrimWhitespace`) - `cmEscapeQuotes` (moved from `cmSystemTools::EscapeQuotes`) - `cmTokenize` (moved from `cmSystemTools::tokenize` and adapted to accept `cm::string_view`)
* | cmFunctionBlocker: Move check for matching argsRegina Pfeifer2019-07-301-19/+1
| |
* | cmFunctionBlocker: Move common logic to baseRegina Pfeifer2019-07-301-1/+1
| |
* | cmMakefile: Add OnExecuteCommand callbackRegina Pfeifer2019-07-301-0/+9
|/ | | | | In cmCTestScriptHandler, port away from cmFunctionBlocker and update the elapsed time with the new callback instead.
* cmMakefile: Keep function blockers in a stackRegina Pfeifer2019-07-261-44/+26
| | | | Highlight the fact that we only ever operate on the top element.
* cmMakefile: Let AddDefinition accept a value as cm::string_viewSebastian Holtermann2019-07-241-20/+18
| | | | | | | | | | | | | | | | This changes `cmMakefile::AddDefinition` to take a `cm::string_view` as value argument instead of a `const char *`. Benefits are: - `std::string` can be passed to `cmMakefile::AddDefinition` directly without the `c_str()` plus string length recomputation fallback. - Lengths of literals passed to `cmMakefile::AddDefinition` can be computed at compile time. In various sources uses of `cmMakefile::AddDefinition` are adapted to avoid `std::string::c_str` calls and the `std::string` is passed directly. Uses of `cmMakefile::AddDefinition`, where a `nullptr` `const char*` might be passed to `cmMakefile::AddDefinition` are extended with `nullptr` checks.
* cmMakefile: Simplify and rename AddDefinitionBoolSebastian Holtermann2019-07-241-17/+5
| | | | | | | This simplifies the `cmMakefile::AddDefinition` method with bool value overload to call the string based `cmMakefile::AddDefinition` method with either an "ON" or "OFF" string. Also the method is renamed to `cmMakefile::AddDefinitionBool`
* cmState: Hold commands by valueRegina Pfeifer2019-07-211-7/+2
|
* cmCommand: deprecate functions GetMakefile and SetErrorDaniel Pfeifer2019-07-211-3/+3
| | | | | | | | | Replace the members for the Makefile and the Error with a cmExecutionStatus. Re-implement GetMakefile and SetError based on that. Both functions should be called directly on the cmExecutionStatus that is passed to InitialPass. This will help us make all Commands immutable and remove the need for cloning.
* Merge topic 'command-final-action'Brad King2019-07-191-5/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 732dd344b9 cmCommand: remove FinalPass from interface fbee46e262 cmVariableWatchCommand: Port away from FinalPass 360d415592 cmLoadCommandCommand: Port away from FinalPass 316e40baec cmInstallProgramsCommand: Port away from FinalPass 7bc88b9165 cmInstallFilesCommand: Port away from FinalPass 6a1a3763ee cmFLTKWrapUICommand: Port away from FinalPass 20169f0b8d cmExportLibraryDependenciesCommand: Port away from FinalPass a74dad3bd3 cmMakefile: decouple FinalAction from cmCommand ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3562
| * cmCommand: remove FinalPass from interfaceDaniel Pfeifer2019-07-181-17/+0
| |
| * cmMakefile: decouple FinalAction from cmCommandDaniel Pfeifer2019-07-181-3/+22
| |
* | cmMakefile: Modernize AddFunctionBlocker method to accept a std::unique_ptrSebastian Holtermann2019-07-171-11/+10
|/
* modernize: manage cmCommand instances using unique_ptr.Marc Chevrier2019-07-141-4/+3
|
* IWYU: Fix handling of <memory> standard headerBrad King2019-07-101-1/+1
| | | | | | | | An old workaround for `std::allocator_traits<>::value_type` lints from IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`. Convert the workaround to use the same approach we already use for a workaround of `std::__decay_and_strip<>::::__type` lints. Then update the `<memory>` inclusions to follow the now-correct IWYU lints.
* Add deprecation warnings for policies CMP0067 and belowBrad King2019-07-011-1/+1
| | | | | | | The OLD behaviors of all policies are deprecated, but only by documentation. Add an explicit deprecation diagnostic for policies introduced in CMake 3.8 and below to encourage projects to port away from setting policies to OLD.
* Merge topic 'cmAppend'Brad King2019-05-241-2/+1
|\ | | | | | | | | | | | | | | 006229278b Use cmAppend to append ranges to std::vector instances 999516478d cmAlgorithms: Add cmAppend function Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3366
| * Use cmAppend to append ranges to std::vector instancesSebastian Holtermann2019-05-231-2/+1
| |
* | cmMakefile: Define cmTargetMap type in cmMakefile instead of cmTargetSebastian Holtermann2019-05-231-4/+4
|/ | | | | | | | The `cmTargetMap` type is only used in the context of `cmMakefile`. Therefore it is the most appropriate place to declare it. This moves the `cmTarget.h/cmTargets` type definition to `cmMakefile::cmTargetMap`.
* Support job pools in custom commands and targetsRosen Matev2019-05-141-12/+17
| | | | | | | | | | Provide a way for custom commands and targets to set the pool variable of the ninja build statement. Setting `JOB_POOL` is not compatible with `USES_TERMINAL`, which implies the `console` pool. The option is silently ignored with other generators. Closes: #18483
* cmMakefile: Enforce explicit use of project() commandBartosz Kosiorek2019-05-061-0/+10
| | | | Fixes: 17714
* cmMakefile: Use std::unordered_map::emplace to add cmTargets to the listSebastian Holtermann2019-03-211-2/+1
| | | | | When adding cmTargets to a cmMakefile, use std::unordered_map::emplace instead of std::unordered_map::insert.
* Features: Do not use a lower-than-default standard for requested featuresZsolt Parragi2019-02-261-0/+14
| | | | | | | | `AddRequiredTargetC(xx)` feature didn't take the default compiler standard into account, which possibly resulted in the use of an older standard when some features requested it. Fixes: #18686
* Merge topic 'deprecate-policy-old'Brad King2019-02-251-1/+1
|\ | | | | | | | | | | | | 02587d80cf Add deprecation warnings for policies CMP0066 and below Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3003
| * Add deprecation warnings for policies CMP0066 and belowBrad King2019-02-211-1/+1
| | | | | | | | | | | | | | The OLD behaviors of all policies are deprecated, but only by documentation. Add an explicit deprecation diagnostic for policies introduced in CMake 3.7 and below to encourage projects to port away from setting policies to OLD.
* | Merge topic 'cmrange-improvements'Brad King2019-02-251-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b8031308f3 cmRange: Add unit tests a8d51ef8b7 cmRange: Add functions filter and transform da4773e8b8 cmRange: Add functions all_of, any_of, none_of 17a367e77f cmRange: Stylistic cleanup 9eb0e73f46 cmRange: Move to dedicated header file Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Artur Ryt <artur.ryt@gmail.com> Merge-request: !2972
| * | cmRange: Move to dedicated header fileRegina Pfeifer2019-02-211-0/+1
| | |
* | | cmSystemTools::Error: consolidate parameters into single std::stringVitaly Stakhovsky2019-02-201-13/+12
| |/ |/|