summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Ninja
Commit message (Collapse)AuthorAgeFilesLines
* Add deprecation warnings for policies CMP0063 and belowBrad King2018-09-172-0/+20
| | | | | | The OLD behaviors of all policies are deprecated, but only by documentation. Add an explicit deprecation diagnostic for some policies to encourage projects to port away from setting policies to OLD.
* Tests: Extend RunCMake.Ninja filesystem delaysBrad King2018-09-121-4/+5
| | | | | | On filesystems with 1s resolution the `run_sub_cmake` cases fail occasionally when the 1 second sleep does not cause files to have a different time. Use 3 seconds instead.
* Ninja: Fix dupbuild error skipping alias with conflicting custom commandJean-Christophe Fillion-Robin2018-08-092-0/+48
| | | | | | See-also: https://issues.slicer.org/view.php?id=4595 Reported-by: Isaiah Norton <inorton@bwh.harvard.edu>
* Ninja: Avoid empty phony edges for target orderingBrad King2018-04-263-0/+12
| | | | | | | | | | | | | | | | Since commit v3.9.0-rc1~230^2~2 (ninja: break unnecessary target dependencies, 2017-04-17) we unconditionally generate a phony edge for target ordering. It is needed in case a later target depends on it. However, if the phony edge has no inputs then `ninja -d explain` prints: ninja explain: output ... of phony edge with no inputs doesn't exist Furthermore the phony edge's output is considered dirty and can cause dependents to be incorrectly considered dirty. Avoid this by always generating at least one input to the target ordering phony edges. If we have no real dependencies just use a path that always exists. Fixes: #17942
* Ninja: Fix Fortran support with response filesBrad King2018-04-054-0/+12
| | | | | | | | | | The Ninja generator splits preprocessing and compilation steps for Fortran. Fix this logic to work when using response files for compilation so that it works for the preprocessing step too. This fixes behavior under `CMAKE_NINJA_FORCE_RESPONSE_FILE`. Issue: #17877
* Ninja: Fix command concatenation on WindowsBernhard Burgermeister2017-05-092-0/+24
| | | | | | | | | | | Put commands that contain `||` into brackets to avoid early abort of execution by `cmd.exe` because `||` has higher precedence than `&&` in `cmd.exe`. Add test to check for command execution after `||` as part of a parameter and as command separator. Fixes: #16850
* RunCMake.Ninja: add a test for assumed sourcesBen Boeckel2017-04-212-0/+36
| | | | | This is a dark corner of the Ninja generator. It should be fixed in the future, but add a test which shows its behaviors.
* ninja: break unnecessary target dependenciesBen Boeckel2017-04-214-0/+54
| | | | | | | | | | | | | | | | | | Previously, given two libraries, X and Y where X depends on Y, all object compilations of X would require the Y library to have been linked before being compiled. This is not necessary and can instead be loosened such that object compilations of X only depend on the order-only dependencies of Y to be completed. This is to ensure that generated sources, headers, custom commands, etc. are completed before X starts to compile its objects. This should help build performance in projects with many libraries which cause a deep library dependency chain. Previously, a library at the bottom would not start compilation until after all other libraries completed, but now only its link step needs to wait and its compilation jobs can be run in parallel with other tasks. Fixes: #15555
* RunCMake.Ninja: support passing arguments when running ninjaBen Boeckel2017-04-211-1/+1
|
* Ninja: Use binary dir for `$subdir/all` targetsAlexis Murzeau2016-10-246-0/+19
| | | | | | | | | | The targets added by commit v3.6.0-rc1~240^2~2 (Ninja: Add `$subdir/all` targets, 2016-03-11) use as `$subdir` the relative path from the top of the source tree to the current source directory. This is not correct when using `add_subdirectory(test test_bin)`. Instead we need to use the relative path from the top of the binary tree to the current binary directory as was done for related targets by commit v3.7.0-rc1~268^2 (Ninja: Add `$subdir/{test,install,package}` targets, 2016-08-05).
* Ninja: Fail early on when ninja build tool does not runBrad King2016-10-204-0/+13
| | | | | | | | Diagnose failure to run `ninja --version` and abort early. Otherwise we end up aborting with a confusing message about ninja version "" being too old. Closes: #16378
* add_custom_command: Add DEPFILE option for NinjaKulla Christoph2016-08-303-0/+18
| | | | | | | | Provide a way for custom commands to inform the ninja build tool about their implicit dependencies. For now simply make use of the option an error on other generators. Closes: #15479
* Ninja: Add `$subdir/{test,install,package}` targetsBrad King2016-08-095-0/+17
| | | | | | | | | | | | | With the Makefile generator one can use `cd $subdir; make install` to build and install targets associated with a given subdirectory. This is not possible to do with the Ninja generator since there is only one `build.ninja` file at the top of the build tree. However, we can approximate it by allowing one to run `ninja $subdir/install` at the top of the tree to build the targets in the corresponding subdirectory and install them. This also makes sense for `test`, `package`, and other GLOBAL_TARGET targets. It was already done for `all` by commit v3.6.0-rc1~240^2~2 (Ninja: Add `$subdir/all` targets, 2016-03-11).
* Tests: Select RunCMake.Ninja test cases based on ninja versionBrad King2016-05-181-0/+20
| | | | | Some test cases need features not available in Ninja < 1.6, so check the version before running them.
* Ninja: Support embedding of CMake as subninja projectNicolas Despres2016-05-1721-0/+308
| | | | | | Add a `CMAKE_NINJA_OUTPUT_PATH_PREFIX` variable. When it is set, CMake generates a `build.ninja` file suitable for embedding into another ninja project potentially generated by an alien generator.
* Ninja: Add test for `$subdir/all` targetsBrad King2016-03-224-0/+21
|
* Ninja: Add policy to require explicit custom command byproductsBrad King2015-03-2017-0/+92
Add policy CMP0058 to avoid generating 'phony' ninja rules for unknown custom command dependencies. This requires projects to specify their custom command byproducts explicitly. With this requirement we no longer have to assume that unknown custom command dependencies are generated and can instead simply assume they are source files expected to exist when the build starts. This is particularly important in in-source builds. It is also helpful for out-of-source builds to allow Ninja to diagnose missing files before running custom command rules that depend on them.