summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Ninja
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'Ninja-LINK_OPTIONS-with-newlines'Marc Chevrier2023-12-232-0/+9
|\ | | | | | | | | | | | | | | 255c2e1430 Ninja: LINK_OPTIONS property should support newlines Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9096
| * Ninja: LINK_OPTIONS property should support newlinesMarc Chevrier2023-12-202-0/+9
| | | | | | | | Fixes: #25513
* | Merge topic 'ninja-dev'Brad King2023-12-091-3/+6
|\ \ | |/ | | | | | | | | | | | | 101ac06b28 Tests: Update for changes to upstream ninja development version Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !9053
| * Tests: Update for changes to upstream ninja development versionBrad King2023-12-081-3/+6
| | | | | | | | | | | | | | | | | | Account for: * commit `8f47d5aa33` (Remove `-w dupbuild` completely, always error on duplicate edges, 2023-11-29) * commit `4d98903d4c` (Improve misleading error message when an output is defined multiple times, 2023-12-06)
* | Merge topic 'Ninja-use-depslog'Brad King2023-11-077-1/+180
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bb7a0497ef cmTransformDepfile: warn when a depfile is not written to c22c473bde Tests/Ninja*/CustomCommandDepfile: check that deps are in the database b0177003e1 cmGlobalNinjaGenerator: tell `ninja` to actually read the depfile 45eff9145e cmAddCustomCommandCommand: use `cmStrCat` c6445c615b Tests/RunCMake/Ninja: fix subdir prefix check Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8911
| * | Tests/Ninja*/CustomCommandDepfile: check that deps are in the databaseBen Boeckel2023-11-016-0/+179
| | |
| * | Tests/RunCMake/Ninja: fix subdir prefix checkBen Boeckel2023-10-231-1/+1
| |/ | | | | | | If the output path prefix is empty, the directory is going to exist.
* | Tests: Fix clang -Wstrict-prototypes warningsBrad King2023-10-262-2/+2
|/
* OrangeC: Add support for OrangeC compilerDavid Lindauer2023-09-251-1/+5
| | | | | | | Add compiler information modules. Update the test suite. Fixes: #25032 Co-authored-by: Brad King <brad.king@kitware.com>
* Autogen: Move QtAutoMocDeps tests to RunCMake/AutogenOrkun Tokdemir2023-09-116-85/+1
|
* Add deprecation warnings for policies CMP0120 and belowBrad King2023-06-071-0/+8
| | | | | | | The OLD behaviors of all policies are deprecated, but only by documentation. Add an explicit deprecation diagnostic for policies introduced in CMake 3.20 and below to encourage projects to port away from setting policies to OLD.
* Merge topic 'cmake-verbose-print-build-tool-command'Brad King2023-05-311-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8451a3f0b5 cmGlobalGenerator: use a stream for output in `Build` e060666531 cmake: write the build command itself with `--verbose` b017c9f127 cmGlobalGenerator: fix off-by-one for `&&` command joining c715fd8d76 cmGlobalGenerator: quote commands in `::Build` output d6c0e827bc cmGlobalGenerator: add a `QuotedPrintable` method for commands 28ee3bef34 cmGlobalGenerator: add missing spaces in output 465ab8d872 cmGlobalGenerator: use `cmStrCat` in `::Build` 81d45dabc4 cmOutputConverter: add a `static` version of `EscapeForShell` Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Acked-by: Alex <leha-bot@yandex.ru> Merge-request: !8183
| * cmGlobalGenerator: use a stream for output in `Build`Ben Boeckel2023-05-271-1/+1
| | | | | | | | | | This allows output to show up in output immediately instead of being batched.
* | codespell: Avoid escape sequence that looks like misspelled "nodes"Brad King2023-05-222-4/+6
| |
* | Merge topic 'msvc-wine-showIncludes'Brad King2023-05-164-0/+8
|\ \ | |/ |/| | | | | | | | | | | fb3c4715cd Ninja: Restore detection of msvc-wine showIncludes prefix Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: huangqinjin <huangqinjin@gmail.com> Merge-request: !8479
| * Ninja: Restore detection of msvc-wine showIncludes prefixBrad King2023-05-154-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 8f82e755f3 (Ninja: Fix detection of MSVC showIncludes prefix in Italian, 2023-01-26, v3.26.0-rc1~20^2) our regex no longer matches the output from `msvc-wine`, which uses forward slashes: Note: including file: /path/to/foo.h `cl /showIncludes` under Wine prints paths of the form `Z:\path\to\file`, but the `msvc-wine` wrapper converts them to the form `/path/to/file` so that native Ninja can be used. Update our regex to match the prefix followed by a path with a leading forward slash. Fixes: #24908
* | Merge topic 'clang-cl-showIncludes'Brad King2023-03-214-0/+8
|\ \ | |/ | | | | | | | | | | | | 843fc607de Ninja: Restore detection of clang-cl showIncludes prefix 3346570ae9 Tests: Comment RunCMake.Ninja ShowIncludes sample input languages Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8344
| * Ninja: Restore detection of clang-cl showIncludes prefixYR Chen2023-03-204-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 8f82e755f3 (Ninja: Fix detection of MSVC showIncludes prefix in Italian, 2023-01-26, v3.26.0-rc1~20^2) our regex no longer matches the output from `clang-cl`, which uses a relative path, forward slashes, and is always in English [1]: Note: including file: ./foo.h Update the regex to match that too. [1] https://github.com/llvm/llvm-project/blob/llvmorg-16.0.0/clang/lib/Frontend/HeaderIncludeGen.cpp#L102 Co-authored-by: Brad King <brad.king@kitware.com>
* | Add variable CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLYAbdelmaged Khalifa2023-02-172-10/+48
| | | | | | | | | | | | | | Add CMake variable `CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY` to enable option `DEPENDS_EXPLICIT_ONLY` on all uses of `add_custom_command`. Fixes: #17097
* | Merge topic 'ninja-custom-command-depends'Brad King2023-02-152-0/+30
|\ \ | | | | | | | | | | | | | | | | | | 082ccd7530 add_custom_command: Add DEPENDS_EXPLICIT_ONLY option for Ninja Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8198
| * | add_custom_command: Add DEPENDS_EXPLICIT_ONLY option for NinjaAbdelmaged Khalifa2023-02-142-0/+30
| |/ | | | | | | | | | | | | | | | | Add option `DEPENDS_EXPLICIT_ONLY` to `add_custom_command` to indicate that implicit dependencies coming from users of the output are not needed, and only consider dependencies explicitly specified in the custom command. Fixes: #17097
* | Deprecate compatibility with CMake versions older than 3.5Brad King2023-02-114-5/+40
| | | | | | | | | | | | | | | | Issue a deprecation warning on calls to `cmake_minimum_required` or `cmake_policy` that set policies based on versions older than 3.5. Note that the effective policy version includes `...<max>` treatment. Update the check from commit 5845c218d7 (Deprecate compatibility with CMake versions older than 2.8.12, 2020-06-12, v3.19.0-rc1~629^2).
* | Tests/RunCMake: Update cmake_minimum_required versionsBrad King2023-02-1116-24/+14
|/ | | | | | | | For policy-specific tests, use the version before the policy was introduced. Otherwise, use 3.5 where possible. Also, remove `cmake_minimum_required()` and `project()` calls from individual cases where they are handled by `CMakeLists.txt`.
* Ninja: Fix detection of MSVC showIncludes prefix in ItalianBrad King2023-01-284-0/+8
| | | | | | The prefix does not have two colons. Update our regex. Fixes: #24357
* Tests: Extend RunCMake.Ninja ShowIncludes cases to cover more languagesBrad King2023-01-2819-0/+50
| | | | Add cases for English, French, German, and Japanese.
* Tests: Generalize RunCMake.Ninja ShowIncludes test infrastructureBrad King2023-01-289-3/+9
| | | | Prepare to add support for more languages.
* Tests: Extend RunCMake.Ninja ShowIncludes case with sample pathBrad King2023-01-274-4/+4
| | | | Verify that the prefix is separated from the path.
* Ninja: Match showIncludes dependencies using console output code pageBrad King2022-10-3010-0/+67
| | | | | | | | | Generalize the fix from commit 37a279f8d1 (Ninja: Write msvc_deps_prefix as UTF-8 when console codepage is UTF-8, 2020-07-31, v3.19.0-rc1~349^2). `cl /showIncludes` output is encoded using the console output code page, so this is the byte sequence that Ninja must use to match its lines. Fixes: #24068
* Merge topic 'ninja-intl-paths' into release-3.25Brad King2022-10-274-0/+22
|\ | | | | | | | | | | | | | | a12050666c Tests: Add case for ninja with non-ascii chars 02a04dd9c7 Ninja: Restore support for non-ascii paths on Windows with ninja<=1.10 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7833
| * Tests: Add case for ninja with non-ascii charsBrad King2022-10-264-0/+22
| | | | | | | | Issue: #24089
* | AUTOMOC: Skip PCH when all sources files skip the PCH file tooCristian Adam2022-10-062-0/+33
|/ | | | Fixes: #23464
* Tests: Add support for testing Qt6Craig Scott2021-10-046-31/+44
| | | | | | | | | | | | The minimum CMake version for Qt6 is 3.16, so all the calls to cmake_minimum_required() are updated here to enforce that minimum. This will avoid any CMake version-related warnings from Qt. Avoid hard-coding Qt5 where the tests could now be using Qt5 or Qt6. Fixes: #22188
* Tests/RunCMake/Ninja.*: Sanitize NINJA_STATUS since we expect default behaviorNAKAMURA Takumi2021-06-281-0/+3
| | | | FYI, NINJA_STATUS is "[%f/%t] " by default.
* Ninja: Always compile sources using absolute pathsBrad King2021-05-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Ninja generator traditionally referenced source files and include directories using paths relative to the build directory if they could be expressed without a `../` sequence that leaves the build and source directories. For example, when using a `build/` directory inside the source tree, sources would be compiled as `-c ../src.c` and include directories would be referenced as `-I ../include`. This approach matches the traditional Ninja convention of using relative paths whenever possible, but has undesirable side effects such as: * Compiler diagnostic messages may not use absolute paths, making it harder for IDEs/editors to find the referenced sources or headers. * Debug symbols may not use absolute paths, making it harder for debuggers to find the referenced sources or headers. * Different results depending on the path to the build tree relative to the source tree. * Inconsistent with the Makefile generators, which use absolute paths. Switch to always using absolute paths to reference source files and include directories on compiler command lines. While alternative solutions for diagnostic messages and debug symbols may exist with specific tooling, this is the simplest and most consistent approach. Note that a previous attempt to do this in commit 955c2a630a (Ninja: Use full path for all source files, 2016-08-05, v3.7.0-rc1~275^2) was reverted by commit 666ad1df2d (Revert "Ninja: Use full path for all source files", 2017-02-24, v3.8.0-rc2~9^2) due to problems hooking up depfile dependencies on generated files. This time, the changes in commit 2725ecff38 (Ninja: Handle depfiles with absolute paths to generated files, 2021-05-19) should avoid those problems. Fixes: #13894, #17450
* Genex: add_custom_command: DEPFILE supports genexMarc Chevrier2021-04-123-3/+19
| | | | | | This facility is very useful for 'Ninja Multi-Config' and required as well for future support of DEPFILE in 'Xcode' and 'Visual Studio' generators (#20286).
* Tests: Add test for Ninja automoc dependency cyleKyle Edwards2021-03-295-14/+45
|
* Merge topic 'autogen-cmp0116-fix' into release-3.20Brad King2021-02-242-0/+3
|\ | | | | | | | | | | | | | | | | | | | | 339dbc901f Help: Note that CMP0116 is recorded at the time of CC creation e3740e020e Tests: Test Qt autogen target with CMP0116 set to WARN cf34011ce7 Tests: Test per-CC behavior of CMP0116 3a95503512 Ninja: Use CMP0116 status recorded at time of custom command's creation f01f10e8fb cmCustomCommand: Record value of CMP0116 at time of creation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5848
| * Tests: Test Qt autogen target with CMP0116 set to WARNKyle Edwards2021-02-232-0/+3
| |
* | Merge topic 'ninja-status-stderr' into release-3.20Brad King2021-02-241-0/+2
|\ \ | |/ |/| | | | | | | | | d33c2c93d8 Tests: Update for upstream ninja change to write status on stderr Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5850
| * Tests: Update for upstream ninja change to write status on stderrBrad King2021-02-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Upstream ninja commit `ad3d29fb53` (Put builder output through status interface) from ninja PR 1899 changed the status output from stdout to stderr. In particular, `ninja: no work to do` is now printed on stderr. Update our RunCMake tests to accept this difference. A few RunCMake test cases check for `ninja: no work to do`. For those, move the message to stdout using `RunCMake_TEST_OUTPUT_MERGE`. The rest of the test cases do not care about the message, so remove it from the actual stderr content before comparing against that expected.
* | AutoGen: Account for CMP0116 in the depfileKyle Edwards2020-12-084-2/+22
| | | | | | | | Fixes: #21467
* | GENERATED prop: Set CMP0118 to NEW for some (unrelated) testsDeniz Bahadir2020-11-241-1/+1
| | | | | | | | | | | | * Adjusting the (unrelated) RunCMake.Ninja test to set CMP0118 to `NEW`. * Adjusting the (unrelated) RunCMake.FileAPI test to set CMP0118 to `NEW`.
* | GENERATED prop: Check CMP0118 policy and warn in certain situationsDeniz Bahadir2020-11-241-0/+1
|/ | | | | | | | | | | | | | * Adding tests for CMP0118 being unset (aka set to `WARN`). * Adjusting the (unrelated) RunCMake.CMP0026 test to set CMP0118 to `NEW`, * Adjusting the (unrelated) RunCMake.Ninja test to set CMP0118 to `OLD`. * Adjusting the (unrelated) RunCMake.FileAPI test to set CMP0118 to `OLD`. Note: Setting CMP0118 to `NEW` and modifying the `GENERATED` property with `set_property` or `set_source_files_properties` will currently NOT set that property because the implementation is still to come.
* Tests: Pass additional Qt information to Ninja and NMC testsKyle Edwards2020-09-011-0/+1
|
* Merge branch 'backport-3.17-automoc_timestamp_deps'Brad King2020-08-055-0/+53
|\
| * AutoGen: Add test to check for correct AutoMoc dependenciesAlexandru Croitor2020-08-035-0/+53
| | | | | | | | | | | | When using Qt 5.15.0 or above together with Ninja, check that touching a source file of a dependency does not needlessly re-run AUTOMOC for the dependee target.
* | Merge branch 'master' into ninja-order-only-fixKyle Edwards2020-04-239-0/+30
|\ \ | |/ |/|
| * Ninja: On Windows, select the compiler occurring first in PATHBrad King2020-04-229-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, toolchains like MSVC require a set of environment variables to be configured for the compiler to work correctly. The scripts that prepare these environments typically put the compiler's directory ahead of others in the `PATH`. Teach the Ninja generators to use this as a heuristic to select the compiler when none is explicitly specified. This is not necessary with Makefile generators because each toolchain's environment comes with its own make tool variant, and the corresponding Makefile generator (e.g. "NMake Makefiles") automatically implies the matching compiler. Fixes: #20585
* | Ninja: Remove config suffix from order-only targetKyle Edwards2020-04-232-0/+21
|/ | | | Fixes: #20621
* Tests: Fix RunCMake.Ninja test for Ninja 1.10Brad King2020-01-271-0/+1
| | | | | | | With Ninja 1.10 we run the cleandead and recompact tools after generation. These require that `build.ninja` be loadable. Update the `CustomCommandJobPool` case to define the referenced job pools to make `build.ninja` loadable.