summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |/ |/|
* | cmMakefile::ConfigureFile: Accept `std::string` parametersVitaly Stakhovsky2019-02-191-5/+6
|/
* Delete some default constructors and assignment operatorsAlbert Astals Cid2019-02-151-0/+12
| | | | | | They are unused, but if someone used them they would lead to problems since they would copy the internal raw pointers and the destructor would cause double delete
* cmake: Progress functions use `std::string` paramVitaly Stakhovsky2019-02-111-1/+1
|
* Merge topic 'modernize-for-loops'Brad King2019-02-111-14/+11
|\ | | | | | | | | | | | | | | | | 01b2d6ab74 Modernize: Use ranged for-loops when possible 15bdbec017 cmAlgorithms: Make cmRange advance/retreat safe for rvalues Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de> Merge-request: !2901
| * Modernize: Use ranged for-loops when possibleArtur Ryt2019-02-071-14/+11
| | | | | | | | | | | | | | Replaced most manual `const_iterator`-based loops and some reverse-iterator loops with range loops. Fixes: #18858
* | Merge topic 'fix-exclude-dir-with-iface'Brad King2019-02-111-1/+3
|\ \ | | | | | | | | | | | | | | | | | | f87e724e8c Fix EXCLUDE_FROM_ALL on directory with an interface library Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2937
| * | Fix EXCLUDE_FROM_ALL on directory with an interface libraryBrad King2019-02-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit dc6888573d (Pass EXCLUDE_FROM_ALL from directory to targets, 2019-01-15, v3.14.0-rc1~83^2) we automatically forward the `EXCLUDE_FROM_ALL` to targets as they are created. This regressed support for interface libraries on which the property is not allowed. Skip forwarding the `EXCLUDE_FROM_ALL` property for interface libraries. It is not needed on them because they do not participate in the generated build system anyway. Fixes: #18896
* | | Merge topic 'getreqdef'Brad King2019-02-081-5/+7
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | 00ba28ffd0 cmMakefile::GetRequiredDefinition: return const std::string& Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2930
| * | cmMakefile::GetRequiredDefinition: return const std::string&Vitaly Stakhovsky2019-02-071-5/+7
| |/
* | Prefer front/back/data over dereferencing begin/rbegin iterArtur Ryt2019-02-061-1/+1
|/ | | | Changed for sequenced containers: vector, list, string and array
* Merge topic 'copyfile-stdstring'Brad King2019-01-301-4/+2
|\ | | | | | | | | | | | | c31b6e616d cmSystemTools: copy file member functions accept std::string params Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2877
| * cmSystemTools: copy file member functions accept std::string paramsVitaly Stakhovsky2019-01-291-4/+2
| | | | | | | | | | Cleaned up `c_str()`s. `cmSystemTools::CopyFileIfDifferent()` removed as redundant.
* | Merge topic 'tidy-use-equals-default'Brad King2019-01-291-1/+0
|\ \ | |/ |/| | | | | | | | | | | | | 094f01d0f0 cleanup: Prefer compiler provided special member functions 55671b41d2 clang-tidy: Use `= default` Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Brad King <brad.king@kitware.com> Merge-request: !2841
| * cleanup: Prefer compiler provided special member functionsRegina Pfeifer2019-01-251-1/+0
| |
| * clang-tidy: Use `= default`Regina Pfeifer2019-01-251-1/+1
| | | | | | | | | | | | Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and `Source/cmUVHandlePtr.h` where a few older compilers require a user-defined default constructor (with `{}`).
* | cmSystemTools::Message: Add overload accepting std::stringVitaly Stakhovsky2019-01-281-3/+3
| |
* | Merge topic 'max-recursion-depth'Brad King2019-01-251-0/+43
|\ \ | | | | | | | | | | | | | | | | | | | | | a6982cff0d cmMakefile: Impose maximum recursion limit Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Juraj Oršulić <juraj.orsulic@fer.hr> Merge-request: !2746
| * | cmMakefile: Impose maximum recursion limitKyle Edwards2019-01-231-0/+43
| |/ | | | | | | | | | | | | | | | | In order to keep infinitely-recursive scripts from causing a stack overflow in the CMake executable, CMake now imposes a maximum recursion limit before issuing an error message. The limit can be adjusted at runtime with CMAKE_MAXIMUM_RECURSION_DEPTH. Fixes: #18694
* | Merge topic 'exclude_from_all'Brad King2019-01-251-4/+4
|\ \ | | | | | | | | | | | | | | | | | | dc6888573d Pass EXCLUDE_FROM_ALL from directory to targets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2816
| * | Pass EXCLUDE_FROM_ALL from directory to targetsZack Galbreath2019-01-211-4/+4
| | | | | | | | | | | | | | | | | | When a target is created it now inherits the EXCLUDE_FROM_ALL property from its directory. This change makes it possible to include a target in "all", even if its directory has been marked as EXCLUDE_FROM_ALL.
* | | Merge topic 'cmake-files-directory'Brad King2019-01-251-4/+3
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | 3e867ed400 cmake: inlined files dir constant and removed it from cmake.h Acked-by: Kitware Robot <kwrobot@kitware.com> Rejected-by: vvs31415 <vstakhovsky@fastmail.com> Merge-request: !2655