Commit Graph

11602 Commits

Author SHA1 Message Date
Craig Scott d13ed01d54 Tests: Remove unused files from RunCMake.install 2024-09-18 08:39:57 +10:00
Brad King e782811cfe execute_process: Change default ENCODING to UTF-8
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
2024-09-16 06:37:46 -04:00
Brad King c76a5458ac Merge topic 'execute_process-encoding'
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
2024-09-16 06:25:22 -04:00
Brad King 7b5f9f1fa2 Merge topic 'ninja-depfile-quoting'
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
2024-09-16 06:20:17 -04:00
Brad King 844417294b Merge topic 'file-REAL_PATH-warn-non-existing'
00c1161b01 file(REAL_PATH): Warn on non-existing paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9806
2024-09-13 09:25:44 -04:00
Brad King b11323f1e4 Ninja: Fix depfile binding with spaces in path
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
2024-09-13 09:04:32 -04:00
Brad King 3898e53e82 execute_process: Document and test ENCODING default
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
2024-09-13 08:19:57 -04:00
Brad King e1fc4b9b17 Tests/RunCMake/execute_process: Add test for ENCODING AUTO
On Windows the AUTO encoding is based on the console code page,
so run the test in an isolated console window.
2024-09-13 08:19:32 -04:00
Brad King 56ae758bc5 Tests/RunCMake/execute_process: Improve test for ENCODING UTF-8
Generalize the test infrastructure.  Add Chinese text to the sample.
2024-09-12 14:34:04 -04:00
Brad King 48ced5fb12 Tests/RunCMake/BuildDepends: Enable more depfile cases with Ninja 2024-09-12 12:24:48 -04:00
Brad King b751a857cc Tests/RunCMake/BuildDepends: Simplify CustomCommandDepends case
Also rename from "CustomCommandDependencies".
2024-09-12 12:24:48 -04:00
Brad King 006891dab9 Tests/RunCMake/BuildDepends: Prepare CompileDepends check for multiple targets 2024-09-12 12:23:46 -04:00
Brad King 0915320ddf Tests/RunCMake/BuildDepends: Simplify CompileDepends case
Also rename from "CompilerDependencies".
2024-09-12 11:58:18 -04:00
Brad King 24fbfa915c Tests/RunCMake/BuildDepends: Simplify LinkDepends case 2024-09-12 10:49:29 -04:00
Alex Overchenko 00c1161b01 file(REAL_PATH): Warn on non-existing paths
The command is documented to work only for cases that the referenced
path exists.

Fixes: #26260
2024-09-12 08:20:29 -04:00
Brad King 747fa20ad6 Merge topic 'proto'
1dc1d000a0 FindProtobuf: Fix IMPORT_DIRS handling and relative directory generation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9809
2024-09-12 08:16:53 -04:00
Brad King d3518bbb17 Merge topic 'vs-output-name-net-sdk'
66bd326e28 VS: Use OUTPUT_NAME in DOTNET_SDK projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9808
2024-09-12 08:12:51 -04:00
Brad King b91ea1b368 Merge topic 'file-archive-workdir'
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
2024-09-12 08:10:54 -04:00
Brad King 2321b88edf Merge topic 'cpack-ifw-product-images'
5b8fa21512 Tests: Add a test covering the CPack IFW Generator
3331c7032f CPack/IFW: Add option for ProductImages URLs
d58f90f628 CPack/IFW: Actually ignore missing ProductImages
3c214f2638 CPack/IFW: Fix generation of ProductImages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9798
2024-09-12 08:09:32 -04:00
Xiong Nandi 1dc1d000a0 FindProtobuf: Fix IMPORT_DIRS handling and relative directory generation
Append ${CMAKE_CURRENT_SOURCE_DIR} to `_protobuf_include_path` last, since
protoc will search the path in order.

Besides, we have to figure out the output directory by iterating through the
include paths and checking for valid relative paths.
2024-09-11 12:56:28 -04:00
Yuri Witte d8a9aabd24 file(ARCHIVE_CREATE): add WORKING_DIRECTORY option
Fixes: #25260
Issue: #21653
2024-09-11 09:52:32 -04:00
Brad King ac410c7add Merge topic 'genex-tco-subgraph'
4a11772618 GenEx: Limit TARGET_PROPERTY transitive closure optimization to subgraphs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !9789
2024-09-11 09:33:28 -04:00
Brad King dd023d9707 Merge topic 'add_custom_command-arg-handling'
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
2024-09-11 09:32:24 -04:00
Julien Marrec 5b8fa21512 Tests: Add a test covering the CPack IFW Generator 2024-09-11 08:44:09 -04:00
Calum Robinson 66bd326e28 VS: Use OUTPUT_NAME in DOTNET_SDK projects
Fixes: #26285
2024-09-11 12:25:08 +01:00
Brad King 613a883470 Merge topic 'pass-link-directories'
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
2024-09-10 08:17:51 -04:00
Michael Herwig 4a11772618 GenEx: Limit TARGET_PROPERTY transitive closure optimization to subgraphs
Fixes: #25728
2024-09-10 13:24:24 +02:00
Craig Scott ec519f3e97 add_custom_command: Validate arguments more rigorously
Add a new CMP0175 policy to preserve backward compatibility
for projects that were using unsupported keywords or arguments.

