summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* PCH: Generate sources during Compute stepCristian Adam2019-10-091-2/+0
|
* Unity build: Generate sources during Compute stepBrad King2019-10-031-1/+0
| | | | | | | | The unity build sources need to be added for all generators. Create them during `cmGlobalGenerator::Compute` to avoid duplicating the calls in every generator. We already handle Qt autogen there too. Issue: #19789
* Ninja: Ensure shared library version symlinks are created for dependentsBrad King2019-10-011-0/+21
| | | | | | | | When linking to a shared library target that has version symlinks, add an order-only dependency on the build statement that creates the links. This ensures that the links exist for use at runtime. Fixes: #19774
* 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-1/+1
|
* Merge topic 'unity-build'Brad King2019-09-051-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | 7786a05c70 Unity build: Add XCode support 1353802af3 Unity build: Add unit tests 8dfeb5d278 Unity build: Add support for Visual Studio generator 7114c141e2 Unity build: Add support for Ninja and Makefile generators Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Stanislav Ershov <digital.stream.of.mind@gmail.com> Acked-by: Evgeniy Dushistov <dushistov@mail.ru> Acked-by: Viktor Kirilov <vik.kirilov@gmail.com> Merge-request: !3611
| * Unity build: Add support for Ninja and Makefile generatorsCristian Adam2019-08-291-0/+1
| |
* | Merge topic 'clang-ipo-support'Brad King2019-09-031-0/+8
|\ \ | |/ |/| | | | | | | | | | | | | | | dca9c33abc Tests: Remove old IPO test c856d4556b bindexplib: supporting llvm bitcode formats using llvm-nm 079b8e2916 Clang: prefer lld-link over link.exe 6e3655db2c Clang: add LTO support for GNU-command line clang on windows Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3527
| * bindexplib: supporting llvm bitcode formats using llvm-nmZsolt Parragi2019-08-301-0/+8
| |
* | Merge topic 'precompile-headers'Brad King2019-08-291-0/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8da78d4efe Precompile headers: Update documentation 5772930164 Precompile headers: Add unit tests 519606704e Precompile headers: Add support for Visual Studio generators 28be170fbc Precompile headers: Add support for Xcode generator b8626261e9 Precompile headers: Add methods to generate PCH sources 375d01c680 PCH: add example/test 9b6797e71d PCH: add target_precompile_headers command 0467a2f91b PCH: add PRECOMPILE_HEADERS to special properties Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de> Acked-by: Ivan171 <heavenandhell171@gmail.com> Acked-by: Stanislav Ershov <digital.stream.of.mind@gmail.com> Acked-by: Steve Mokris <smokris@softpixel.com> Acked-by: Evgeniy Dushistov <dushistov@mail.ru> Acked-by: Danila Malyutin <flashmozzg@gmail.com> Acked-by: Viktor Kirilov <vik.kirilov@gmail.com> Acked-by: Lucas Zhao <zhaopf6@163.com> Merge-request: !3553
| * Precompile headers: Add methods to generate PCH sourcesCristian Adam2019-08-281-0/+2
| | | | | | | | Co-Author: Daniel Pfeifer <daniel@pfeifer-mail.de>
* | Merge topic 'ninja_additional_clean_files_custom_target'Brad King2019-08-271-0/+1
|\ \ | |/ |/| | | | | | | | | | | d040f3f1ee Tests: Extend MakeClean test to test various target types 3ed8cffe73 Ninja: Add support for ADDITIONAL_CLEAN_FILES in custom targets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3739
| * Ninja: Add support for ADDITIONAL_CLEAN_FILES in custom targetsSebastian Holtermann2019-08-261-0/+1
| | | | | | | | | | | | | | This enables the support for `ADDITIONAL_CLEAN_FILES` in custom targets using the ninja generator. Fixes: #19641
* | Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-59/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)`
* | clang-tidy: isolate declarations for readabilityRegina Pfeifer2019-08-201-1/+2
| |
* | Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgumentSebastian Holtermann2019-08-141-5/+5
| |
* | 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`.
* | 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: Fix CUDA device linking when using response filesFrancisco Facioni2019-06-251-13/+2
| | | | | | Fix the logic added by commit d91b5a72cd (Ninja: Add support for CUDA nvcc response files, 2019-05-30, v3.15.0-rc1~8^2) to always use the CUDA compiler response file flag for response files during device linking.
* Ninja: Add support for CUDA nvcc response filesFrancisco Facioni2019-06-031-6/+15
|
* Ninja: Compute linker response file flag earlierFrancisco Facioni2019-06-031-22/+28
|
* Ninja: Use cmNinjaBuild class for WriteBuildSebastian Holtermann2019-05-301-34/+30
|
* Ninja: Use cmNinjaBuild class for WriteBuildSebastian Holtermann2019-05-301-73/+64
|
* Ninja: Use cmNinjaBuild class for WriteBuildSebastian Holtermann2019-05-301-16/+15
|
* Ninja: Use cmNinjaBuild instead of WritePhonyBuildSebastian Holtermann2019-05-301-7/+8
|
* Ninja: Use cmNinjaRule as sole parameter in the WriteRule and AddRule methodsSebastian Holtermann2019-05-291-88/+65
| | | | | | | | 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.
* Ninja,Swift: correct response file handlingSaleem Abdulrasool2019-05-231-1/+5
| | | | | | | | The response file was being written but not used due to the wrong variable being configured for Swift. Swift does compile+link in a single phase and does not use the `<OBJECTS>` placeholder. Use the `<SWIFT_SOURCES>` placeholder instead for the response file substitution which serves the same purpose.
* Merge topic 'swift-flags'Brad King2019-05-231-0/+11
|\ | | | | | | | | | | | | 02c14b7fcd Ninja,Swift: pass along DEFINES/FLAGS/INCLUDES Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3355
| * Ninja,Swift: pass along DEFINES/FLAGS/INCLUDESSaleem Abdulrasool2019-05-211-0/+11
| | | | | | | | | | | | | | Since the Swift model does a single compile/link phase, we would not get the compile definitions, includes, and options past along to the build of the module. Compute these for the target when constructing the main command.
* | Merge topic 'remove_unneeded_device_link_calls'Brad King2019-05-221-26/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | 81b4d10d8f CUDA: More exhaustive checks to determine when to do device linking 3205c7c950 cmNinjaLinkLineDeviceComputer now lives in the correct source file Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3320
| * | CUDA: More exhaustive checks to determine when to do device linkingRobert Maynard2019-05-211-26/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously CMake used fairly naive logic to determine when to do device linking which caused unnecessary device linking to occur frequently. We now use a more exhaustive algorithm to determine when we have a need for device linking. Fixes: #19238
| * | cmNinjaLinkLineDeviceComputer now lives in the correct source fileRobert Maynard2019-05-201-1/+1
| | |
* | | Merge topic 'swift-debug-variant'Brad King2019-05-221-13/+10
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 62381effba Ninja,Swift: reuse `SWIFT_MODULE_NAME` for `SWIFT_MODULE` Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3343
| * | | Ninja,Swift: reuse `SWIFT_MODULE_NAME` for `SWIFT_MODULE`Saleem Abdulrasool2019-05-201-13/+10
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | Rather than compute the value of `SWIFT_MODULE`, use the computed value of `SWIFT_MODULE_NAME`. This is helpful strictly for Windows where you have multiple configuration variants with differing ABIs that need must co-exist. In particular, this re-use permits the use of `CMAKE_DEBUG_POSTFIX` to have the import library and the DLL be named with the trailing suffix but have the same import name for the swift module and interface.
* | | Merge topic 'ninja-lib-symlink-space'Brad King2019-05-221-1/+3
|\ \ \ | |/ / |/| | | | | | | | | | | | | | 13c92b4a30 Ninja: Fix creation of library symlinks in folders with spaces Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3341
| * | Ninja: Fix creation of library symlinks in folders with spacesEike Ziller2019-05-201-1/+3
| | | | | | | | | | | | | | | The arguments to 'cmake -E cmake_symlink_library' must be properly quoted.
* | | Merge topic 'ninja-swift'Brad King2019-05-201-26/+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 placeholders to support Swift buildSaleem Abdulrasool2019-05-161-1/+84
| | | | | | | | | | | | Add the placeholders needed to support compiling Swift code.
| * | Swift: remove unnecessary unreleased Ninja infrastructureSaleem Abdulrasool2019-05-161-33/+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-1/+1
|\ \ | |/ |/| | | | | | | | | | | 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-1/+1
| |
* | Ninja: Add support for ADDITIONAL_CLEAN_FILES target propertySebastian Holtermann2019-05-141-0/+2
|/
* Merge topic 'touch-after-ranlib'Brad King2019-05-071-0/+14
|\ | | | | | | | | | | | | f83e4359f2 Apple: Preserve high resolution mtime for static libraries Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3283
| * Apple: Preserve high resolution mtime for static librariesGregor Jasny2019-05-051-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | On macOS ranlib truncates the fractional part of the static achive file modification time. If the archive and at least one contained object file were created within the same second this will make look the archive older than the object file. On subsequent ninja runs this leads to re-achiving and updating dependent targets. As a work-around we touch the archive after ranlib. Closes: #19222
* | Ninja,Makefile: use `unique_ptr` for memory managementSaleem Abdulrasool2019-04-181-5/+2
| | | | | | | | | | Use a `unique_ptr` to manage the lifetime of the `MacOSXContentGenerator` and 'OSXBundleGenerator` rather than manually handling the lifetime.
* | cmTarget: Move member `*Commands` to implSebastian Holtermann2019-03-231-2/+1
| |
* | Merge topic 'error-consolidate'Brad King2019-02-251-2/+2
|\ \ | | | | | | | | | | | | | | | | | | 9dd255548d cmSystemTools::Error: consolidate parameters into single std::string Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2995
| * | cmSystemTools::Error: consolidate parameters into single std::stringVitaly Stakhovsky2019-02-201-2/+2
| | |