summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Ignore all classes in Xcode internal objc warningsGregor Jasny2022-04-251-1/+1
| | | | | Xcode on Apple Silicon warns not only about AMSupportURL classes but also many more.
* Tests: Teach RunCMake to ignore Xcode extension point warningsBrad King2022-04-251-0/+1
| | | | | | | | | | On some Xcode versions, `xcodebuild` may warn: ... xcodebuild[...] Requested but did not find extension point with identifier ... Teach RunCMake to drop such incidental lines before matching against expected output.
* VS: Remove the '/guard:cf' flag from v143 link flag tableBenjamin Sluis2022-01-123-0/+48
| | | | | | | | | | | | Apply the change from commit db35e3cfd6 (VS: Fix support for '/guard:cf' linker flag for v142, 2019-01-24, v3.14.0-rc1~74^2~2) to the v143 flag table. The entry for `LinkControlFlowGuard` in `v143_Link.json` does not work when used in a `.vcxproj` file. Drop our link flag table entries for this toolset so that the flag will be passed via `AdditionalOptions`. Also add a test case.
* UseSWIG: ensure directory for depfile existsMarc Chevrier2021-11-191-0/+1
| | | | | | | When `Visual Studio` and `Xcode` generators are used, directory for depfile is not implicitely created by CMake when OUTFILE_DIR option is used. Fixes: #22932
* Merge topic 'revert-debian-libexec' into release-3.21Brad King2021-10-081-2/+2
|\ | | | | | | | | | | | | 6658e260d4 GNUInstallDirs: Fix misinterpretation of Debian Policy on LIBEXECDIR Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6607
| * GNUInstallDirs: Fix misinterpretation of Debian Policy on LIBEXECDIRTimo Röhling2021-10-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Revert commit 798c1c3192 (GNUInstallDirs: Comply with Debian Policy on LIBEXECDIR, 2020-10-08, v3.19.0-rc1~11^2). The Debian Policy builds upon FHS 3.0 and permits installing to `/usr/libexec`. While Policy does grant an additional exception for applications to use a single subdirectory of `/usr/lib/<triplet>`, this is not meant to replace `/usr/libexec` as valid target. Fixes: #22731
* | Tests: Fix RunCMake.XcodeProject XcodeIOSInstallCombined cases for Xcode 13.0Brad King2021-10-052-4/+4
| | | | | | | | | | The output of `otool -vf` now contains additional content that happens to be matched by our architectures regex. Make the regex more strict.
* | Tests: Specify destination for Xcode schemeGregor Jasny2021-10-051-1/+6
| | | | | | | | | | | | | | The `Using the first of multiple matching destinations` warning vanishes if we explicitly specify a destination. Fixes: #22704
* | Tests/RunCMake/Autogen: test CMP0111 behaviorBen Boeckel2021-09-245-0/+75
| | | | | | | | | | | | | | On Windows, imported shared libraries which only have an `IMPORTED_IMPLIB` set fail if they are depended upon by a target using automoc. Add a test for the behavior of depending upon all imported target types from an automoc-using target.
* | HIP: Remove ROMClang compiler id and use Clang directlyBrad King2021-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit bd844387df (ROCMClang: Add the ROCm toolkit derived clang compiler to CMake, 2020-08-28, v3.21.0-rc1~66^2~6) and commit ff0d2858e1 (HIP: Extract clang compiler details from hipcc, 2020-10-21, v3.21.0-rc1~66^2~5), the separate `ROCMClang` compiler id for `hipcc` has caused a few problems: * The compiler id changed from behavior of CMake 3.20 and below, breaking projects that already built with `hipcc` treated as `Clang`. * The implementation of `target_compile_features` was incomplete for the `ROCMClang` identity. * Only `hipcc` was identified as `ROCMClang`, so after it is unwrapped to the underlying `clang++`, future runs of new CMake versions on an existing build tree would not repeat this. * Clang should be usable as a HIP compiler without the `hipcc` wrapper. Remove the `ROMClang` compiler identity, and revise HIP language support to work directly with a Clang compiler. Reject direct `hipcc` usage as a HIP compiler. For now it cannot be supported because it interferes with flags CMake needs to pass to Clang. Fixes: #22536, #22460, #22593
* | VS: Fix managed C++ project generation for VS 2022Brad King2021-09-151-0/+6
| | | | | | | | | | | | | | VS 2022 expects managed `.vcxproj` files to have a `ManagedAssembly` element. Fixes: #22583
* | AUTOUIC: Revert "Fix generating of dependency rules for UI header files"Brad King2021-08-195-23/+1
| | | | | | | | | | | | | | | | | | | | Revert commit e5ec0e52f4 (AUTOUIC: Fix generating of dependency rules for UI header files, 2021-07-22, v3.21.1~8^2) because it caused regressions. For example, changing one C++ source can now cause many others to rebuild. Revert the change pending further investigation. Fixes: #22531 Issue: #16776
* | FindPkgConfig: Restore legacy behavior when CMP0126 is set to NEWMarc Chevrier2021-08-182-0/+65
| | | | | | | | | | | | Module behavior must be independent from `CMP0126` policy. Fixes: #22526
* | Merge topic 'ninja-lwyu-ar' into release-3.21Brad King2021-08-064-0/+10
|\ \ | | | | | | | | | | | | | | | | | | 93eb4a7bd1 Ninja: Revert accidental LINK_WHAT_YOU_USE impl for static libraries Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6418
| * | Ninja: Revert accidental LINK_WHAT_YOU_USE impl for static librariesĐoàn Trần Công Danh2021-08-034-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit d7159f9591, (Ninja: Fix LINK_WHAT_YOU_USE link flag placement, 2021-06-24), we fixed usage of -Wl,--no-as-needed to override -Wl,--as-needed from LDFLAGS. However, that change also passes -Wl,--no-as-needed to `ar`, which is incorrect flag for `ar`. Let's check the target type before passing down the flags. Fixes: #22487
* | | Merge topic 'CC-DEPFILE-independent-from-CMAKE_DEPENDS_USE_COMPILER' into ↵Brad King2021-08-032-0/+13
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | release-3.21 213fec4908 add_custom_command(DEPFILE) independent from CMAKE_DEPENDS_USE_COMPILER Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6421
| * | | add_custom_command(DEPFILE) independent from CMAKE_DEPENDS_USE_COMPILERMarc Chevrier2021-08-012-0/+13
| | | | | | | | | | | | | | | | Fixes: #22486
* | | | Merge topic 'vs-iface-include-dirs' into release-3.21Brad King2021-08-022-0/+8
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 53aabe9817 VS: Fix assertion failure on INCLUDE_DIRECTORIES in INTERFACE libraries Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6411
| * | | | VS: Fix assertion failure on INCLUDE_DIRECTORIES in INTERFACE librariesBrad King2021-07-292-0/+8
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 4391913133 (Add INTERFACE libraries to generated buildsystem if they have SOURCES, 2020-07-20, v3.19.0-rc1~346^2~1), the VS generator may process INTERFACE libraries. Avoid code paths in the generator that process include directories because they should not be used by INTERFACE libraries since they do not compile anything. Fixes: #22494
* | | | Merge topic 'autogen-ui-header-depends' into release-3.21Brad King2021-08-024-2/+33
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | 283e8d8d04 AUTOUIC: Add test for cyclic dependency between UI headers and timestamp Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: alcroito <alexandru.croitor@qt.io> Merge-request: !6404
| * | | AUTOUIC: Add test for cyclic dependency between UI headers and timestampAlexey Edelev2021-07-284-2/+33
| | | | | | | | | | | | | | | | Follow up test for the commit 9cebdbec.
* | | | Merge topic 'cuda_separable_clang_make' into release-3.21Brad King2021-07-294-21/+22
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3975678fcc CUDA/Clang: Simplify --register-link-binaries logic 0b1cea66cd CUDA/Clang: Fix separable compilation in non-root directories with Makefiles Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6400
| * | | | CUDA/Clang: Fix separable compilation in non-root directories with Makefilesroot2021-07-294-21/+22
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Seems the relative paths were wrong basically all around such that only compiling files in the top-level directory would work. I've modified CudaOnly.SeparateCompilation to cover this. Fixes #22482.
* | | | Merge topic 'ctest-test-changing-labels' into release-3.21Brad King2021-07-292-1/+19
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | 26170ea306 CTest: Reset multi-options to persistent multi-options Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6403
| * | | CTest: Reset multi-options to persistent multi-optionsKyle Edwards2021-07-282-1/+19
| |/ / | | | | | | | | | | | | | | | | | | | | | 44ad3f0b added multi-options to CTest, but didn't reset them, causing ctest_test() to fail if it was run multiple times with different label arguments. Reset the multi-options. Fixes: #22485
* | | CMakePresets: Check presets with their own file versionKyle Edwards2021-07-274-0/+20
|/ / | | | | | | | | | | | | | | | | 06e6981 added support for optional binaryDir and generator, but use the dependent preset's file version instead of the current preset's file version. Check presets with their own file version instead of their dependent's file version. Fixes: #22428
* | Merge topic 'FindXCTest-xcode-12.5' into release-3.21Brad King2021-07-273-5/+33
|\ \ | | | | | | | | | | | | | | | | | | 0b5301a778 FindXCTest: Fix output directory for test bundle with Xcode 12.5 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6379
| * | FindXCTest: Fix output directory for test bundle with Xcode 12.5Yauheni Khnykin2021-07-263-5/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | The fix from commit eafe740ead (FindXCTest: Fix output directory for test bundle with new build system, 2021-02-09, v3.19.5~5^2) is not necessary with Xcode 12.5, which seems to have changed/fixed the behaviour again. Fixes: #22462
* | | Tests/CompileOptions: allow CMAKE_BUILD_TYPE=NoneĐoàn Trần Công Danh2021-07-261-0/+4
|/ / | | | | | | | | | | | | | | | | In the same spirit of commit ce1cadd35a, (Tests/ConfigSources: fix for non main stream CMAKE_BUILD_TYPE, 2021-04-01). Allow distributions' check to pass seemlessly. Issue: #22470
* | Merge topic 'ninja-multi-test-fix' into release-3.21Brad King2021-07-2618-6/+127
|\ \ | | | | | | | | | | | | | | | | | | 08131e83bc Tests: Clean up Ninja Multi-Config test from cb777dd Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6383
| * | Tests: Clean up Ninja Multi-Config test from cb777ddKyle Edwards2021-07-2318-6/+127
| | |
* | | Merge topic 'autouic-header-depends' into release-3.21Brad King2021-07-265-2/+25
|\ \ \ | |/ / |/| | | | | | | | | | | | | | e5ec0e52f4 AUTOUIC: Fix generating of dependency rules for UI header files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6380
| * | AUTOUIC: Fix generating of dependency rules for UI header filesAlexey Edelev2021-07-235-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We could not rely on .ui files when generating the ninja rules for the generated UI header files. .ui files might be added to the target sources but never processed by AUTOUIC afterward, since UI header files are never included in a source code. Instead of adding dependency rules based on the .ui files, this approach scans non-generated source files for includes of the UI header files, as AUTOUIC does. This gives the consistent set of UI header files at configure time, that could be used to generate byproducts rules for the AUTOUIC. Also, the path to the generated UI header file depends not on the .ui file location but on the include line is used in source files. Fixes: #16776
* | | Merge topic 'nmc-target-objects' into release-3.21Brad King2021-07-237-17/+49
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | cb777dd81e Ninja Multi-Config: Restore TARGET_OBJECTS support in cross-configs 83c8272280 cmGeneratorExpressionNode: Factor out local variable for global generator Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6371
| * | | Ninja Multi-Config: Restore TARGET_OBJECTS support in cross-configsBrad King2021-07-217-17/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Swift: Update test case to try CMP0126 NEW behaviorBrad King2021-07-211-0/+3
| |/ / |/| | | | | | | | | | | | | | | | | | | | Extend the `SwiftOnly` test to cover the fix in commit 3ddd7f3576 (enable_language: Fix test for working compiler with CMP0126 NEW behavior, 2021-07-15), as that commit did for the `CSharpOnly` test. Fixes: #22451
* | | Merge topic 'message-color' into release-3.21Brad King2021-07-214-0/+15
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | c7a8c9c811 cmMessenger: Revert to non-color messages on Windows Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6369
| * | | cmMessenger: Revert to non-color messages on WindowsBrad King2021-07-204-0/+15
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 0a0a0f8a74 (cmMessenger: Color messages to terminal by type, 2021-05-18, v3.21.0-rc1~146^2) the message output no longer goes through our custom streambuf on Windows that converts output encoding. This can cause messages to be printed with the wrong encoding in a Windows Console. It also causes messages to have a mix of LF and CRLF newlines because `stderr` converts LF to CRLF but our custom streambuf does not. Revert to using just `cerr` for messages on Windows. Another approach will be needed to achieve color output on Windows later. Fixes: #22444
* | | Merge topic 'CMakeDependentOption-revert-parens' into release-3.21Brad King2021-07-214-8/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | d777ca12f6 CMakeDependentOption: Revert "Allow parentheses in the depends string" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6368
| * | | CMakeDependentOption: Revert "Allow parentheses in the depends string"Brad King2021-07-204-8/+6
| |/ / | | | | | | | | | | | | | | | | | | | | | Revert commit 0665d9092e (CMakeDependentOption: Allow parentheses in the depends string, 2021-06-13, v3.21.0-rc1~32^2). It broke existing use cases with parentheses in regular expressions. Also add a test for this. Fixes: #22447
* | | try_compile: Propagate CMP0126 to the generated test projectBrad King2021-07-2011-0/+22
|/ / | | | | | | | | Set policy CMP0126 to the value used in the calling project. It may affect toolchain file behavior.
* | Merge topic 'cmake-presets-no-binary-dir-no-s' into release-3.21Brad King2021-07-193-0/+18
|\ \ | | | | | | | | | | | | | | | | | | aa874dc609 CMakePresets.json: Fix expansion issue with empty binaryDir Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6358
| * | CMakePresets.json: Fix expansion issue with empty binaryDirKyle Edwards2021-07-163-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | When resolving binaryDir into a full path from a relative path, we forgot to check if binaryDir is altogether empty, causing empty binaryDir's to resolve to the source directory. Fix this. Fixes: #22434
* | | enable_language: Fix test for working compiler with CMP0126 NEW behaviorBrad King2021-07-151-0/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | Update the logic that converts a `try_compile` result from a cache entry to a normal variable to tolerate an existing normal variable under CMP0126 NEW behavior. Otherwise the `try_compile` result is ignored because CMake uses the false value of the normal variable, and CMake incorrectly reports that the compiler does not work. This went unnoticed for some languages (e.g. C and CXX) because the check for a working compiler is skipped if ABI detection works. It does affect other languages (e.g. CSharp). Fixes: #22423
* | Help: Clarify 'cmake --build' signature alternativesBrad King2021-07-1314-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Documentation added by * commit 4f4f2028b8 (Help: Add documentation for buildPresets and testPresets, 2021-01-13, v3.20.0-rc1~51^2~7) * commit 676ecf0d37 (cmake-presets: Add build and test presets, 2020-12-14, v3.20.0-rc1~51^2~6) used square brackets in the `cmake --build` signature to indicate non-optional alternatives, which is not a typical convention. A common convention is to use parentheses instead, but in this case it is probably clearer to list the two signatures separately. Fixes: #22413
* | Merge topic 'file-grd-arch' into release-3.21Brad King2021-07-131-4/+1
|\ \ | | | | | | | | | | | | | | | | | | b2c03347b0 file(GET_RUNTIME_DEPENDENCIES): Check architecture of dependencies Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6339
| * | file(GET_RUNTIME_DEPENDENCIES): Check architecture of dependenciesKyle Edwards2021-07-121-4/+1
| | | | | | | | | | | | Fixes: #22106
* | | ci: Verify that Intel MKL is found when it is the only BLAS/LAPACKBrad King2021-07-124-6/+28
|/ / | | | | | | Issue: #22403
* | Tests: Fix RunCMake.try_compile C/CXX standards with IntelLLVM MSVC modeBrad King2021-07-091-0/+11
| | | | | | | | | | | | | | | | Since commit 84036d30d4 (IntelLLVM: Fix C/C++ standard level flags on Windows, 2021-07-07, v3.21.0-rc3~8^2~1) we activate C/C++ standard level logic for IntelLLVM when targeting the MSVC ABI. Update the `RunCMake.try_compile` test to be aware of this even when CMake is itself configured by an older CMake that does not know this.
* | Merge topic 'check_cxx_compiler_flag_no_normal_variable' into release-3.21Brad King2021-07-081-0/+10
|\ \ | | | | | | | | | | | | | | | | | | 018d300ca0 Check*CompilerFlag: Do not set result as a normal variable too Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6318