summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Linking: Preserve nested LINKER: prefixes as writtenGergely Meszaros2024-09-237-4/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously LINKER:,-Xlinker and -Wl, options nested inside LINKER: prefixes would be transformed to separate prefixed options. This is confusing and undocumented behavior, instead preserve these as written. Fixes: #26298
| * | | Tests/LINK_OPTIONS: extract common code in test (NFC)Gergely Meszaros2024-09-181-16/+14
| | | |
* | | | Merge topic 'curl-tls-verify'Brad King2024-09-242-3/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4e62bc943c ctest: Verify TLS server certificate by default 8e92ee34f6 file(DOWNLOAD/UPLOAD): Verify TLS server certificate by default dcaea54898 cmCTestCurl: Clarify names and logic using optional<bool> 03d37ae3ff cmFileCommand: Clarify names and logic using optional<bool> Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9843
| * | | | file(DOWNLOAD/UPLOAD): Verify TLS server certificate by defaultBrad King2024-09-242-3/+3
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the connection fails in a way that might be a certificate error, and verification was enabled by the new default, mention environment variable `CMAKE_TLS_VERIFY` in the diagnostic to help users that were relying on the old behavior turn off server certificate verification in their environment. Fixes: #23608
* | | | Merge topic 'cuda-host-compiler-id'Brad King2024-09-2321-5/+122
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3b4d0df670 NVCC: Detect host compiler id and version 38cacd83a5 Tests: Migrate compiler id tests to RunCMake infrastructure 37173f1ccc Tests/RunCMake: Generalize construction of arguments for languages to test Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9841
| * | | | NVCC: Detect host compiler id and versionBrad King2024-09-204-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Report them in `CMAKE_<LANG>_HOST_COMPILER_{ID,VERSION}` variables. Fixes: #20901
| * | | | Tests: Migrate compiler id tests to RunCMake infrastructureBrad King2024-09-2021-0/+97
| | | | |
| * | | | Tests/RunCMake: Generalize construction of arguments for languages to testBrad King2024-09-201-5/+5
| |/ / /
* | | | Merge branch 'backport-project-vars' into project-varsBrad King2024-09-205-0/+40
|\ \ \ \ | |/ / / |/| | / | | |/ | |/|
| * | project: Only define non-cache vars if already definedCraig Scott2024-09-205-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In c1ece78d11 (project: non cache <project> prefix variables are also created, 2024-08-27), we started explicitly setting the non-cache variable for <projectName>_SOURCE_DIR, <projectName>_BINARY_DIR, and <projectName>_IS_TOP_LEVEL in addition to setting them as cache variables. This changed the behavior when a project name was used more than once, and the second project call happens in the same scope or a child scope of the first. Previously, the first project call would set cache variables, and the second project call would not overwrite those cache variables. With the change in c1ece78d11, after the second project call the non-cache variables would mask the cache variables and the project code would see a different value to what it did before. Setting the non-cache variable was added to handle the case where a call to FetchContent_MakeAvailable() would set some non-cache variables, and it just so happened those matched the same cache variables that the project() command would set in the project being fetched. The fetched project would then see a different set of project-specific variables compared to when it was built standalone. This commit here narrows the change from c1ece78d11 such that the non-cache variable is only set by project() if there was already a non-cache variable set. This still fixes the motivating problem c1ece78d11 was intended to solve, but it avoids changing the variable values seen by a project that re-uses the same project name in related scopes. Issue: #26243, #25714 Fixes: #26281
* | | Merge topic 'normalize-install-destination-paths'Brad King2024-09-2016-10/+147
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6a1fac1450 install: Normalize DESTINATION paths 2184fcfb00 Tests: Configure RunCMake.install cases with correct build type 5a8a6dfe81 cmGeneratorExpression: Change Find() parameter type to cm::string_view d810374b3d install(PACKAGE_INFO): Remove outdated TODO comment d13ed01d54 Tests: Remove unused files from RunCMake.install Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9800
| * | | install: Normalize DESTINATION pathsCraig Scott2024-09-1914-0/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file generated by install(EXPORT) computes _IMPORT_PREFIX in a way that assumes a normalized path. If the DESTINATION contains any ../ components, the computed _IMPORT_PREFIX would be wrong. Force the DESTINATION path to be normalized, subject to the new CMP0176 policy. Also normalize all other DESTINATION paths for consistency, except for INCLUDES DESTINATION, which is not strictly a destination but rather a search path to add. Fixes: #26252
| * | | Tests: Configure RunCMake.install cases with correct build typeCraig Scott2024-09-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The run_install_test() function would build and install with the configuration hard-coded to Debug, but the configuration step did not specify any configuration. This resulted in a "no config" configuration, and the install step then wouldn't install the Debug export files. This would only be a problem if using a single config CMake generator, and it appears none of the existing tests relied on actually installing the config-specific export file.
| * | | Tests: Remove unused files from RunCMake.installCraig Scott2024-09-172-10/+0
| | | |
* | | | Merge topic 'install-type-libexec'Brad King2024-09-194-0/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 39603a7e5c install: Add TYPE LIBEXEC for FILES and DIRECTORY Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9817
| * | | | install: Add TYPE LIBEXEC for FILES and DIRECTORYChen Linxuan2024-09-184-0/+7
| |/ / / | | | | | | | | | | | | Signed-off-by: Chen Linxuan <me@black-desk.cn>
* | | | VS: Fix custom commands for DOTNET_SDK buildsCalum Robinson2024-09-185-11/+4
| | | | | | | | | | | | | | | | Fixes: #23723
* | | | Merge topic 'execute_process-encoding'Brad King2024-09-183-0/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 20f059d025 execute_process: Warn on unknown ENCODING value Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9825
| * | | | execute_process: Warn on unknown ENCODING valueBrad King2024-09-173-0/+7
| |/ / /
* | | | Merge topic 'vs-always-restore-net-sdk'Brad King2024-09-183-2/+10
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3283ef47d1 VS: Fix DOTNET_SDK builds when no VS_PACKAGE_REFERENCES set Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9807
| * | | | VS: Fix DOTNET_SDK builds when no VS_PACKAGE_REFERENCES setCalum Robinson2024-09-163-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nuget restore always needs to be run for the new DOTNET_SDK style projects, even when VS_PACKAGE_REFERENCES is empty. Fixes: #23405
* | | | | Merge topic 'autogen-exe-per-config'Brad King2024-09-181-7/+16
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 32c8cb2960 Autogen: Avoid running multiple cmake_autogen command in Xcode Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9810
| * | | | | Autogen: Avoid running multiple cmake_autogen command in XcodeOrkun Tokdemir2024-09-151-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 7c39dabdbc (Autogen: AUTO*_EXECUTABLE: add support for per-config values, 2023-10-18, v3.29.0-rc1~105^2~1) we were accidentally running cmake_autogen multiple times for each config. Fixes: #26282
* | | | | | Merge topic 'link_deduplication_imported_targets'Brad King2024-09-186-1/+63
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 502610733f Ensure imported targets in sibling dirs are deduplicated Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9821
| * | | | | Ensure imported targets in sibling dirs are deduplicatedMarc Chevrier2024-09-156-1/+63
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: #26284
* | | | | | execute_process: Change default ENCODING to UTF-8Brad King2024-09-168-2/+21
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows is heading toward making UTF-8 the preferred MBCS. As CMake's internal encoding, `UTF-8` is effectively equivalent to `NONE`, which was CMake's behavior prior to 3.15's accidental change to `AUTO`. Behavior of `ENCODING UTF-8` is independent of CMake's internal encoding, making it in principle a better default than `NONE`. Add policy CMP0176 for compatibility and to document the default's history. Fixes: #26262
* | | | | Merge topic 'execute_process-encoding'Brad King2024-09-1612-9/+53
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3898e53e82 execute_process: Document and test ENCODING default d67519fce8 Help/command/execute_process: Improve formatting of ENCODING names e1fc4b9b17 Tests/RunCMake/execute_process: Add test for ENCODING AUTO 56ae758bc5 Tests/RunCMake/execute_process: Improve test for ENCODING UTF-8 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9816
| * | | | | execute_process: Document and test ENCODING defaultBrad King2024-09-133-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default was originally AUTO in commit 2ed473b3b8 (execute_process: Add ENCODING option for Windows child process output, 2016-11-23, v3.8.0-rc1~232^2) but was changed back to NONE by commit 07c3380a6e (execute_process: Restore no-decoding default behavior, 2017-02-13, v3.8.0-rc2~26^2) for CMake 3.8. Later it was accidentally changed back to AUTO by commit b783e62533 (cmExecuteProcessCommand: Port to cmArgumentParser, 2019-03-25, v3.15.0-rc1~270^2) in CMake 3.15 but the documentation was not updated. Document the current default, AUTO, and add a test case to verify it. Issue: #26262
| * | | | | Tests/RunCMake/execute_process: Add test for ENCODING AUTOBrad King2024-09-136-5/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows the AUTO encoding is based on the console code page, so run the test in an isolated console window.
| * | | | | Tests/RunCMake/execute_process: Improve test for ENCODING UTF-8Brad King2024-09-126-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | Generalize the test infrastructure. Add Chinese text to the sample.
* | | | | | Merge topic 'ninja-depfile-quoting'Brad King2024-09-1621-94/+171
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b11323f1e4 Ninja: Fix depfile binding with spaces in path ad66be9943 cmNinjaTargetGenerator: Factor out helper to add depfile bindings 269c3a13c8 cmNinjaTargetGenerator: Reduce DEP_FILE binding duplication 48ced5fb12 Tests/RunCMake/BuildDepends: Enable more depfile cases with Ninja b751a857cc Tests/RunCMake/BuildDepends: Simplify CustomCommandDepends case 006891dab9 Tests/RunCMake/BuildDepends: Prepare CompileDepends check for multiple targets 0915320ddf Tests/RunCMake/BuildDepends: Simplify CompileDepends case 24fbfa915c Tests/RunCMake/BuildDepends: Simplify LinkDepends case Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9812
| * | | | | Ninja: Fix depfile binding with spaces in pathBrad King2024-09-136-3/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In build statements we use a single `DEP_FILE = ...` binding that is shared between `depfile = $DEP_FILE` and `command = ... $DEP_FILE ...` bindings in the corresponding rule. In cases that the command's shell argument needs quoting, add a separate `depfile = ...` binding to the build statement to express the depfile path without quoting. Otherwise `ninja` tries to open a file path that contains literal quotes. Fixes: #26287
| * | | | | Tests/RunCMake/BuildDepends: Enable more depfile cases with NinjaBrad King2024-09-123-3/+29
| | | | | |
| * | | | | Tests/RunCMake/BuildDepends: Simplify CustomCommandDepends caseBrad King2024-09-128-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Also rename from "CustomCommandDependencies".
| * | | | | Tests/RunCMake/BuildDepends: Prepare CompileDepends check for multiple targetsBrad King2024-09-121-21/+23
| | | | | |
| * | | | | Tests/RunCMake/BuildDepends: Simplify CompileDepends caseBrad King2024-09-127-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | Also rename from "CompilerDependencies".
| * | | | | Tests/RunCMake/BuildDepends: Simplify LinkDepends caseBrad King2024-09-124-28/+13
| |/ / / /
* | | | | Merge topic 'file-REAL_PATH-warn-non-existing'Brad King2024-09-134-0/+15
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | 00c1161b01 file(REAL_PATH): Warn on non-existing paths Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9806
| * | | | file(REAL_PATH): Warn on non-existing pathsAlex Overchenko2024-09-124-0/+15
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | The command is documented to work only for cases that the referenced path exists. Fixes: #26260
* | | | Merge topic 'vs-output-name-net-sdk'Brad King2024-09-123-0/+32
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 66bd326e28 VS: Use OUTPUT_NAME in DOTNET_SDK projects Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9808
| * | | | VS: Use OUTPUT_NAME in DOTNET_SDK projectsCalum Robinson2024-09-113-0/+32
| |/ / / | | | | | | | | | | | | Fixes: #26285
* | | | Merge topic 'file-archive-workdir'Brad King2024-09-123-3/+18
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | d8a9aabd24 file(ARCHIVE_CREATE): add WORKING_DIRECTORY option d65b5a8e03 Help: Format file(ARCHIVE*) options as definition lists Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9803
| * | | file(ARCHIVE_CREATE): add WORKING_DIRECTORY optionYuri Witte2024-09-113-3/+18
| | | | | | | | | | | | | | | | | | | | Fixes: #25260 Issue: #21653
* | | | Merge topic 'add_custom_command-arg-handling'Brad King2024-09-1112-4/+182
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ec519f3e97 add_custom_command: Validate arguments more rigorously 8dc8be0884 AndroidTestUtilities: Remove DEPENDS that was being silently ignored 316840b430 Tests: Add missing POST_BUILD to custom commands f5f80305ef ExternalProject: Ensure keywords requiring an argument have one Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9785
| * | | add_custom_command: Validate arguments more rigorouslyCraig Scott2024-09-098-0/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new CMP0175 policy to preserve backward compatibility for projects that were using unsupported keywords or arguments. Fixes: #26096, #21089, #18976
| * | | Tests: Add missing POST_BUILD to custom commandsCraig Scott2024-09-094-4/+7
| | | | | | | | | | | | Issue: #21089
* | | | Merge topic 'pass-link-directories'Brad King2024-09-105-0/+160
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | 9e95bd49f2 Check*: Add option to pass link directories into checks Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9795
| * | | Check*: Add option to pass link directories into checksAliaksandr Averchanka2024-09-095-0/+160
| | | |
* | | | Tests/RunCMake/IAR: Fix ASM cases for XLINK targetsFelipe Torrezan2024-09-062-41/+50
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | The IAR Assemblers seem to be missing some built-in target-identifier symbols. Instead, identify the affected target architectures by using their respective `__TID__` (Target Identifier) built-in symbols. Also make sure the test has an IAR Assembly implementation for each target. Fixes: #26267
* | | Tests/RunCMake/IAR: Exclude ASM cases on Windows pending investigationBrad King2024-09-051-4/+7
| | | | | | | | | | | | Issue: #26267