summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'preset-flag-consistency' into release-3.20Brad King2021-02-249-7/+40
|\ | | | | | | | | | | | | | | | | 6fa3647023 ctest: Add support for '--prefix=<prefix>' form of the argument 3357d37761 cmake: Add support for '--build --prefix=<prefix>' form of the argument 2f13fdef0a cmake: Document '--preset <preset>' form of the argument Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5849
| * ctest: Add support for '--prefix=<prefix>' form of the argumentBrad King2021-02-231-2/+10
| | | | | | | | | | | | | | The main `cmake --preset` argument for configure presets supports both forms, so support it for `ctest --preset` too. Fixes: #21855
| * cmake: Add support for '--build --prefix=<prefix>' form of the argumentBrad King2021-02-231-2/+10
| | | | | | | | | | | | | | The main `cmake --preset` argument for configure presets supports both forms, so support it for `cmake --build --preset` too. Issue: #21855
| * cmake: Document '--preset <preset>' form of the argumentBrad King2021-02-237-3/+20
| | | | | | | | | | | | This form already works. Document it and add tests. Issue: #21855
* | Merge topic 'LINK_LANGUAGE-genex-respects-LINKER_LANGUAGE-property' into ↵Brad King2021-02-244-5/+34
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | release-3.20 b722eea925 Genex: LINK_LANGUAGE respects LINKER_LANGUAGE property Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5841
| * | Genex: LINK_LANGUAGE respects LINKER_LANGUAGE propertyMarc Chevrier2021-02-234-5/+34
| |/ | | | | | | | | | | | | If target property LINKER_LANGUAGE is set, LINK_LANGUAGE generator expression evaluation must be always successful. This fix can be helpful to elaborate a solution for issue #21818.
* | Merge topic 'autogen-cmp0116-fix' into release-3.20Brad King2021-02-245-0/+41
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | |
| * | Tests: Test per-CC behavior of CMP0116Kyle Edwards2021-02-233-0/+38
| | |
* | | Merge topic 'preset-no-comments' into release-3.20Brad King2021-02-247-15/+16
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 06e16ea008 Merge branch 'backport-3.19-preset-no-comments' into preset-no-comments afaa69f5b3 Tests: Remove comments from CMakePresetsTest/Good.json.in 4a92277f45 Revert "Help: Document JSON comment support in cmake-presets(7)" 431dd59b5e CMakePresets.json: Remove undocumented support for comments Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5853
| * \ \ Merge branch 'backport-3.19-preset-no-comments' into preset-no-commentsBrad King2021-02-246-6/+16
| |\ \ \
| | * | | CMakePresets.json: Remove undocumented support for commentsKyle Edwards2021-02-246-6/+16
| | | | | | | | | | | | | | | | | | | | Fixes: #21858
| * | | | Tests: Remove comments from CMakePresetsTest/Good.json.inKyle Edwards2021-02-241-9/+0
| | |_|/ | |/| |
* | | | Merge topic 'ninja-status-stderr' into release-3.20Brad King2021-02-243-0/+12
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | 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-233-0/+12
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge topic 'test-ExternalProject-CONFIGURE_HANDLED_BY_BUILD' into release-3.20Brad King2021-02-231-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 74fe16a292 Tests: Fix ExternalProject CONFIGURE_HANDLED_BY_BUILD on 1s filesystems Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5838
| * | | Tests: Fix ExternalProject CONFIGURE_HANDLED_BY_BUILD on 1s filesystemsDaan De Meyer2021-02-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following commit 7155e358c9 (ExternalProject: Add CONFIGURE_HANDLED_BY_BUILD option, 2020-12-16, v3.20.0-rc1~168^2), modify the CONFIGURE_HANDLED_BY_BUILD test to sleep 1.125 seconds to make sure the file timestamp is always updated regardless of the resolution of the underlying filesystem. Fixes: #21830
* | | | Tests: Suppress failures on macOS arm64 due to separate Xcode signing phaseBrad King2021-02-228-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some tests fail because Xcode runs `POST_BUILD` commands before signing the binaries they run. Tell the linker to perform ad-hoc codesign even though Xcode normally tells it not to. Other tests fail because `install_name_tool` does not revise ad-hoc signatures without the codesign `linker-signed` flag. Add that flag ourselves where needed by our tests. For now these changes help our test suite pass so we can use it to cover everything else. Both of these cases may need further investigation to update CMake to help projects in general. Issue: #21845, #21854
* | | | Tests: Fix CTestTestCrash expected output on macOS arm64Brad King2021-02-221-1/+1
| | | |
* | | | Tests: Remove explicit no-signing marks from BundleTestBrad King2021-02-223-14/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were added by commit e29a92f525 (Xcode: Make BundleTests compatible with Xcode 11, 2019-09-01, v3.16.0-rc1~158^2). The real problem is that the `.app` is constructed with text files under the `.app/Contents/MacOS/` folder. Move those, and drop the special no-signing configuration.
* | | | Tests: Clarify internal project name in RunCMake.GoogleTest casesBrad King2021-02-224-4/+4
| | | |
* | | | Merge topic 'fix-IS_NEWER_THAN-usage' into release-3.20Brad King2021-02-225-0/+85
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | b0da671243 FetchContent: Don't update timestamps if files don't change 404cddb7bb ExternalProject: Fix misuse of IS_NEWER_THAN in timestamp checks Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5825
| * | | FetchContent: Don't update timestamps if files don't changeCraig Scott2021-02-225-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The refactoring in 17e5516e60 (FetchContent: Invoke steps directly and avoid a separate sub-build, 2021-01-29) uses a different way of writing out the step scripts and updating time stamps when steps are executed. That inadvertently always wrote out the scripts for custom commands, even when the contents didn't change. This caused their timestamp to always be updated, resulting in those steps always being seen as out-of-date and needing to be re-executed. The way timestamps were checked to determine whether to re-execute a step also did not adequately account for file systems which only have second-resolution timestamps. The IS_NEWER_THAN if condition also returns true when timestamps are the same, so one needs to use the negative form to get a true "is newer than" test. ExternalProject is not susceptible to this problem because it uses file(GENERATE) to write out the script files and that only updates the file's timestamp if the contents change. It also mostly leaves timestamp checking to the build tool.
* | | | VS: Restore support for PCH in CXX but not C within once targetBrad King2021-02-195-0/+33
|/ / / | | | | | | | | | | | | | | | | | | | | | Fix logic from commit 9df1f33c9a (VisualStudio: move PCH rules to projects when possible., 2020-10-15, v3.20.0-rc1~638^2) to explicitly disable PCH on sources that should not use the target-wide PCH rules. Fixes: #21827
* | | FetchContent: Restore patch command supportCraig Scott2021-02-173-0/+25
| | | | | | | | | | | | | | | | | | The refactoring in 17e5516e60 (FetchContent: Invoke steps directly and avoid a separate sub-build, 2021-01-29) contained a typo which resulted in any PATCH_COMMAND being ignored. Fix the typo and add a test case that would have caught the regression.
* | | Merge topic 'findcudatoolkit_handle_cuda_compiler_without_enabled_lang'Brad King2021-02-105-0/+43
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | cd89d1c328 FindCUDAToolkit: Robust version checks when CUDA lang is not enabled Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Raul Tambre <raul@tambre.ee> Tested-by: Raul Tambre <raul@tambre.ee> Merge-request: !5787
| * | FindCUDAToolkit: Robust version checks when CUDA lang is not enabledRobert Maynard2021-02-095-0/+43
| | | | | | | | | | | | | | | | | | Previously if you set `CMAKE_CUDA_COMPILER` but hadn't enabled the CUDA language, FindCUDAToolkit would not correctly compute the version information.
* | | Merge topic 'xcode12-ios_install_combined'Brad King2021-02-093-4/+29
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 0110aa018d IOS_INSTALL_COMBINED: Support Xcode 12 (command line only) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5785
| * | IOS_INSTALL_COMBINED: Support Xcode 12 (command line only)Craig Scott2021-02-083-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xcode 12 doesn't allow nested builds within the same build directory. That means we can no longer do an install by building the install target when IOS_INSTALL_COMBINED is true. We can, however, still do an install by running the cmake_install.cmake script or executing cmake --install, since there is no outer build and therefore the associated SDK can be built as a sub-build. The non-build methods previously didn't work when IOS_INSTALL_COMBINED was true because the generated install script and the CMakeIOSInstallCombined script both made certain assumptions that relied on being part of a build. Those assumptions are now removed. A side-effect of this work is that cpack now also works from the command line when IOS_INSTALL_COMBINED is true. Relates: #21282 Fixes: #20023
| * | Apple: Fix linking to frameworks that do not exist until build timeBrad King2021-02-024-0/+31
| | | | | | | | | | | | Fixes: #21621
* | | Merge topic 'object-lib-multiarch'Brad King2021-02-0911-12/+56
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4d46b1401f add_library(): Allow imported object libraries with multi-arch 1a915e8953 Tests: TargetObjects does not need any languages enabled Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5771
| * | | add_library(): Allow imported object libraries with multi-archCraig Scott2021-02-069-7/+55
| | | | | | | | | | | | Fixes: #21276
| * | | Tests: TargetObjects does not need any languages enabledCraig Scott2021-02-052-5/+1
| | | |
* | | | Merge topic '21479-branding-name-cpack-nsis'Brad King2021-02-092-0/+10
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0aabeb0c30 CPack/NSIS: Add option for setting branding text Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5784
| * | | | CPack/NSIS: Add option for setting branding textJohnny Jazeix2021-02-072-0/+10
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | See https://nsis.sourceforge.io/Reference/BrandingText for more information. Fixes: #21479
* | | | Merge topic 'cmake_library_architecture_better_multiarch_support'Brad King2021-02-0824-1/+51
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | 657fc3a9a7 CMakeDetermineCompilerABI: Parse library arch from versioned paths Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5773
| * | | CMakeDetermineCompilerABI: Parse library arch from versioned pathsRobert Maynard2021-02-0424-1/+51
| |/ / | | | | | | | | | | | | | | | Teach CMake how to extract `CMAKE_<LANG>_LIBRARY_ARCHITECTURE` from versioned paths such as `/usr/lib/gcc/x86_64-linux-gnu/9`. These kind of paths are generated by NVHPC compilers.
* | | Merge topic 'fetchcontent-performance'Brad King2021-02-0515-68/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 17e5516e60 FetchContent: Invoke steps directly and avoid a separate sub-build 4f3d1abbb4 ExternalProject: Refactor pre-configure steps to support no-target uses 23aab9ecce ExternalProject: Avoid scanning docs for keywords, use include_guard() Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Robert Maynard <robertjmaynard@gmail.com> Acked-by: Michael Hirsch, Ph.D. <michael@scivision.dev> Acked-by: Lars Melchior <lars.melchior@gmail.com> Merge-request: !5749
| * | | FetchContent: Invoke steps directly and avoid a separate sub-buildCraig Scott2021-02-042-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cost of setting up and executing a separate sub-build to do the download, update and patch steps required for FetchContent population can be significant with some platforms and CMake generators. Avoid the sub-build altogether by invoking the step scripts directly. Previously, if no generator was set (e.g. population was being done in script mode), a generator needed to be available on the default PATH. Since we no longer use a sub-build, this restriction is also now gone. Fixes: #21703
| * | | ExternalProject: Refactor pre-configure steps to support no-target usesCraig Scott2021-02-046-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mkdir, download, update and patch steps are used by FetchContent during the configure phase of the main build. Because these steps need a target, this has so far required a sub-build to be set up. The changes here factor out the preparation of the scripts from the creation of the targets, allowing future work to leverage these steps without a sub-build (see #21703). As part of the refactoring, some rationalisation of the stamp files, repository info files and script names was done to make things more consistent between download methods and step implementations. Every download method now records its own specific repository info in a file and that file is a dependency of the download step. The source directory is also written to that file, so if the SOURCE_DIR changes, the download will be retriggered (the existing implementation fails in this scenario). Each download method now also has just one driver script that implements the whole step (it may pull in other scripts to do its task though). The patch step gained support for USES_TERMINAL as a result of generalising the implementation for custom commands. Fixes: #21748
| * | | ExternalProject: Avoid scanning docs for keywords, use include_guard()Craig Scott2021-01-297-43/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation was scanning the documentation in the file at runtime to determine the set of supported keywords for each public function. This was fragile, made it difficult to restructure the documentation and was sometimes observable in runtime performance measurements. Change to a more conventional approach where supported keywords are explicitly listed in the code. The internal _ExternalProject_SELF variable is no longer needed. CMake now provides CMAKE_CURRENT_FUNCTION_LIST_DIR which can be used for the same purpose and avoids having to set a variable when the module is read. This also removes the requirement that the module must be included by the current or a parent scope. It is now enough that the module has been included once somewhere before calling any of its functions. The above changes combined mean that the module can now use include_guard() and avoid having to re-parse the very long file every time.
* | | | Merge topic 'build-test-presets'Brad King2021-02-0581-30/+800
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9b5289ebd8 Help: Add release note for build and test presets c8a5cd6871 Tests: Update RunCMake/CMakePresets --list-presets 69a5cf23a2 Tests: Update RunCMake/CommandLine BuildDir b500935b94 Tests: Add test preset tests 74a86566f0 Tests: Add build preset tests 56751c83aa Tests: Factor out RunCMake.CMakePresets schema validation 676ecf0d37 cmake-presets: Add build and test presets 4f4f2028b8 Help: Add documentation for buildPresets and testPresets ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5681
| * | | | Tests: Update RunCMake/CMakePresets --list-presetsSam Freed2021-02-044-4/+4
| | | | |
| * | | | Tests: Update RunCMake/CommandLine BuildDirSam Freed2021-02-0411-11/+11
| | | | |
| * | | | Tests: Add test preset testsSam Freed2021-02-0436-0/+464
| | | | |
| * | | | Tests: Add build preset testsSam Freed2021-02-0429-0/+301
| | | | |
| * | | | Tests: Factor out RunCMake.CMakePresets schema validationSam Freed2021-02-042-15/+20
| | | | | | | | | | | | | | | | | | | | | | | | | Make it available to similar tests. Also fix whitespace in generated error message.
* | | | | Merge topic 'aix-xcoff-edit'Brad King2021-02-0414-19/+38
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e017ba046c AIX: Enable XCOFF editing to replace RPATH on installation 56fc4a325f cmXCOFF: Add helper to parse and edit the XCOFF binary format ddaaee907d CMakeDetermineCompilerId: Recognize XCOFF executable format 69e1d95a8a Tests: Add sample XCOFF binaries f79d991dfd Tests: Convert CMake.ELF to RunCMake.file-RPATH ELF case d8f3e68ca9 Ninja Multi-Config: Enable relink diagnostic message cdcfe3eb99 Rename CMAKE_USE_MACH_PARSER to CMake_USE_MACH_PARSER b6071c93f5 Rename CMAKE_USE_ELF_PARSER to CMake_USE_ELF_PARSER Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5769
| * | | | | AIX: Enable XCOFF editing to replace RPATH on installationBrad King2021-02-035-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | Avoid relinking before installation.
| * | | | | Tests: Add sample XCOFF binariesBrad King2021-02-032-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generate the binaries as follows: $ cat main.c int main(void) { return 0; } $ xlc -q64 -o xcoff64.bin -Wl,-blibpath:/sample/rpath:/usr/lib:/lib main.c $ strip -X 64 xcoff64.bin $ xlc -q32 -o xcoff32.bin -Wl,-blibpath:/sample/rpath:/usr/lib:/lib main.c $ strip -X 32 xcoff32.bin