summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-4/+6
| | | | | 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.
* Ninja: Factor out per-dir "all" target computation into common generatorBrad King2019-09-301-58/+22
| | | | This will make it re-usable for the Makefile generator.
* Ninja: Simplify top-level "all" target generationBrad King2019-09-301-32/+13
| | | | | Remove its dedicated implementation and update the per-directory "all" target generation to work for the top-level directory too.
* Ninja: Fix EXCLUDE_FROM_ALL OFF on sub/sub/tgt in sub/allBrad King2019-09-301-2/+19
| | | | | | | Defer adding a test to a later commit after all generators have been fixed. Issue: #19753
* Ninja,Makefile: Fix subdir "all" with nested EXCLUDE_FROM_ALL subdirBrad King2019-09-301-0/+3
| | | | | | | | | | The "all" target defined for a subdirectory (e.g. `cd sub; make` or `ninja sub/all`) should not include the "all" targets from nested subdirectories (e.g. `sub/sub`) that are marked as `EXCLUDE_FROM_ALL`. Fix this and add a test case. Issue: #19753 Co-Author: Sebastian Holtermann <sebholt@xwmw.org>
* cmGlobalNinjaGenerator: Remove unused AddDependencyToAll overloadBrad King2019-09-301-5/+0
|
* cmstd: Modernize CMake system headersMarc Chevrier2019-09-201-1/+1
| | | | | | | | | | | | | | Provide a standardized way to handle the C++ "standard" headers customized to be used with current CMake C++ standard constraints. Offer under directory `cm` headers which can be used as direct replacements of the standard ones. For example: #include <cm/string_view> can be used safely for CMake development in place of the `<string_view>` standard header. Fixes: #19491
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-2/+2
|
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-29/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)`
* cmAlgorithms: Add cmContainsRegina Pfeifer2019-08-191-2/+1
| | | | Also, use the new function where applicable.
* cmStringAlgorithms: Add cmStrToLong and cmStrToULongSebastian Holtermann2019-08-101-1/+1
| | | | | | | | 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.
* Merge topic 'tidy_inefficient_string'Brad King2019-08-071-12/+16
|\ | | | | | | | | | | | | 18b0330b86 clang-tidy: Enable performance-inefficient-string-concatenation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3648
| * clang-tidy: Enable performance-inefficient-string-concatenationSebastian Holtermann2019-08-051-12/+16
| | | | | | | | | | | | | | Enables the clang-tidy test performance-inefficient-string-concatenation and replaces all inefficient string concatenations with `cmStrCat`. Closes: #19555
* | cmStringAlgorithms: cmIsSpace, cmTrimWhitespace, cmEscapeQuotes, cmTokenizeSebastian Holtermann2019-08-051-2/+2
|/ | | | | | | | | | 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`)
* Ninja: Record dyndep support by Ninja 1.10Brad King2019-07-301-4/+9
| | | | | Upstream Ninja 1.10 and above support the `dyndep` feature we need for Fortran.
* Ninja: Drop unused dyndep version checkBrad King2019-07-301-28/+19
| | | | | | Our dyndep support version 1 has been merged to upstream Ninja. We never developed a second dyndep version, so simply drop our checks for different versions.
* Ninja: Use in-class initialization of global generator membersBrad King2019-07-301-8/+0
|
* 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`.
* cmGlobalNinjaGenerator: Use gnu compatible paths with QCCSamuel Ostlund2019-07-161-1/+3
|
* Introduce memory management helper: cm_memory.hxxMarc Chevrier2019-07-141-1/+2
|
* 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.
* Ninja: Remove non cmNinjaBuild based WriteBuild methodSebastian Holtermann2019-05-301-81/+75
|
* Ninja: Use cmNinjaBuild class for WriteBuildSebastian Holtermann2019-05-301-24/+21
|
* Ninja: Use cmNinjaBuild class for WriteBuildSebastian Holtermann2019-05-301-7/+6
|
* Ninja: Use cmNinjaBuild class for WriteBuildSebastian Holtermann2019-05-301-11/+5
|
* Ninja: Use cmNinjaBuild class for WriteBuildSebastian Holtermann2019-05-301-9/+4
|
* Ninja: Use cmNinjaBuild class for WriteBuildSebastian Holtermann2019-05-301-30/+27
|
* Ninja: Remove WritePhonyBuild methodSebastian Holtermann2019-05-301-10/+0
|
* Ninja: Use cmNinjaBuild instead of WritePhonyBuildSebastian Holtermann2019-05-301-8/+10
|
* Ninja: Use cmNinjaBuild instead of WritePhonyBuildSebastian Holtermann2019-05-301-6/+5
|
* Ninja: Use cmNinjaBuild instead of WritePhonyBuildSebastian Holtermann2019-05-301-6/+6
|
* Ninja: Use cmNinjaBuild instead of WritePhonyBuildSebastian Holtermann2019-05-301-16/+19
|
* Ninja: Use cmNinjaBuild instead of WritePhonyBuildSebastian Holtermann2019-05-301-20/+26
|
* Ninja: Use cmNinjaBuild instead of WritePhonyBuildSebastian Holtermann2019-05-301-4/+9
|
* Ninja: Make WriteCustomCommandBuild method use cmNinjaBuild internallySebastian Holtermann2019-05-301-26/+33
|
* Ninja: Make WriteMacOSXContentBuild use cmNinjaBuild internallySebastian Holtermann2019-05-301-12/+8
|
* Ninja: Add cmNinjaBuild based WriteBuild (wrapper) methodSebastian Holtermann2019-05-301-0/+10
|
* Merge topic 'ninja_rule_class'Brad King2019-05-301-111/+76
|\ | | | | | | | | | | | | | | 6136ab5e17 Ninja: Use cmNinjaRule as sole parameter in the WriteRule and AddRule methods 6a23fbce47 Ninja: Add cmNinjaRule class Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3393
| * Ninja: Use cmNinjaRule as sole parameter in the WriteRule and AddRule methodsSebastian Holtermann2019-05-291-111/+76
| | | | | | | | | | | | | | | | Instead of passing multiple strings to the `WriteRule` and `AddRule` methods of `cmGlobalNinjaGenerator`, pass only a `cmNinjaRule` instance reference, that is set up beforehand. Adapt calls to `WriteRule` and `AddRule` in multiple places.
* | Merge topic 'clang-gnulike-support'Brad King2019-05-291-7/+14
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 74829f01b1 Help: Add notes for topic 'clang-gnulike-support' 19669abe1d Tests: handle string escaping differences with NMake+clang a2a90f41e3 Tests: require C++14 for the Tutorial 4819ff9647 Tests: fix failures with gnu mode clang on windows 26af0b25e7 cmake: use correct stack size with gnu mode clang on windows d44c0db0b2 clang: setup correct configuration in gnu mode b7d5ef23e9 cmGlobalNinjaGenerator: use gnu compatible paths with clang in gnu mode 3d0210d8dc binutils: add the llvm-* variants to the tool lists. ... Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Francesco Bertolaccini <francesco@bertolaccini.dev> Acked-by: Stanislav Ershov <digital.stream.of.mind@gmail.com> Acked-by: Saleem Abdulrasool <compnerd@compnerd.org> Merge-request: !2992
| * cmGlobalNinjaGenerator: use gnu compatible paths with clang in gnu modeZsolt Parragi2019-05-171-7/+14
| |
* | Use cmAppend to append ranges to std::vector instancesSebastian Holtermann2019-05-231-3/+2
| |
* | Merge topic 'string-cleanup'Brad King2019-05-171-2/+2
|\ \ | |/ |/| | | | | | | | | | | 23e8364aed Source: std::string related cleanup Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Sebastian Holtermann <sebholt@web.de> Merge-request: !3324
| * Source: std::string related cleanupVitaly Stakhovsky2019-05-151-2/+2
| |
* | Merge topic 'additional_clean_files'Brad King2019-05-151-7/+95
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b5bf369ec6 Release notes: Add release notes for ADDITIONAL_CLEAN_FILES properties 4e2ce0a67a Doc: Update and deprecate ADDITIONAL_MAKE_CLEAN_FILES directory property 338994d65d Doc: Add documentation for ADDITIONAL_CLEAN_FILES properties c11f089d73 Tests: Extend MakeClean test to cover ADDITIONAL_CLEAN_FILES 012d599e26 Ninja: Add support for ADDITIONAL_CLEAN_FILES target property 890a1b9dc3 Ninja: Add support for ADDITIONAL_CLEAN_FILES directory property 7b23001f20 Ninja: Add support for additional clean files d745df4b01 Makefiles: Add support for ADDITIONAL_CLEAN_FILES target property ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3318
| * | Ninja: Add support for additional clean filesSebastian Holtermann2019-05-141-7/+95
| |/ | | | | | | | | | | | | | | | | Additional clean files for the Ninja generator can be registered via the new method `cmGlobalNinjaGenerator::AddAdditionalCleanFile`. If there are additional clean files, a new rule `CLEAN_ADDITIONAL` and a new build target `CMakeFiles/clean.additional` get generated. The `clean` target will depend on `CMakeFiles/clean.additional`, if the target exists.
* | Merge topic 'ninja-pool-custom-command'Brad King2019-05-151-3/+7
|\ \ | |/ |/| | | | | | | | | 9f76961de8 Support job pools in custom commands and targets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3308
| * Support job pools in custom commands and targetsRosen Matev2019-05-141-3/+7
| | | | | | | | | | | | | | | | | | | | 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
* | Ninja: Use clean target instead of clean tool in `cmake --target clean` callsSebastian Holtermann2019-05-131-5/+1
| | | | | | | | | | | | | | A convenience `clean` target for the Ninja generator exists since commit 3bd41f2eb5. It's safe to call `ninja clean` instead of `ninja -t clean`. This removes the exception mapping of the `clean` target in `cmake --build ... --target clean` calls to the Ninja `-t clean` tool.
* | Ninja: Inline range loop range argumentsSebastian Holtermann2019-05-121-22/+11
| |