`Microsoft.Cl.Common.props` adds some `cl` flags by default, but for
CMake they may not match what's produced by command-line generators.
If the `-Zc:wchar_t`, `-Zc:forScope`, and/or `-Zc:inline` flags are
not specified by the project or user, suppress them.
Fixes: #26964
cdf2a36f48 HIP: Add support for [CMAKE_]HIP_LINKER_LAUNCHER
77312cc636 CUDA: Add support for [CMAKE_]CUDA_LINKER_LAUNCHER
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10847
Explicitly allow argument markers to be assigned. Make use of this in
parsing. This simplifies working with these types, by allowing them to
be assigned from the underlying types using simple `a = b` syntax,
rather than requiring gymnastics to access the underlying assignment
operations. It also makes assignment more consistent with
initialization.
In cmProjectCommand, after validating the VERSION, we move it into a
local variable. Later, however, we were comparing COMPAT_VERSION against
the VERSION stored in the arguments. Compare to the local variable
instead.
With IntelLLVM on Windows, we link using the compiler driver.
With MSVC on Windows, we invoke the linker directly. If we
use both in a single build tree, for separate languages,
the value of `CMAKE_LINK_DEF_FILE_FLAG` conflicts. Add a
per-language `CMAKE_<LANG>_LINK_DEF_FILE_FLAG` variable to
avoid the conflict. Preserve the language-agnostic variable
for compatibility with projects that reference it.
Fixes: #26005
If `CFLocaleCreateCanonicalLanguageIdentifierFromString` fails, stop
gracefully. Otherwise we crash because `CFStringGetCString` cannot work
with null `CFStrings`.
c95a8348ce cmLocalGenerator: add an override for CMakeFiles-using paths
35d32b8741 cmLocalGenerator: move the `CMakeFiles` subdir from the target to output root
bc19e42461 generators: use `GetObjectOutputRoot` to compute target directories
b1d9a5313c cmLocalGenerator: add a `GetObjectOutputRoot` method
b82a74d918 generators: use GetSupportDirectory() in more places
36f85ee0cc cmGeneratorTarget: query the local generator for the target directory
ff5d7bc301 cmLocalXCodeGenerator: use a per-target directory
aafd771529 cmNinjaTargetGenerator: use `GetObjectFileDir` where possible
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10812
Visual Studio doesn't use a `CMakeFiles` subdirectory for its support
directories. However, some codepaths expect to use paths which are
always under `CMakeFiles`. Add a mechanism to keep the path for such
files.
When target directories are shortened, the `CMakeFiles` path component
will be part of the root, not the target directory. Since other files
end up constructing paths manually, move the differing component into
the correct logical path construction part.
Refactoring in commit c4e890946a (try_compile: consistently add language
properties, 2020-06-15, v3.19.0-rc1~633^2) accidentally dropped the
`_LINK` part of the name. It also miscounted array indexes in a way
that happened to propagate `CMAKE_<LANG>_LINK_NO_PIE_SUPPORTED` whether
or not it is needed for the CMP0083 NEW behavior. Simplify the code and
fix the variable name.
Fixes: #26948
The Windows documentation [1] states:
> command-line applications should capture the initial console
> mode at startup and attempt to restore it when exiting
We set `ENABLE_VIRTUAL_TERMINAL_{INPUT,PROCESSING}` modes since
commit d6a1ff59f1 (StdIo: Provide metadata about stdin, stdout,
stderr streams, 2025-05-06). Avoid leaking them.
[1] https://learn.microsoft.com/en-us/windows/console/console-modes
Issue: #26924
In commit f2134169f6 (WiX: Add the build directory to IncludeSearchPaths
for candle.exe, 2018-07-06, v3.13.0-rc1~318^2) we implemented this for
WiX v3 with `candle.exe`. Use the same mechanism for Wix v4 and upwards
for `wix.exe`.
Refactoring in commit 48adc29721 (replace "std::string::find(x) == 0"
with cmHasPrefix(), 2020-03-20, v3.18.0-rc1~488^2~7) accidentally
changed `std::string::rfind(x, 0) != 0` to `!cmHasSuffix()` instead of
`!cmHasPrefix()`.
This is currently not an big issue, but leads to the build directory
being included even when no source file outside the build directory is
used in the project.
afd6c2966e cmCTestSubmitHandler: Move internal helpers to anonymous namespace
78f0b2aeed cmCTestSubmitHandler: Make internal method private
2a9cfc2da3 cmCTestSubmitHandler: Remove unnecessary type alias
8f698e1708 cmCTestSubmitHandler: Open log file earlier
7475921ff8 cmCTestSubmitHandler: Inline and remove method called only once
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10815