`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
Clang before 20.1 does not recognize sm_100 and newer. Revise:
* commit b2251e0deb (CUDA/Clang: Update architectures supported by
CUDA 12.8, 2025-02-04, v4.0.2~4^2~1^2)
* commit a1b4c30f24 (CUDA: Add CUDA 12.9 new architectures and family
syntax, 2025-04-21, v4.0.2~3^2^2)
Modify {export,install}(PACKAGE_INFO) commands to inherit version
information from the current project in situations where it seems
reasonable to do so. Add an option to explicitly request inheritance
from a specific project.
This leverages the recently added project(COMPAT_VERSION).
Consolidate InstallPackageInfo's bad arguments tests into only two test
cases that each test multiple invocations, rather than having a single
test per invocation. This makes them match the similar ExportPackageInfo
tests which were necessarily consolidated due to those testing many more
variants (due to differences in the respective interfaces). This will
simplify adding additional tests in the future.
Add a member to directory state that records the set of known projects.
Add a method to query whether a project exists.
Internally, while this doesn't allow us to confirm that a variable like
`foo_VERSION` is actually associated with a project `foo`, it provides a
much stronger indicator than the mere existence of said variable.
CPS package metadata involves a fair amount of passing around a
particular set of values, as well as shared argument handling, which is
only going to increase as additional features are added. In order to
reduce code duplication (now and going forward), create a helper class
to handle the shared argument parsing and to serve as a container to
pass metadata values.
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
This updates the module documentation and deprecates some result
variables in favor of using imported targets.
Changes:
- Synced module documentation with other similar find modules.
- Reworded and updated descriptions.
- Renamed "Cache Variables" to "Hints".
- Added info about config mode.
- Added separate section "Deprecated Items".
- Mention of Threads::Threads imported target removed.
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.
- Added intro code block showing how to include this module.
- Reworded module introduction.
- Used "command" instead of "function".
- Reworded command arguments and descriptions.
- Added the "See Also" section.
- Added intro code block showing how to include this module.
- Used "commands" instead of "functions".
- Reworded command descriptions.
- Synced style or command arguments.
- Added intro code blocks showing how to include these modules.
- Used word "command" instead of "macro".
- Added examples sections.
- Updated and synced descriptions of commands and arguments.
- Added a rubric title for variables that affect the checks.
- Listed CMAKE_TRY_COMPILE_TARGET_TYPE variable in the rubric together
with CMAKE_REQUIRED_* variables.
- Added link to CheckCompilerFlag module in the target_compile_options()
docs.
- Used lowercase style for check_fortran_compiler_flag() command.
- Added a link to `$<COMPILE_LANGUAGE:languages>` generator expression
so it can be linked from other pages (See commit
2e37a20f02 for more info on the initial
style used).
- Fixed the GENEX_NOTE inclusion (starting with line after the 2nd line)
where part of the sentence was rendered in the output.
An easy way to detect and remove debugging left over from development.
The rules are disabled by default so that LSP usage doesn't interfere
when they are wanted.
To actually use the rules, severity flags are necessary:
ast-grep scan --error=rm-cmdbg-includes --error=rm-cmdbg-macros
This command will report on instances; passing `-U` as well will update
the source.
Tests are also not run by default; see
https://github.com/ast-grep/ast-grep/issues/2023 to track its progress.
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