summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmNinjaTargetGenerator: cmStrCat usageBen Boeckel2020-02-111-79/+81
|
* clang-tidy: Fix explicit --driver-mode= argumentBrad King2020-01-311-1/+1
| | | | | | | | | | | | | Since commit f6f4eb0907 (clang-tidy: Add driver mode argument, 2020-01-19) the `clang-tidy` tool rejects the new option: Unknown command line argument '--driver-mode=g++'. This is because we are adding the flag before the main compiler command-line. Encode it with `--extra-arg-before=` so that `clang-tidy` knows it is supposed to be part of the compiler command. Suggested-by: Hanjiang Yu
* Merge topic 'clang-tidy-driver-mode'Brad King2020-01-281-1/+7
|\ | | | | | | | | | | | | f6f4eb0907 clang-tidy: Add driver mode argument Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4208
| * clang-tidy: Add driver mode argumentHanjiang Yu2020-01-271-1/+7
| | | | | | | | | | | | | | `clang-tidy` does not infer driver mode if it is not provided with a JSON compilation database. This is exactly the way cmake launches it. Hence clang-tidy will only use the default driver mode. Add an explicit driver mode argument to avoid this.
* | Ninja Multi-Config: Fix bug with MacOS frameworksKyle Edwards2020-01-241-6/+20
|/
* Refactor: Split Ninja files into impl-<Config>.ninja and build-<Config>.ninjaKyle Edwards2020-01-221-15/+15
|
* Ninja: Add a separate job pool for PCH creationDan Johnston2020-01-161-0/+7
| | | | | | | Add a `JOB_POOL_PRECOMPILE_HEADER` target property to specify the pool name, and its associated `CMAKE_JOB_POOL_PRECOMPILE_HEADER` variable. Fixes: #20217
* ObjC: Add _COMPILE_LAUNCHER supportCristian Adam2020-01-091-1/+2
| | | | Fixes: #20178
* Refactoring: use append functions from cmext/algorithmMarc Chevrier2019-12-171-2/+2
|
* Ninja: Add multi-config variantKyle Edwards2019-12-131-79/+123
| | | | Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
* Refactor: Prepare Ninja generator for multi-configKyle Edwards2019-12-131-70/+68
|
* PCH: Generate sources during Compute stepCristian Adam2019-10-091-3/+40
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-2/+3
| | | | | 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.
* cmGeneratorExpression: Add cmGeneratorExpression::Evaluate utilityDaniel Eiband2019-09-231-8/+5
| | | | | | | cmGeneratorExpression::Evaluate is a shortcut when only the evaluated string is needed or an instance of cmCompiledGeneratorExpression cannot be cached. Fixes: #19686
* cmGeneratorExpression: Move quiet flag to cmCompiledGeneratorExpressionDaniel Eiband2019-09-221-1/+1
| | | | | | The quiet flag is false for all but one call to Evaluate. Make the quiet flag a setter of cmCompiledGeneratorExpression to be able to remove it from the Evaluate function signature.
* Merge topic 'cmake-system-headers'Brad King2019-09-201-1/+1
|\ | | | | | | | | | | | | | | 4a08690ccf cmstd: Extend header <cm/iterator> c688b401d3 cmstd: Modernize CMake system headers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3776
| * 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
* | Refactoring: Use ConfigName instead of property CMAKE_BUILD_TYPEDaniel Eiband2019-09-171-7/+6
|/ | | | | Use memorized `this->ConfigName` instead of retrieving the value of property CMAKE_BUILD_TYPE.
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-1/+1
|
* Ninja: Pass preprocessor definitions when compiling with Intel FortranBrad King2019-09-031-6/+22
| | | | | | | | The Intel Fortran compiler supports an extension that allows conditional compilation based on preprocessor definitions specified on the command line even when not preprocessing. Fixes: #19664
* Precompile headers: Add methods to generate PCH sourcesCristian Adam2019-08-281-3/+13
| | | | Co-Author: Daniel Pfeifer <daniel@pfeifer-mail.de>
* Source sweep: Replace cmExpandList with the shorter cmExpandedListSebastian Holtermann2019-08-231-2/+1
| | | | | | | | | | | | 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-77/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)`
* Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgumentSebastian Holtermann2019-08-141-15/+12
|
* clang-tidy: Enable performance-inefficient-string-concatenationSebastian Holtermann2019-08-051-2/+2
| | | | | | | Enables the clang-tidy test performance-inefficient-string-concatenation and replaces all inefficient string concatenations with `cmStrCat`. Closes: #19555
* 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`.
* Ninja: do not normalise swift support file pathsSaleem Abdulrasool2019-07-241-2/+2
| | | | | | | | | | When building the output-map-file.json, do not convert the path to a Ninja path, which will make it relative. If `cmake` is invoked with the `-B` option the files will be written relative to the directory where CMake was invoked rather than relative to the build tree. This path need not be a relative path since it is used internally by CMake to determine where to write the output map file. This allows the use of `-B` option in CMake in projects with Swift targets.
* 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: Add support for CUDA nvcc response filesFrancisco Facioni2019-06-031-3/+11
|
* Ninja: Use cmNinjaBuild class for WriteBuildSebastian Holtermann2019-05-301-30/+23
|
* Ninja: Use cmNinjaBuild class for WriteBuildSebastian Holtermann2019-05-301-34/+26
|
* Ninja: Use cmNinjaBuild class for WriteBuildSebastian Holtermann2019-05-301-14/+5
|
* Ninja: Use cmNinjaBuild instead of WritePhonyBuildSebastian Holtermann2019-05-301-7/+7
|
* Ninja: Use cmNinjaBuild instead of WritePhonyBuildSebastian Holtermann2019-05-301-9/+6
|
* Ninja: Embrace temporary objects in scopesSebastian Holtermann2019-05-301-65/+80
|
* Ninja: Use cmNinjaRule as sole parameter in the WriteRule and AddRule methodsSebastian Holtermann2019-05-291-72/+56
| | | | | | | | 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.
* Use cmAppend to append ranges to std::vector instancesSebastian Holtermann2019-05-231-2/+1
|
* Ninja,Makefile: Fix <LANG>_COMPILER_LAUNCHER shell command syntaxBrad King2019-05-221-2/+7
| | | | | | | | | The first entry in the compiler launcher command argument list is the command itself and should be converted to the shell's native command syntax (e.g. backslashes on Windows). Without this, the `RunCMake.CompilerLauncher` test fails on Windows when there are *no* spaces in the path to `cmake.exe`.
* Merge topic 'ninja-swift'Brad King2019-05-201-49/+76
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | a9180ccf9a Tests: add a check for the Swift compiler d745551fb6 Help: add some initial documentation for Swift support 9a182c9e5b Auxiliary: update vim syntax highlighting e9b0063e8e Modules: add build rules for Swift Ninja support b6412e3e38 Ninja: add placeholders to support Swift build 7d7f31161d Ninja: add support for Swift's output-file-map.json d688c4c19d Swift: remove unnecessary unreleased Ninja infrastructure 0723582208 Swift: Detect compiler version ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3297
| * Ninja: add support for Swift's output-file-map.jsonSaleem Abdulrasool2019-05-161-4/+76
| | | | | | | | | | | | | | Add an emitter for the Swift's output-map-file.json to emit the requisite support files for Swift compilation. This additionally prevents the build rules for the object file emission as well to properly support the Swift build semantics.
| * Swift: remove unnecessary unreleased Ninja infrastructureSaleem Abdulrasool2019-05-161-45/+0
| | | | | | | | | | | | This cleans up the new options that were added to support Swift. This was not released, and the proper support approach that we settled upon does not require as much specialised support.
* | Merge topic 'string-cleanup'Brad King2019-05-171-4/+4
|\ \ | |/ |/| | | | | | | | | | | 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-4/+4
| |
* | Ninja: Add support for ADDITIONAL_CLEAN_FILES target propertySebastian Holtermann2019-05-141-0/+25
|/
* Ninja: In cmNinjaTargetGenerator use std::unique_ptr to manage new instancesSebastian Holtermann2019-05-131-4/+5
|
* Ninja: In cmNinjaTargetGenerator optimize string compositionSebastian Holtermann2019-05-131-62/+78
|
* Ninja: Inline range loop range argumentsSebastian Holtermann2019-05-121-2/+1
|
* Ninja,Makefile: use `unique_ptr` for memory managementSaleem Abdulrasool2019-04-181-7/+4
| | | | | Use a `unique_ptr` to manage the lifetime of the `MacOSXContentGenerator` and 'OSXBundleGenerator` rather than manually handling the lifetime.
* cmNinjaTargetGenerator: use a different depfile for preprocessingBen Boeckel2019-03-121-1/+1
| | | | | If the compile rule also needs a depfile, the names now no longer collide.