summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Add case for ninja with non-ascii charsBrad King2022-10-264-0/+22
| | | | Issue: #24089
* Tests: Avoid running C++11 test on GNU < 4.7Brad King2022-10-241-4/+5
| | | | | | The test added in commit 50e90e2828 (try_compile: Honor CMP0128 setting in test project, 2022-10-18, v3.25.0-rc2~4^2) requires that the compiler support C++11 mode, so do not run it on GNU compilers that are too old.
* try_compile: Honor CMP0128 setting in test projectBrad King2022-10-185-0/+66
| | | | | | | | | Some projects pass a raw `-std=` flag to the compiler in the `try_compile` project. If they do not set CMP0128 to NEW, we should not append a `-std=` flag where we did not before the policy was added. Fixes: #24063
* cmStringAlgorithms: Add functions to parse strings to long long integersBrad King2022-09-201-0/+35
|
* cmake: In -P mode ignore extra paths on the command lineRobert Maynard2022-07-223-0/+13
| | | | Fixes: #23748
* cmGlobalGenerator: Only compute build files for all targetsKyle Edwards2022-07-132-0/+10
| | | | | | | | If we're creating generation objects for imported targets only, we don't need the export sets. Only compute build file generators if generating for all targets. Fixes: #23709
* Merge branch 'file-set-crash' into release-3.23Brad King2022-06-307-0/+28
|\ | | | | | | Merge-request: !7420
| * install(EXPORT): Check for missing file sets at generate timeKyle Edwards2022-06-297-0/+28
| | | | | | | | | | | | | | | | | | | | Missing file sets were originally checked at configure time in install(TARGETS ... EXPORT), but were not checked at generate time. If a file set was added after install(TARGETS ... EXPORT) was called, an abortion error was thrown. Check again at generate time to gracefully display an error message instead of crashing. Fixes: #23680
* | Merge branch 'xcode-14' into release-3.23Brad King2022-06-111-0/+2
|\ \ | |/ |/| | | Merge-request: !7350
| * Tests: Teach RunCMake to ignore Xcode DVTSDK warningsBrad King2022-06-101-0/+2
| | | | | | | | | | | | | | | | | | On some Xcode versions, `xcodebuild` may warn: ... xcodebuild[...] [MT] DVTSDK: Warning: SDK path collision for path ... Teach RunCMake to drop such incidental lines before matching against expected output.
| * Merge branch 'ci-xcode-13.3' into release-3.22Brad King2022-04-261-0/+1
| |\ | | | | | | | | | Merge-request: !7204
* | \ Merge topic 'ci-xcode-13.3' into release-3.23Brad King2022-04-261-0/+1
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | 65b6daf776 gitlab-ci: update macOS jobs to use Xcode 13.3 94361a1309 Tests: Ignore all classes in Xcode internal objc warnings da9f864513 Tests: Teach RunCMake to ignore Xcode extension point warnings Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7204
| * | 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.
* | | cmExportBuildFileGenerator: handle genex-wrapped source pathsBen Boeckel2022-04-181-11/+45
| | | | | | | | | | | | | | | | | | | | | Previously a fileset with `$<$<CONFIG:Debug>:some_file>` would show up as-is (with escaping) in the build directory export. Instead, evaluate all fileset entries as generator expressions and list them as they are similar to the installation information.
* | | cmInstallCommand: tweak error messageBen Boeckel2022-04-161-2/+2
| | | | | | | | | | | | | | | Not all filesets need to be installed; just those that are visible on the target's interface. Clarify the error message.
* | | FILE_SET: Make INTERFACE libraries with HEADER_SETS participate in buildsystemKyle Edwards2022-04-144-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | If an INTERFACE library has HEADER_SETS, and its header sets contain files generated by a custom command, the library needs to participate in the buildsystem so that the files will be generated. Fixes: #23422
* | | Merge topic 'file-set-repr-improvements' into release-3.23Brad King2022-04-1215-36/+20
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5fa15ec9f3 Help: Document that target_sources defines [INTERFACE_]HEADER_SETS c5d4812f20 cmTarget: make HEADER_SETS and INTERFACE_HEADER_SETS read-only 05783b168d cmFileSet: store visibility with the fileset Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7168
| * | | cmTarget: make HEADER_SETS and INTERFACE_HEADER_SETS read-onlyBen Boeckel2022-04-1115-36/+20
| | | | | | | | | | | | | | | | | | | | | | | | There is no reason to allow these properties to be manipulated by user code. Instead, use the stored visibility on the fileset objects to derive what these properties should contain.
* | | | Merge topic 'correct_list-presets_parsing' into release-3.23Brad King2022-04-122-1/+16
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 45299a8f9b cmake: --list=presets=[type] doesn't generate incorrect warnings Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7164
| * | | | cmake: --list=presets=[type] doesn't generate incorrect warningsRobert Maynard2022-04-112-1/+16
| | | | | | | | | | | | | | | | | | | | Fixes #23407
* | | | | Merge topic 'xcode-pch' into release-3.23Brad King2022-04-123-1/+19
|\ \ \ \ \ | |_|/ / / |/| | | / | | |_|/ | |/| | | | | | | | | | | | | | | | | | 476c6a8910 PCH: Fix Xcode non-pch language exclusion fcf1fcfd0c Tests: Ignore all classes in Xcode internal objc warnings Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7166
| * | | PCH: Fix Xcode non-pch language exclusionCristian Adam2022-04-112-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a regression caused by commit bbcdac4e5d (PCH: Fix all-language precompile header support in Xcode, 2021-08-07, v3.22.0-rc1~140^2). Fixes: #23138
| * | | Tests: Ignore all classes in Xcode internal objc warningsGregor Jasny2022-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | Xcode on Apple Silicon warns not only about AMSupportURL classes but also many more.
* | | | CheckSourceCompiles: Avoid linker warning with -fembed-bitcodeCraig Scott2022-04-092-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the Apple linker sees -headerpad_max_install_names and bitcode is enabled with a flag like -fembed-bitcode, it issues a warning and ignores the -headerpad_max_install_names flag. This causes unrelated compiler and linker flag checks to fail for valid flags. In f745e0497e (CheckCompilerFlags: Catch linker warning about ignored flags, 2022-01-03), we started detecting linker warnings, which caused a regression for projects that were setting -fembed-bitcode in their CMAKE_CXX_FLAGS or similar. Prevent that regression by removing the -headerpad_max_install_names linker flag when we know it will warn and be ignored anyway. Fixes: #23390 Issue: #23408
* | | | CheckCompilerFlag: Fix regression in locale environment preservationBrad King2022-04-072-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a typo from commit 660e0d80ae (internal/CheckCompilerFlag: rely on common configuration, 2022-01-12, v3.23.0-rc1~124^2~1) that caused locale environment variables to not be restored after they are set during the check.
* | | | FILE_SET: Forbid adding header sets to Apple FRAMEWORK librariesKyle Edwards2022-04-074-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The feature needs a specialized implementation to place headers in the right place inside frameworks. To avoid silently doing the wrong thing, make this case an error for the 3.23 series. Issue: #23386
* | | | Merge topic 'GNUInstallDirs-revert-multiarch-prefixes' into release-3.23Brad King2022-03-312-4/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 624ec3692f GNUInstallDirs: Revert "Apply Debian multiarch LIBDIR to more prefixes" Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7127
| * | | | GNUInstallDirs: Revert "Apply Debian multiarch LIBDIR to more prefixes"Brad King2022-03-302-4/+4
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit dd9584b352 (GNUInstallDirs: Apply Debian multiarch LIBDIR to more prefixes, 2021-11-19, v3.23.0-rc1~323^2). There are separate problems with activating multiarch `LIBDIR` for each prefix it added: * Prefix `/` is often used to stage an installation with `DESTDIR` for inclusion in a tarball package or similar. * Prefix `/usr/local` is the default `CMAKE_INSTALL_PREFIX`, causing the multiarch `LIBDIR` to be cached after the first configuration, even if the prefix changes later. Revert the change for now, except for the documentation update. Further discussion will be needed to select a way to enable multiarch `LIBDIR` for `/` and `/usr/local`. Fixes: #23365 Issue: #19698
* | | | CUDA: Ninja generator generates valid compile databaseRobert Maynard2022-03-301-0/+2
|/ / / | | | | | | | | | | | | | | | | | | The ninja generator has been updated to poperly write the compile database when the CUDA language has been enabled. Fixes #23368
* | | define_property(): Change constraints of INITIALIZE_FROM_VARIABLEKyle Edwards2022-03-2311-23/+23
| | | | | | | | | | | | | | | | | | | | | Remove the requirement that the variable name have a prefix while keeping the suffix requirement. Require that the property name contains an underscore. Update docs and tests accordingly. Fixes: #23340
* | | Revert INTERFACE_LINK_LIBRARIES_DIRECT feature for 3.23 branchBrad King2022-03-2163-773/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit f3ad061858 (Add usage requirements to update direct link dependencies, 2022-01-12, v3.23.0-rc1~44^2) and the property storage updates in its predecessor commit 193a999cd5 (cmTarget: Add INTERFACE_LINK_LIBRARIES_DIRECT{,_EXCLUDE} backtrace storage, 2022-01-06, v3.23.0-rc1~44^2~1) from the 3.23 release branch. After initial experience using the feature in practice, additional design considerations have been raised for discussion in the original issue. To avoid rushing this for the 3.23 series, we've decided to revert the feature for now so it can be revised for a future release. Issue: #22496
* | | Merge topic 'always_prefer_last_source_dir' into release-3.23Brad King2022-03-181-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | b44ad7992a cmake: Always prefer the last source directory provided Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7084
| * | | cmake: Always prefer the last source directory providedRobert Maynard2022-03-171-1/+1
| | | | | | | | | | | | | | | | Fixes: #23334
* | | | target_link_libraries: Restore LINK_ONLY for multiple static lib dependenciesBrad King2022-03-163-0/+28
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit c1e812ad4f (target_link_libraries: Improve tolerance of unquoted generator expressions, 2022-02-15, v3.23.0-rc2~11^2) we accumulate consecutive non-keyword arguments to recover an unquoted generator expression as a single entry. When given multiple consecutive non-genex library names, the grouping breaks our logic that expects each entry is either a raw target name or a genex. Revise the logic to only accumulate multiple arguments when they end inside a partial genex. This bug caused `target_link_libraries` to stop wrapping static library private dependencies in `$<LINK_ONLY:...>` for `INTERFACE_LINK_LIBRARIES` when multiple consecutive library names are given. Add a test case covering that behavior. Fixes: #23302
* | | Tests: Fix testing CMAKE_CUDA_ARCHITECTURES=OFF with ClangBrad King2022-03-102-0/+18
| | | | | | | | | | | | | | | | | | Clang does not automatically choose an architecture supported by the SDK. The `OFF` value is meant for users to provide their own architecture flags, so provide one as part of the test.
* | | CUDA: Restore support for CMAKE_CUDA_ARCHITECTURES=OFFRobert Maynard2022-03-093-0/+6
| | | | | | | | | | | | Fixes: #23309
* | | Tests: Disable CMAKE_SYSTEM_PROGRAM_PATH in IgnorePrefixPath testKyle Edwards2022-03-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Some systems set CMAKE_SYSTEM_PROGRAM_PATH, which pollutes the environment for this test. Erase it before executing the test to get a clean environment. Fixes: #23300
* | | Merge topic 'cmake-presets-file-dir' into release-3.23Brad King2022-03-087-1/+49
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f54507c2f6 CMakePresets.json: Add ${fileDir} macro Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Acked-by: Gerhard Olsson <gerhard.nospam@gmail.com> Merge-request: !7051
| * | | CMakePresets.json: Add ${fileDir} macroKyle Edwards2022-03-077-1/+49
| | | | | | | | | | | | | | | | Fixes: #23214
* | | | Tests: Make RunCMake.CMP0125 robust to external filesystem contentBrad King2022-03-074-56/+56
|/ / / | | | | | | | | | | | | | | | | | | | | | Revise the test from commit 08db1341a6 (find_*: ensure consistent behavior for cache variables, 2021-05-03, v3.21.0-rc1~177^2) to avoid searching outside the test directories. Fixes: #23299
* | | Merge topic 'file-set-name-requirements' into release-3.23Brad King2022-03-044-0/+12
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | b357d334fc target_sources(): Enforce stricter requirements for FILE_SET name Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7037
| * | | target_sources(): Enforce stricter requirements for FILE_SET nameKyle Edwards2022-03-034-0/+12
| | | | | | | | | | | | | | | | Fixes: #23286
* | | | Merge topic 'file-set-multiple-names' into release-3.23Brad King2022-03-041-5/+9
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8c23ecbd93 target_sources(): Process multiple FILE_SET arguments per block Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7040
| * | | | target_sources(): Process multiple FILE_SET arguments per blockKyle Edwards2022-03-031-5/+9
| |/ / / | | | | | | | | | | | | Fixes: #23287
* | | | Merge topic 'while-bug-compatibility' into release-3.23Brad King2022-03-046-24/+12
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | da2361ffb3 while: Restore tolerance of condition error 47d197745a Tests: Simplify RunCMake.{if,while} unbalanced parenthesis cases Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7041
| * | | while: Restore tolerance of condition errorAlex Turbov2022-03-034-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 880ca66b51 (Fix: `while()` can silently ignore incorrect condition, 2021-08-09, v3.22.0-rc1~238^2~4) we correctly reject the code set(paren "(") while(${paren}) endwhile() However, rejecting it breaks compatibility with projects that used such code accidentally. In CMake 3.21 and below, any error in the condition was ignored because the `false` result exited the loop first. Restore tolerance of the error for now. A policy will be needed to make it an error later. Note that the same condition with `if` was always correctly rejected. Fixes: #22524 Issue: #23296 Co-authored-by: Brad King <brad.king@kitware.com>
| * | | Tests: Simplify RunCMake.{if,while} unbalanced parenthesis casesBrad King2022-03-034-16/+11
| | | |
* | | | Merge topic 'cuda-arch-all' into release-3.23Brad King2022-03-035-0/+18
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dae3ad08fa Tests: Add cases for CMAKE_CUDA_ARCHITECTURES={all,all-major} 5c1f5357b0 VS: Fix CUDA compiler id with CMAKE_CUDA_ARCHITECTURES={all,all-major} Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7035
| * | | | Tests: Add cases for CMAKE_CUDA_ARCHITECTURES={all,all-major}Brad King2022-03-025-0/+18
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | The `CudaOnly.All` test only sets these in project code after CUDA is enabled. Add another case to test the values during compiler detection. Issue: #23161