summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* 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 'externalproject-update-refactor'Brad King2021-01-295-1/+96
|\ | | | | | | | | | | | | | | | | ac6a4d4884 ExternalProject: Improve robustness of update step 17c4c8b92b Tests: Prevent the noisy CMP0114 warnings in ExternalProjectUpdate test 1cb65e680d ExternalProject: Prevent the noisy detached head messages on checkout Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5389
| * ExternalProject: Improve robustness of update stepCraig Scott2021-01-284-1/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the update logic to make it easier to follow. The following fixes/improvements are some consequences of this change: * Absorb a confusing git checkout failure message when the failure is allowed and we act on that failure appropriately. * Fix an unnecessary fetch in some scenarios when checking out a git hash we already have locally. * Stash and restore any local changes even when not rebasing. * Avoid unsafe rebasing where we are not on a branch that is already tracking the requested branch. * When fetching, use --tags --force to ensure we get all the tags and commits leading up to them regardless of whether the tags are on branches or not. Also update our local tags if they move on the remote. Fixes: #20677
| * Tests: Prevent the noisy CMP0114 warnings in ExternalProjectUpdate testCraig Scott2021-01-281-0/+5
| |
* | Tests: Disable MFC test for IntelLLVM due to #18311William R. Dieter2021-01-281-1/+8
| | | | | | | | | | | | | | | | | | clang-cl cannot deal with implicit dependencies in UTF16 files (see #18311). IntelLLVM inherits this behavior from Clang. The MFC test uses `rc` in the way described in #18311 and gets the same error described in #18311. Disable the test until #18311 is fixed. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | Tests: Skip VSGNUFortran test for ifx.William R. Dieter2021-01-281-0/+4
| | | | | | | | DLLEXPORT is not implemented in ifx yet, and required by this test.
* | Tests: Skip per file PDBs in PDBDirectoryAndName for IntelLLVMWilliam R. Dieter2021-01-281-2/+3
| | | | | | | | | | | | The IntelLLVM C compiler do not yet support PDBs per file with the /Fd option. Disable the parts of PDBDirectoryAndName that tries to generate them so that the test will pass.
* | Tests: Update RunCMake.GenerateExportHeader for IntelLLVMBrad King2021-01-281-1/+1
| | | | | | | | On Windows, the expected results are like Clang's.
* | Tests: Skip old PrecompiledHeader test on IntelLLVMBrad King2021-01-281-1/+1
| | | | | | | | | | This test uses hard-coded flags for a fixed set of compilers. We have first-class PCH support implemented for IntelLLVM.
* | Tests: Update CompileFeatures test for IntelLLVMBrad King2021-01-281-2/+2
| | | | | | | | We do not have granular features for this compiler.
* | Tests: Update Module.WriteCompilerDetectionHeader for IntelLLVMBrad King2021-01-281-2/+2
| |
* | Tests: Update RunCMake.FileAPI for IntelLLVMBrad King2021-01-281-1/+1
| |
* | Tests: Update MSVCRuntimeLibrary.Fortran test for IntelLLVMWilliam R. Dieter2021-01-281-2/+3
| | | | | | | | | | | | `ifx` needs the same command line arguments as `ifort`. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | Tests: Update Preprocess test for IntelLLVMWilliam R. Dieter2021-01-281-1/+6
| | | | | | | | | | | | | | | | | | | | Work around an icx bug in command line handling of preprocessor macros. A `\\\"` string in a macro passed to icx on the command line is not properly parsed in compiler versions 2021.1.0 and earlier. This problem is expected to be fixed, though a target release has no been set yet. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | Tests: Update CPack DEBUGINFO tests for IntelLLVMWilliam R. Dieter2021-01-281-1/+1
| | | | | | | | | | | | | | By default icx and icpx do not add build IDs when linking, so enable the build ID to make the test pass. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | Tests: Update Assembler test for IntelLLVMBrad King2021-01-281-1/+1
| | | | | | | | Enable parts of the test the same way we do for `Intel`.
* | Tests: Update Fortran tests for IntelLLVMWilliam R. Dieter2021-01-282-3/+3
| | | | | | | | | | | | Update checks for the `Intel` compiler id to match `IntelLLVM` too. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | Tests: Cleanup CPack message when files are expected and none are foundWilliam R. Dieter2021-01-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Previously, when looking for exactly one file and the number of files was not one, the test printed out an error message saying that too many files were found, then printing the list of files. However, 0 is not 1 and also not too many files. To reduce confusion, this commit adds a different message when 0 files are found and 1 is expected. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | Tests: Update RunCMake.DependencyGraph to canonicalize paths when comparingWilliam R. Dieter2021-01-281-1/+2
| | | | | | | | | | | | | | A symbolic link in the path was causing false path mismatches. Resolving the symlinks makes both paths identical. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | Tests: Make GCOV test more robust to symbolic links in pathsWilliam R. Dieter2021-01-281-0/+19
| | | | | | | | | | | | | | | | Symbolic links in the path to the cmake build directory caused some paths to have '..' directories in the path, which are equivalent, but not a string match for the expected path. As a result, some tests fail. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | Tests: Fix Fortran test C function prototypesWilliam R. Dieter2021-01-281-2/+2
| | | | | | | | | | | | | | | | Several extern functions were declared without return type, which results in warnings. The functions are for calling Fortran subroutines, so there should not be a return value. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | Tests: Use the CVS :local: access method for local directoriesWilliam R. Dieter2021-01-282-17/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Windows absolute paths start with a drive letter, followed by the path. Without an explicit access method specification, CVS treats the drive letter as a host name. This changes explicitly adds `:local:` to local directory repository paths used in tests to avoid this confusion. See the CVS Manual [1] for more information. [1] https://www.gnu.org/software/trans-coord/manual/cvs/cvs.html#Repository Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | Tests: Fix CMP0115 warnings in CompileFeatures testBrad King2021-01-281-1/+4
|/ | | | Pass source file extensions explicitly.
* Tests: Update tests for NVHPC compilerTin Huynh2021-01-275-8/+8
| | | | Treat it just like PGI.
* Merge topic 'clang-tidy-fixes'Brad King2021-01-271-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | ef935b17ab clang-tidy: fix `readability-use-anyofallof` warnings 9ac8dbbb94 clang-tidy: fix `readability-simplify-boolean-expr` warnings ca505718f4 clang-tidy: fix `readability-redundant-string-init` warnings b3b6ede6a1 clang-tidy: fix `readability-redundant-access-specifiers` warnings cdfc4e3195 clang-tidy: fix `readability-qualified-auto` warnings 808b17b120 clang-tidy: fix `readability-make-member-function-const` warnings 4470eb5179 clang-tidy: fix `performance-trivially-destructible` warnings 4f396e6528 clang-tidy: fix `performance-no-automatic-move` warnings ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5731
| * clang-tidy: fix `readability-make-member-function-const` warningsBen Boeckel2021-01-271-1/+1
| |
* | Merge topic 'update-bison-parser'Brad King2021-01-276-8/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7c6192472b LexerParser: Suppress -Wused-but-marked-unused warning in cmExprParser 6f64300a01 LexerParser: Clean up includes following include-what-you-use 699d50e376 LexerParser: Regenerate parser files with GNU Bison 3.7.4 c95442b9b1 LexerParser: Manual removing code from Bison is no longer needed 5a8a61a798 LexerParser: Do not use GNU Bison's yacc mode, we use Bison extensions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5730
| * | LexerParser: Regenerate parser files with GNU Bison 3.7.4Christoph GrĂ¼ninger2021-01-256-8/+8
| | | | | | | | | | | | Adjust expected test output.
* | | Merge topic 'outdir-target-genex'Brad King2021-01-277-0/+81
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 64c3857780 OUTPUT_DIRECTORY: Support tgt genex in output artifact vars Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5690
| * | | OUTPUT_DIRECTORY: Support tgt genex in output artifact varsAsit Dhal2021-01-267-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following variables now support target dependent generator expressions. - CMAKE_RUNTIME_OUTPUT_DIRECTORY - CMAKE_LIBRARY_OUTPUT_DIRECTORY - CMAKE_ARCHIVE_OUTPUT_DIRECTORY Fixes: #18055
* | | | Merge topic 'cpack-compression-threads'Brad King2021-01-275-4/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bdf30bdad8 CPack: add CPACK_THREADS variable to control compression threads bcdb5b52a0 libarchive: Fix lzma_stream_encoder_mt detection Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5716
| * | | | CPack: add CPACK_THREADS variable to control compression threadsRodolfo Lima2021-01-265-4/+6
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | This allows setting how many threads the compressor will use. Currently only implemented for XZ when using system's lzma library. Fixes: #21715
* | | | Merge topic 'ExternalProject-vcs-tests'Brad King2021-01-275-7/+136
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | 195809914f Tests: Generate simpler ExternalProject sample Git repositories Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !5741
| * | | Tests: Generate simpler ExternalProject sample Git repositoriesBrad King2021-01-255-7/+136
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | The `gitrepo.tgz` repository contains a project that enables both C and CXX languages and builds source code. This take a long time to repeat over and over, particularly on Visual Studio and Xcode generators. Add and use a script to generate a new test repository that has a much simpler project. Issue: #20733
* | | Merge topic 'nmc-cache-targets'Brad King2021-01-264-0/+12
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | ccbedb80e4 Ninja Multi-Config: Restore rebuild_cache and edit_cache targets 6fdbe9201f cmNinjaUtilityTargetGenerator: Remove leftover development comment Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5740
| * | | 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
* | | Merge topic 'reproducible-unity-id'Brad King2021-01-263-1/+16
|\ \ \ | |/ / |/| | | | | | | | | | | | | | ee9da76972 Unity: Generate reproducible unity IDs for anonymous namespaces Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5727
| * | Unity: Generate reproducible unity IDs for anonymous namespacesCraig Scott2021-01-223-1/+16
| | | | | | | | | Fixes: #21564
* | | Merge topic 'cpack-deb-shlibdeps-private-search-dirs'Brad King2021-01-2511-3/+224
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | d586a4ad60 CPackDeb: dpkg-shlibdeps now supports searching for private shared libs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5718
| * | CPackDeb: dpkg-shlibdeps now supports searching for private shared libsDeniz Bahadir2021-01-2211-3/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | The new CPack variable `CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS` can be set to a list of directories. If `CPACK_DEBIAN_PACKAGE_SHLIBDEPS` or `CPACK_DEBIAN_<component>_PACKAGE_SHLIBDEPS` are set to `ON` these directories will be searched by `dpkg-shlibdeps` in order to find private shared library dependencies of the libraries/executables that shall be packed.
* | | UseSWIG: use swig tool to generate dependenciesMarc Chevrier2021-01-213-2/+26
| |/ |/| | | | | | | | | add_custom_command() supports option DEPFILE when generator is Makefiles or Ninja. And swig tool is able to generate a dependencies file which is compatible with DEPFILE option.
* | Merge topic 'FindGit-cache-version'Brad King2021-01-213-25/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | 76fdeb6d13 Tests: FindGit already provides the git version, re-use it 315a200f0c FindGit: Cache the GIT_EXECUTABLE version for the current run Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5712
| * | Tests: FindGit already provides the git version, re-use itCraig Scott2021-01-193-25/+7
| | |
* | | Merge topic 'macos-include-weak-dependencies'Brad King2021-01-212-2/+35
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7e615a540e file(GET_RUNTIME_DEPENDENCIES): Fix weak macOS libraries not detected f2d92b983b GetPrerequisites: Include weak macOS dependencies Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5703
| * | | file(GET_RUNTIME_DEPENDENCIES): Fix weak macOS libraries not detectedBianca van Schaik2021-01-202-2/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with Clang 12, `otool -l` reports `LC_LOAD_WEAK_DYLIB` instead of `LC_LOAD_DYLIB` for weakly linked libraries. Update the implementation of `file(GET_RUNTIME_DEPENDENCIES)` to recognize these. Fixes: #21684
* | | | Merge topic 'ninja-custom_command-depfile'Brad King2021-01-2011-24/+27
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b5c2163293 Ninja: add_custom_command(DEPFILE): Ensure dependencies consistency Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5710
| * | | | Ninja: add_custom_command(DEPFILE): Ensure dependencies consistencyMarc Chevrier2021-01-1911-24/+27
| | |/ / | |/| | | | | | | | | | Fixes: #21694
* | | | Utilities/Sphinx: Add role and directive for 'genex' in CMake domainBrad King2021-01-182-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables cross-reference syntax for CMake generator expressions: :genex:`SOME_GENEX` :genex:`$<SOME_GENEX>` :genex:`$<SOME_GENEX:...>` and definition of CMake generator expressions via a directive: .. genex:: SOME_GENEX .. genex:: $<SOME_GENEX> .. genex:: $<SOME_GENEX:...> It also adds generator expressions defined by the directive and by `Help/genex/SOME_GENEX.rst` documents to the index.
* | | | cmRST: Add support for 'envvar' directiveBrad King2021-01-182-0/+16
| |_|/ |/| | | | | | | | | | | | | | This was accidentally left out of commit 8acf46caf1 (Utilities/Sphinx: Add role and directive for 'envvar' in CMake domain, 2018-04-19, v3.12.0-rc1~200^2~1).