summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Ninja Multi-Config: Fix custom command target dependencies in cross-configsBrad King2021-11-041-0/+10
| | | | | | | | | | | Generator expressions in a non-cross custom command's `COMMAND` arguments are evaluated in the command config. Target-level dependencies implied by `TARGET_FILE` must therefore be cross dependencies. This is important to generate proper target-level dependencies on the cross-config build statements for the target to which the custom command is attached. Fixes: #22855
* Tests: Add support for testing Qt6Craig Scott2021-10-041-7/+13
| | | | | | | | | | | | 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: Clean up Ninja Multi-Config test from cb777ddKyle Edwards2021-07-231-2/+1
|
* Ninja Multi-Config: Restore TARGET_OBJECTS support in cross-configsBrad King2021-07-211-0/+2
| | | | | | | | | | | | | | | | Since commit 2ae72ef74b (Xcode: Enable multi-arch TARGET_OBJECTS genex in [INTERFACE_]LINK_LIBRARIES, 2021-05-26, v3.21.0-rc1~126^2) the TARGET_OBJECTS genex, when referenced for linking, is now evaluated with EvaluateForBuildsystem enabled. This causes the object file paths to be computed with a buildsystem-specific placeholder for the configuration. This is normally fine because the placeholder will be evaluated by the native buildsystem tool using the proper configuration. However, the Ninja Multi-Config generator's `${CONFIGURATION}` placeholder may not have the correct value for cross-config object files. Switch back to using the per-config location of each object file for this generator. Fixes: #22436
* 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 Multi-Config: Split long command lines by configKyle Edwards2021-04-301-0/+3
| | | | Fixes: #22123
* Ninja Multi-Config: Correctly generate POST_BUILD custom targetsKyle Edwards2021-04-221-0/+2
| | | | Fixes: #22096
* Ninja Multi-Config: Fix crash on custom command config with no outputBrad King2021-03-291-0/+14
| | | | | | | | With generator expressions in a custom command's `OUTPUT` and `BYPRODUCTS`, it is possible to have no outputs at all for a particular configuration. Generate no rule in this case. Fixes: #21989
* Ninja Multi-Config: Include configs in long CC scriptsKyle Edwards2021-03-251-0/+5
| | | | Fixes: #21973
* Ninja Multi-Config: Restore rebuild_cache and edit_cache targetsBrad King2021-01-251-0/+3
| | | | | | | | Since commit dcf9f4d2f7 (Ninja Multi-Config: Add support for cross-config custom commands, 2020-12-09) we were not generating these targets. Restore them and add a test. Fixes: #21722
* Ninja Multi-Config: Run POST_BUILD when BYPRODUCTS don't overlapKyle Edwards2021-01-071-0/+6
| | | | Fixes: #21252
* Tests: Add cases for Ninja Multi-Config cross-config custom commandsBrad King2020-12-151-0/+96
|
* Tests: Fix one RunCMake.NinjaMultiConfig case nameBrad King2020-11-021-1/+1
| | | | | | | The CustomCommandGenerator `debug-in-release-graph-clean` case actually cleans using the Debug graph. This is intentional in order to test cleaning only the Debug parts, so fix the test name rather than changing what graph it uses.
* Merge branch 'release' into ninja-multi-per-config-sourcesKyle Edwards2020-10-261-0/+5
|\
| * Merge topic 'ninja-multi-automoc-regression'Brad King2020-09-181-1/+6
| |\ | | | | | | | | | | | | | | | | | | 23fe4b861f Ninja Multi-Config: Fix dependencies of custom commands Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5238
| * \ Merge branch 'master' into ninja-multi-automoc-regressionKyle Edwards2020-09-021-0/+5
| |\ \
| | * | Allow generator expressions in the EXCLUDE_FROM_ALL target propertyJoerg Bornemann2020-07-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows for setting EXCLUDE_FROM_ALL, conditional on the build configuration. However, only the Ninja Multi-Config generator supports different property values per config. All other multi-config generators will yield an error in that situation. Fixes: #20923
* | | | Ninja Multi-Config: Don't try to calculate dependencies for "all"Kyle Edwards2020-10-261-0/+4
| |_|/ |/| |
* | | Ninja Multi-Config: Fix dependencies of custom commandsKyle Edwards2020-09-171-1/+6
|/ / | | | | | | | | | | | | | | | | | | a9fd3a10 addressed the scenario where the depending target is a utility target, but not the scenario where the dependent target is a utility target. Account for this scenario. Also add a Qt-specific test case. Fixes: #21118
* | Ninja Multi-Config: Fix dependencies of utility targetsKyle Edwards2020-09-021-0/+4
| | | | | | | | Fixes: #21118
* | Tests: Pass additional Qt information to Ninja and NMC testsKyle Edwards2020-09-011-1/+1
|/
* Merge topic 'ninja-multi-install'Brad King2020-05-251-1/+5
|\ | | | | | | | | | | | | dddb4f02f7 Ninja Multi-Config: Make "install" targets depend on default configs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4778
| * Ninja Multi-Config: Make "install" targets depend on default configsKyle Edwards2020-05-221-1/+5
| | | | | | | | | | | | And add an "install:all" target. Fixes: #20713
* | Tests: Restore NVCC-specific CUDA testsBrad King2020-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit a653ca9504 (Tests: Update CUDA tests to work with Clang, 2020-03-27) some tests were conditioned using `CMAKE_CUDA_COMPILER_ID`. That is not defined when configuring CMake itself, so it accidentally turned off NVCC-specific CUDA tests altogether. Convert the conditions to check `CMake_TEST_CUDA` for `Clang` instead. That option is added explicitly to builds where we want the tests to run, so we can set it to a value indicating the CUDA compiler vendor. In commit a653ca9504 (Tests: Update CUDA tests to work with Clang, 2020-03-27) the NVCC-specific `CudaOnly.GPUDebugFlag` test was accidentally broken by removing a space when appending `-G` to the CUDA flags. This was covered by the test not running. Restore the space. Fixes: #20727
* | Tests: Update CUDA tests to work with ClangRaul Tambre2020-05-151-1/+2
|/
* Ninja Multi-Config: Fix spurious unused variable warningKyle Edwards2020-03-031-2/+12
| | | | Fixes: #20381
* Ninja Multi-Config: Always generate build.ninjaKyle Edwards2020-02-271-5/+3
| | | | | If CMAKE_DEFAULT_BUILD_TYPE is not specified, use the first item from CMAKE_CONFIGURATION_TYPES instead.
* Ninja Multi-Config: Remove "NMC" from variable namesKyle Edwards2020-02-271-19/+19
| | | | | | Also rename `..._DEFAULT_BUILD_FILE_CONFIG` to `..._DEFAULT_BUILD_TYPE`. These name changes make the variables meaningful for future use by other generators.
* Ninja Multi-Config: Fix issue with framework dependencies and AutogenKyle Edwards2020-02-171-0/+7
| | | | Fixes: #20345
* Ninja Multi-Config: Fix issue with "all" in CMAKE_NMC_DEFAULT_CONFIGSKyle Edwards2020-02-111-0/+7
| | | | | | | | 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/+4
| | | | And give other generators a path forward to add support in the future.
* Merge topic 'ninja-multi-default-config-fix' into release-3.17Brad King2020-02-071-0/+4
|\ | | | | | | | | | | | | 1844be451e Ninja Multi-Config: Fix issue with CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4331
| * Ninja Multi-Config: Fix issue with CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIGKyle Edwards2020-02-061-0/+4
| | | | | | | | | | | | Fix an issue where CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG is specified and CMAKE_NMC_CROSS_CONFIGS is not, which results in a false error with CMAKE_NMC_DEFAULT_CONFIGS.
* | Ninja Multi-Config: Don't include MinSizeRel by defaultKyle Edwards2020-02-061-4/+4
|/
* Ninja Multi-Config: Use build.ninja if cmake --build has no --configKyle Edwards2020-02-041-2/+8
| | | | | | 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-10/+42
| | | | | | Remove redundant variable CMAKE_NINJA_MULTI_CROSS_CONFIG_ENABLE. Rename other variables. Document and improve handling of error conditions.
* Ninja Multi-Config: Fix bug with MacOS frameworksKyle Edwards2020-01-241-0/+7
|
* Ninja Multi-Config: Add variable to control configs used in cross-config buildKyle Edwards2020-01-231-0/+14
|
* Ninja Multi-Config: Add variable to control aliases in build.ninjaKyle Edwards2020-01-221-0/+9
|
* Refactor: Split Ninja files into impl-<Config>.ninja and build-<Config>.ninjaKyle Edwards2020-01-221-0/+3
|
* Ninja Multi-Config: Rename variable to be more consistentKyle Edwards2020-01-161-7/+7
| | | | Also make some tweaks to the documentation.
* CUDA: Mult-Config Ninja generator now supports CUDARobert Maynard2020-01-131-0/+8
|
* Ninja Multi-Config: Make cross-config building opt-inKyle Edwards2020-01-101-5/+26
| | | | | | | | | | | 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.
* Tests: Add test for Multi-Configuration Ninja generatorKyle Edwards2019-12-131-0/+173