summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/NinjaMultiConfig
Commit message (Collapse)AuthorAgeFilesLines
* Ninja Multi-Config: Deduplicate compile_commands.json for cross configsKyle Edwards2022-07-153-0/+36
| | | | | | | | compile_commands.json was being written for every permutation of cross configurations. Deduplicate so only one command is output for each configuration. Fixes: #23733
* ExternalProject: Express per-config step stamp file paths using CONFIG genexBrad King2022-06-082-0/+16
| | | | | | | | | | | | | The ExternalProject module has long used the generator-specific placeholder in the `${CMAKE_CFG_INTDIR}` variable to express per-config stamp file paths in multi-config generators. Now that most generators support generator expressions in custom command outputs, we can use the `$<CONFIG>` genex instead. In particular, this fixes cross-config `BUILD_BYPRODUCTS` with the Ninja Multi-Config generator. Fixes: #23595
* ci: remove ISPC from the Fedora CI imageBrad King2022-06-061-1/+1
| | | | | | | | | Revert commit 5ece12b7e4 (gitlab-ci: add ISPC to the Fedora CI image, 2020-08-18, v3.19.0-rc1~244^2). Later we will download ISPC in specific jobs. Update a `RunCMake.NinjaMultiConfig` test expectation to account for a change to the Qt deployed on Fedora 36.
* CUDA: Support CMP0105 on ClangRaul Tambre2021-11-081-1/+1
| | | | | | | Add link flags during the "device compile" step. Enabled the relevant tests. The disable reasons regarding separable compilation were outdated and the actual failure case was device link flags support.
* Ninja Multi-Config: Fix custom command target dependencies in cross-configsBrad King2021-11-045-0/+26
| | | | | | | | | | | 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-044-10/+19
| | | | | | | | | | | | 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-2318-6/+127
|
* Ninja Multi-Config: Restore TARGET_OBJECTS support in cross-configsBrad King2021-07-216-3/+47
| | | | | | | | | | | | | | | | 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.
* Merge topic 'ninja-multi-long-command-line-config'Brad King2021-05-033-0/+12
|\ | | | | | | | | | | | | ad08f93ee4 Ninja Multi-Config: Split long command lines by config Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6067
| * Ninja Multi-Config: Split long command lines by configKyle Edwards2021-04-303-0/+12
| | | | | | | | Fixes: #22123
* | Merge topic 'ninja-multi-custom-target-post-build'Brad King2021-04-263-0/+14
|\ \ | |/ | | | | | | | | | | f8e2a74712 Ninja Multi-Config: Correctly generate POST_BUILD custom targets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6040
| * Ninja Multi-Config: Correctly generate POST_BUILD custom targetsKyle Edwards2021-04-223-0/+14
| | | | | | | | Fixes: #22096
* | Genex: add_custom_command: DEPFILE supports genexMarc Chevrier2021-04-122-2/+18
|/ | | | | | 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).
* Ninja Multi-Config: Fix crash on custom command config with no outputBrad King2021-03-298-0/+61
| | | | | | | | 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
* Tests: Teach RunCMake to ignore incidental 'Recompacting log' ninja outputBrad King2021-03-291-2/+1
| | | | Ninja versions prior to 1.6.0 occasionally print this message.
* Ninja Multi-Config: Include configs in long CC scriptsKyle Edwards2021-03-252-0/+21
| | | | Fixes: #21973
* Ninja Multi-Config: Restore rebuild_cache and edit_cache targetsBrad King2021-01-254-0/+12
| | | | | | | | 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-074-0/+17
| | | | Fixes: #21252
* Autogen: Add support for per-config sourcesBrad King2020-12-161-1/+2
| | | | Fixes: #20682
* Tests: Add cases for Ninja Multi-Config cross-config custom commandsBrad King2020-12-1549-0/+445
|
* Tests: Fix one RunCMake.NinjaMultiConfig case nameBrad King2020-11-022-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-263-0/+26
|\
| * Merge topic 'ninja-multi-automoc-regression'Brad King2020-09-185-7/+27
| |\ | | | | | | | | | | | | | | | | | | 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-023-0/+26
| |\ \
| | * | Allow generator expressions in the EXCLUDE_FROM_ALL target propertyJoerg Bornemann2020-07-213-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-262-0/+12
| |_|/ |/| |
* | | Ninja Multi-Config: Fix dependencies of custom commandsKyle Edwards2020-09-175-7/+27
|/ / | | | | | | | | | | | | | | | | | | 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-025-1/+30
| | | | | | | | Fixes: #21118
* | Tests: Pass additional Qt information to Ninja and NMC testsKyle Edwards2020-09-011-1/+1
|/
* Merge topic 'ninja-multi-export-all-symbols'Brad King2020-06-011-0/+2
|\ | | | | | | | | | | | | | | 6fc4bfa11c Ninja Multi-Config: Fix bug in CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alex Reinking <alex_reinking@berkeley.edu> Merge-request: !4825
| * Ninja Multi-Config: Fix bug in CMAKE_WINDOWS_EXPORT_ALL_SYMBOLSKyle Edwards2020-05-291-0/+2
| | | | | | | | Fixes: #20775
* | Merge topic 'ninja-multi-install'Brad King2020-05-253-1/+75
|\ \ | |/ | | | | | | | | | | 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-223-1/+75
| | | | | | | | | | | | And add an "install:all" target. Fixes: #20713
| * Merge topic 'ninja-multi-custom-command-deps' into release-3.17Brad King2020-03-053-6/+3
| |\ | | | | | | | | | | | | | | | | | | 081c4679f7 Ninja Multi-Config: Don't build target dependencies for custom commands Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4423
* | | 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
| | |
* | | CUDA: Add CUDA_ARCHITECTURES target propertyRaul Tambre2020-04-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplifies CUDA target architecture handling. Required for Clang support as Clang doesn't automatically select a supported architecture. We detect a supported architecture during compiler identification and set CMAKE_CUDA_ARCHITECTURES to it. Introduces CMP0104 for backwards compatibility with manually setting code generation flags with NVCC. Implements #17963.
* | | Merge topic 'ninja-multi-custom-command-deps'Brad King2020-03-053-6/+3
|\ \ \ | |/ / |/| / | |/ | | | | | | 081c4679f7 Ninja Multi-Config: Don't build target dependencies for custom commands Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4423
| * Ninja Multi-Config: Don't build target dependencies for custom commandsKyle Edwards2020-03-033-6/+3
| | | | | | | | | | | | | | If cross-config mode is used, and a target depends on another target as well as a custom command, we don't want the custom command to also depend on the depended target, as that would build targets unnecessarily. Fix this behavior.
* | Ninja Multi-Config: Fix spurious unused variable warningKyle Edwards2020-03-032-2/+13
|/ | | | Fixes: #20381
* Ninja Multi-Config: Always generate build.ninjaKyle Edwards2020-02-274-12/+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-276-27/+27
| | | | | | 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-172-0/+27
| | | | Fixes: #20345
* Ninja Multi-Config: Fix issue with "all" in CMAKE_NMC_DEFAULT_CONFIGSKyle Edwards2020-02-113-0/+45
| | | | | | | | 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-073-0/+18
| | | | 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-072-0/+5
|\ | | | | | | | | | | | | 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-062-0/+5
| | | | | | | | | | | | 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-042-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.