Fixes: #26096, #21089, #18976
2024-09-10 08:19:09 +10:00
Craig Scott 316840b430 Tests: Add missing POST_BUILD to custom commands
Issue: #21089
2024-09-10 08:19:08 +10:00
Aliaksandr Averchanka 9e95bd49f2 Check*: Add option to pass link directories into checks 2024-09-09 17:06:33 +03:00
Felipe Torrezan 654c357a05 Tests/RunCMake/IAR: Fix ASM cases for XLINK targets
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
2024-09-06 11:25:13 -04:00
Brad King 52098b5b51 Tests/RunCMake/IAR: Exclude ASM cases on Windows pending investigation
Issue: #26267
2024-09-05 10:10:35 -04:00
Brad King aad2a88cb4 Tests/RunCMake/IAR: Quote linker flags for spaces in path to toolkit 2024-09-05 09:36:28 -04:00
Brad King 9c5f6d22f3 Merge topic 'windows-kernel-mode-driver-includes'
b151bcfc9e WindowsKernelModeDriver: Add WDK include and link paths on MSVC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9705
2024-09-05 09:21:35 -04:00
Brad King 2daeb0b504 Merge topic 'build-databases'
e77655555c cmExperimental: gate build database support behind a flag
23cbeb5035 ci: enable `build_database` CXXModules tests
6863c1d823 Tests/CXXModules: add tests for module commands
123107c1a4 Tests/CXXModules: add support for running targets under a given config
438038b5e1 Tests/CXXModules: support building specific targets of example trees
84bc710d84 cmGlobalGenerator: generate build database files for targets
670f753f24 cmDyndepCollation: write build database metadata
dcf9a66ffe cxxmodules: plumb control data for exporting build databases
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9708
2024-09-05 09:20:23 -04:00
Brad King 7b51809d9a Merge topic 'msvc-v100-manifest-tooling'
09a47c7972 MSVC: Restore support for non-incremental linking with v100 toolset and older

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9783
2024-09-04 08:11:42 -04:00
Joseph Snyder b151bcfc9e WindowsKernelModeDriver: Add WDK include and link paths on MSVC
Detect Windows Kernel-Mode Driver include directories and library search
paths from the WDK command-line environment.  Require toolchain files to
specify the KMDF target version via a new variable.

Since this changes the behavior of the WindowsKernelModeDriver
experimental feature, update its UUID.
2024-09-03 11:10:35 -04:00
Rüdiger Ihle 09a47c7972 MSVC: Restore support for non-incremental linking with v100 toolset and older
Since commit 0b552eb877 (MSVC: Embed manifests directly for
non-incremental vs_link_exe links, 2023-02-20, v3.27.0-rc1~438^2) we use
`/MANIFEST:EMBED`, but that is not supported by older MSVC linkers.
Restore use of the standalone manifest tool.

Update `Tests/MSManifest` to recognize `dpiAwareness` in the manifest
content as written by MSVC v100 tooling.

Fixes: #26179
2024-09-03 10:58:28 -04:00
Felipe Torrezan d478ffcd72 Tests/RunCMake/IAR: Add missing linker options for RH850
Closes: #26249
2024-09-03 10:25:55 -04:00
Ben Boeckel e77655555c cmExperimental: gate build database support behind a flag
Given that the feature currently only supports C++ sources and is not
formally accepted by ISO yet, gate it behind a flag.
2024-09-03 10:05:40 -04:00
Ben Boeckel 6863c1d823 Tests/CXXModules: add tests for module commands 2024-09-03 10:05:40 -04:00
Brad King e25f95c4cc Merge topic 'standard-link-directories'
20e9b59d5e Linking: Add CMAKE_LANG_STANDARD_LINK_DIRECTORIES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9707
2024-08-29 08:31:17 -04:00
Brad King a2c9e59436 Merge topic 'remove-vs12-generator'
241f923a6f Drop Visual Studio 12 2013 generator
7c1b671c3a Tests: Disable VSXaml test pending update to newer VS versions
9042aa1af5 Tests: Remove WinCE tests
810e33f67a Tests: Simplify tests for Visual Studio generators
1ad39a9cf8 UseSWIG: Simplify test for Visual Studio generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9782
2024-08-29 08:29:14 -04:00
Brad King a69f063062 Merge topic 'project_ensure_non_cache_variables'
c1ece78d11 project: non cache <project> prefix variables are also created

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !9779
2024-08-29 08:26:42 -04:00
Vito Gamberini 20e9b59d5e Linking: Add CMAKE_LANG_STANDARD_LINK_DIRECTORIES
Closes: #18222
2024-08-28 15:54:43 -04:00
Brad King 241f923a6f Drop Visual Studio 12 2013 generator
This generator has been deprecated since CMake 3.28.  Remove it.
2024-08-28 14:13:05 -04:00
Brad King 7c1b671c3a Tests: Disable VSXaml test pending update to newer VS versions
It works only with the deprecated Visual Studio 12 2013 generator,
which is about to be removed.

Issue: #26248
2024-08-28 14:13:05 -04:00
Brad King 9042aa1af5 Tests: Remove WinCE tests
These work only with the deprecated Visual Studio 12 2013 generator,
which is about to be removed.
2024-08-28 14:13:05 -04:00
Brad King 810e33f67a Tests: Simplify tests for Visual Studio generators
Since commit 03c31b0395 (Drop Visual Studio 9 2008 generator,
2024-05-06, v3.30.0-rc1~134^2), some tests do not need to be
version-dependent.
2024-08-28 14:12:54 -04:00
Brad King 1ad39a9cf8 UseSWIG: Simplify test for Visual Studio generators
Since commit 03c31b0395 (Drop Visual Studio 9 2008 generator,
2024-05-06, v3.30.0-rc1~134^2), the test does not need to be
version-dependent.
2024-08-28 14:12:41 -04:00