summaryrefslogtreecommitdiff
path: root/Source/cmGlobalNinjaGenerator.h
Commit message (Collapse)AuthorAgeFilesLines
* Ninja: Remove config suffix from order-only targetKyle Edwards2020-04-231-2/+5
| | | | Fixes: #20621
* Generator: Don't allow Ninja Multi-Config variables on other generatorsKyle Edwards2020-02-271-0/+4
| | | | | | We may want to enable these variables later on with specific semantics. To avoid breaking backwards compatibility, make it an error to use them for now.
* Ninja Multi-Config: Fix issue with "all" in CMAKE_NMC_DEFAULT_CONFIGSKyle Edwards2020-02-111-1/+1
| | | | | | | | Prior to this fix, CMAKE_NMC_DEFAULT_CONFIGS would inherit "all" from the union of CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG and CMAKE_NMC_CROSS_CONFIGS. This is inconsistent with the behavior of the "all" target signifying CMAKE_NMC_CROSS_CONFIGS. Update "all" in CMAKE_NMC_DEFAULT_CONFIGS to inherit only from CMAKE_NMC_CROSS_CONFIGS.
* Ninja Multi-Config: Add support for DEPFILE option in add_custom_command()Kyle Edwards2020-02-071-0/+2
| | | | And give other generators a path forward to add support in the future.
* Ninja Multi-Config: Use build.ninja if cmake --build has no --configKyle Edwards2020-02-041-0/+5
| | | | | | If cmake --build is called with no --config argument, and a build.ninja file is available, use that instead of defaulting to the Debug config.
* Ninja Multi-Config: Shuffle variables aroundKyle Edwards2020-02-031-12/+15
| | | | | | Remove redundant variable CMAKE_NINJA_MULTI_CROSS_CONFIG_ENABLE. Rename other variables. Document and improve handling of error conditions.
* Ninja: Factor metadata cleanup into dedicated methodBrad King2020-01-271-0/+1
|
* Ninja Multi-Config: Add variable to control configs used in cross-config buildKyle Edwards2020-01-231-0/+6
|
* Ninja Multi-Config: Add variable to control aliases in build.ninjaKyle Edwards2020-01-221-0/+4
|
* Refactor: Split Ninja files into impl-<Config>.ninja and build-<Config>.ninjaKyle Edwards2020-01-221-3/+30
|
* Ninja Multi-Config: Make cross-config building opt-inKyle Edwards2020-01-101-0/+2
| | | | | | | | | | | Many users will want to use the Ninja Multi-Config generator like a traditional Visual Studio-style multi-config generator, which doesn't mix configurations - custom commands are built using target executables of the same configuration the command is for. We do not want to force these people to generate an N*N build matrix when they only need N*1, especially if they have lots of targets. Add a new variable, CMAKE_NINJA_CROSS_CONFIG_ENABLE, to opt-in to the cross-config build matrix.
* Merge topic 'ninja-postgen-commands'Brad King2020-01-101-0/+9
|\ | | | | | | | | | | | | | | fb18215904 Ninja: clean ninja metadata once generated Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Jan Niklas Hasse <jhasse@bixense.com> Merge-request: !3316
| * Ninja: clean ninja metadata once generatedBen Boeckel2020-01-061-0/+9
| | | | | | | | Fixes: #15830
* | GlobalGenerator family: modernize memory managementMarc Chevrier2020-01-071-4/+6
|/
* cmGlobalGenerator: modernize memrory managemenbtMarc Chevrier2019-12-301-1/+1
|
* Ninja: Add multi-config variantKyle Edwards2019-12-131-18/+168
| | | | Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
* Refactor: Prepare Ninja generator for multi-configKyle Edwards2019-12-131-3/+8
|
* cmLocalGenerator: modernize memory managementMarc Chevrier2019-12-101-6/+2
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-1/+2
| | | | | 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: Simplify top-level "all" target generationBrad King2019-09-301-11/+1
| | | | | Remove its dedicated implementation and update the per-directory "all" target generation to work for the top-level directory too.
* cmGlobalNinjaGenerator: Remove unused AddDependencyToAll overloadBrad King2019-09-301-1/+0
|
* Merge branch 'backport-3.15-fix-EXCLUDE_FROM_ALL-subdir-all'Brad King2019-09-301-2/+2
|\ | | | | | | | | | | | | | | Resolve conflicts with changes since the 3.15 series: * Convert `cmSystemTools::IsOn` => `cmIsOn`. * Move one "EXCLUDE_FROM_ALL" target property logic fix to its new location in `cmMakefile::AddNewUtilityTarget`.
| * Merge branch 'backport-3.14-fix-EXCLUDE_FROM_ALL-subdir-all'Brad King2019-09-301-2/+2
| |\
| | * Restore "all" target in subdirectories marked EXCLUDE_FROM_ALLBrad King2019-09-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "all" target in each directory is supposed to have targets from that directory even if the directory itself is marked `EXCLUDE_FROM_ALL` in its parent. This was broken by commit dc6888573d (Pass EXCLUDE_FROM_ALL from directory to targets, 2019-01-15, v3.14.0-rc1~83^2) which made the participation of a target in "all" independent of context. Revert much of the logic change from that commit to restore the old behavior. Then re-implement the behavior intended by the commit to keep its test working. Extend the test to cover the old behavior too. Fixes: #19753
* | | clang-tidy: modernize-return-braced-init-listRegina Pfeifer2019-09-061-1/+1
| | |
* | | clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Automate the conversion with perl -i -0pe 's/typedef ([^;]*) ([^ ]+);/using $2 = $1;/g' then manually fix a few places.
* | | Ninja: Record dyndep support by Ninja 1.10Brad King2019-07-301-0/+1
| | | | | | | | | | | | | | | Upstream Ninja 1.10 and above support the `dyndep` feature we need for Fortran.
* | | Ninja: Drop unused dyndep version checkBrad King2019-07-301-1/+1
| | | | | | | | | | | | | | | | | | 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/+8
| | |
* | | 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-16/+0
| |
* | Ninja: Remove WritePhonyBuild methodSebastian Holtermann2019-05-301-10/+0
| |
* | Ninja: Make WriteCustomCommandBuild method use cmNinjaBuild internallySebastian Holtermann2019-05-301-8/+7
| |
* | Ninja: Make WriteMacOSXContentBuild use cmNinjaBuild internallySebastian Holtermann2019-05-301-2/+2
| |
* | Ninja: Add cmNinjaBuild based WriteBuild (wrapper) methodSebastian Holtermann2019-05-301-0/+7
| |
* | Ninja: Use cmNinjaRule as sole parameter in the WriteRule and AddRule methodsSebastian Holtermann2019-05-291-15/+3
| | | | | | | | | | | | | | | | 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 'additional_clean_files'Brad King2019-05-151-0/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+2
|\ \ \ | |/ / |/| | | | | | | | | | | | | | 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-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+0
| | | | | | | | | | | | | | | | | | | | | 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: In cmGlobalNinjaGenerator use std::unique_ptr to manage output streamsSebastian Holtermann2019-05-111-8/+9
| | |
* | | Ninja: Add and use cmGlobalNinjaGenerator::CMakeCmd methodSebastian Holtermann2019-05-101-1/+2
| | |
* | | Ninja: Simplify cmGlobalNinjaGenerator::AddRule and HasRule methodsSebastian Holtermann2019-05-101-6/+3
|/ / | | | | | | | | - Use `std::unordered_set` for the emitted rule register - Use `std::unordered_map` for command length register
* | cmake: Teach --build mode to support multiple targetsBartosz Kosiorek2019-03-051-9/+6
| | | | | | | | Fixes: #16136
* | ninja: make dyndep generation language awareBen Boeckel2019-02-251-1/+2
|/ | | | | A target may have multiple languages with dyndep rules, separate `.dd` files should be generated.
* Ninja: Detect when ninja is new enough to support a multi-line depfileBrad King2019-01-301-0/+6
| | | | | | Ninja 1.9 supports the multi-line depfile format generated by the Intel Compiler for Windows. Teach the global generator to detect when the version is new enough to support this.
* Merge topic 'tidy-use-equals-default'Brad King2019-01-291-2/+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-2/+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 `{}`).