summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* ninja: name dyndep internal files using the object fileBen Boeckel2019-02-251-2/+2
| | | | | Now that preprocessing outputs are not necessarily used all the way through, the output name is a better base name to use for these files.
* cmNinjaTargetGenerator: remove "preprocessed" mentions in dyndepBen Boeckel2019-02-251-2/+3
| | | | | Not all languages compile the preprocessed source (or even have preprocessed sources at all).
* ninja: do not assume explicit preprocessing uses that outputBen Boeckel2019-02-251-26/+52
| | | | | | In Fortran, this is OK, but for C++, compiling preprocessed source generally results in poorer diagnostic messages and can also be ill-formed anyways.
* ninja: pass language to cmake_ninja_dependsBen Boeckel2019-02-251-3/+3
|
* ninja: make dyndep generation language awareBen Boeckel2019-02-251-9/+12
| | | | | A target may have multiple languages with dyndep rules, separate `.dd` files should be generated.
* Ninja: add properties for Swift partial module and docSaleem Abdulrasool2019-02-181-0/+14
| | | | | | | | | | | When building a swift object, we emit a partial swiftmodule and swiftdoc that must be merged at the end. However, in order to do that, we need to enumerate the swiftmodules and swiftdocs. As a result, the path must be known to CMake. Rather than hardcoding the rules into CMake, create a source property that we can query. This will allow us to create a final placeholder to emit the merge rule. Issue: #18800
* Merge topic 'ninja-swift-library-name'Brad King2019-02-151-0/+5
|\ | | | | | | | | | | | | 157570b5a2 Add placeholder for Swift's library name Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2902
| * Add placeholder for Swift's library nameSaleem Abdulrasool2019-02-131-0/+5
| | | | | | | | | | | | | | This allows us to set the proper link name for the Swift library (soname). Because this needs to be passed to the object being compiled, we need to create a new placeholder so that it can be sent along to the frontend. Default to the target name unless it is explicitly provided.
* | Merge topic 'fortran-submodule-names'Brad King2019-02-141-0/+4
|\ \ | |/ |/| | | | | | | | | | | | | | | d80ecba5c2 Fortran: Fix submodule file names across compilers 72057d9c15 Fortran: Thread compiler id through to internal Fortran parser 7ae329e2ed Fortran: Factor out .mod and .smod file name construction Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Michael Hirsch, Ph.D. <michael@scivision.co> Merge-request: !2958
| * Fortran: Fix submodule file names across compilersBrad King2019-02-141-0/+4
| | | | | | | | | | | | | | | | | | The naming convention for submodule files varies across compilers. Add a table to the compiler information modules and thread the information through to the Fortran module dependency parser. Fill out the table for compiler ids known to support Fortran submodules. Fixes: #18746
* | cmMakefile::GetRequiredDefinition: return const std::string&Vitaly Stakhovsky2019-02-071-15/+13
|/
* Use cmSourceFile::GetIsGeneratedSebastian Holtermann2019-02-011-1/+1
|
* Ninja: Use deps=gcc for Intel Compiler on WindowsBrad King2019-01-301-2/+22
| | | | | | | | | | | Ninja 1.9 supports the depfile format generated by this compiler. Use `deps = gcc` when the version of Ninja is new enough. Unfortunately the Intel Compiler for Windows does not properly escape spaces in paths written to a depfile so if there is a space in the path we must still fall back to `deps = msvc`. Fixes: #18855
* Ninja: Drop unnecessary deptype customization infrastructureBrad King2019-01-301-4/+0
| | | | | | Do not pass `CMAKE_NINJA_DEPTYPE_<LANG>` in place of `deps = gcc`. If Ninja ever introduces a new dependency type we will likely need to update CMake for it anyway.
* Ninja: support `SWIFT_MODULE_NAME` propertySaleem Abdulrasool2019-01-241-1/+6
| | | | | | | | Add a new `SWIFT_MODULE_NAME` property that defaults to the target name. This can be adjusted via `set_target_properties`. This is needed as otherwise, the first source file determines the module name. Issue: #18800
* Ninja: support `SWIFT_MODULE_NAME` propertySaleem Abdulrasool2019-01-181-2/+5
| | | | | | | | Add a new `SWIFT_MODULE_NAME` property that defaults to the target name. This is needed as otherwise, the first source file determines the module name. Issue: #18800
* Ninja: add new placeholder `SWIFT_AUXILIARY_SOURCES`Saleem Abdulrasool2019-01-151-0/+18
| | | | | | | | | The swift compilation model requires all sources for the module to be listed for the compiler to type check across them. Provide a placeholder to allow enumerating the remainder of the swift sources in a target for the language compile rule. Issue: #18800
* IWYU: Update CMake code for IWYU built with Clang 6Brad King2019-01-151-0/+1
| | | | | IWYU now correctly requires `<utility>` for `std::move`. It also requires a container header when used via a range-based for loop.
* clang-tidy: Remove redundant member initializationsRegina Pfeifer2018-12-151-2/+0
|
* cmMakefile: Make GetSafeDefinition return std::string const&Vitaly Stakhovsky2018-09-181-4/+2
|
* genex: Simplify cmGeneratorExpressionInterpreterBrad King2018-09-071-7/+4
| | | | | | | | | All callers were constructing with a non-empty target name using the target whose pointer was passed anyway. Drop this argument. Simplify logic accordingly. Re-order constructor arguments to match the cmCompiledGeneratorExpression::Evaluate arguments. Also remove unnecessary getters.
* cmGeneratedFileStream: clang-tidy applied to remove redundant ``c_str`` callsSebastian Holtermann2018-08-071-1/+1
| | | | | | | | | | | | | | | After changing the ``cmGeneratedFileStream`` methods to accept ``std::string const&`` instead of ``const char*`` we don't need to call ``std::string::c_str`` anymore when passing a ``std::string`` to a ``cmGeneratedFileStream`` method. This patch removes all redundant ``std::string::c_str`` calls when passing a string to a ``cmGeneratedFileStream`` method. It was generated by building CMake with clang-tidy enabled using the following options: -DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-4.0;-checks=-*,readability-redundant-string-cstr;-fix;-fix-errors
* LINK_DEPENDS: add support for property INTERFACE_LINK_DEPENDSMarc Chevrier2018-06-271-8/+7
| | | | Fixes: #17997