Commit Graph

110 Commits

Author SHA1 Message Date
Craig Scott
730cad9cb6 Help: Fix typos and formatting for 4.2 release 2025-11-14 16:29:51 +11:00
Brad King
5e9722866a Help: Update Sphinx versionadded directives for 4.2 release
Run the script:

    Utilities/Sphinx/update_versions.py --since v4.1.0 --overwrite
2025-10-09 09:38:20 -04:00
Brad King
042b88e3f4 Merge topic 'object-name-properties'
b53837a1bd prop_sf/INSTALL_OBJECT_NAME: support custom install object names
08f1a0fbc6 cmLocalGenerator: get the configuration when building object paths
168e55be41 cmObjectLocation: support install-specific object locations
84372ce0b5 prop_sf/OBJECT_NAME: no-op for the FASTBuild and Xcode generators
9ef99353cb prop_sf/OBJECT_NAME: support custom object names
7aff0d37b5 cmSourceFile: add accessors for PCH source files
bbdc2fd908 cmSourceFile: internally track CMake-managed source files
388923818d cmGeneratorTarget: return the source file added
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11144
2025-09-10 10:01:47 -04:00
Ben Boeckel
b53837a1bd prop_sf/INSTALL_OBJECT_NAME: support custom install object names
These can support configuration-dependent queries much more easily, so
separate it out.
2025-09-09 09:58:07 -04:00
Ben Boeckel
84372ce0b5 prop_sf/OBJECT_NAME: no-op for the FASTBuild and Xcode generators
There's no control over the object base name implemented in the
FASTBuild generator. Rather than expecting some half-supported behavior,
just ignore it completely there.

Similarly, Xcode ends up making its own object paths internally
regardless of what CMake would like.
2025-09-09 09:58:07 -04:00
Ben Boeckel
9ef99353cb prop_sf/OBJECT_NAME: support custom object names
Projects which ship object files as artifacts may want to control the
object names as much as possible. Support setting explicit object names
as source file properties to support such use cases.
2025-09-09 09:58:07 -04:00
Alex Turbov
f100769d72 Add SKIP_LINTING target property and CMAKE_SKIP_LINTING variable
These offer target-wide settings to disable lints.

Closes: #27191
2025-09-09 09:56:35 -04:00
Bastien Montagne
3a9d56d2c7 Ninja: Add support for per-source JOB_POOL_COMPILE property
This commit allows to override a global or target-wide 'job pool'
property on a per-source basis.

It modifies the Ninja generator to first look into the source's
properties, and only use the target properties as a fallback.

The new `source` parameter to
`cmNinjaTargetGenerator::addPoolNinjaVariable` may be null, e.g. when
the function is called in context where there is no source (e.g. a
linking task).

Closes: #23994
2025-07-16 21:16:24 +02:00
Ben Boeckel
b634998727 Help: add and make references to generators consistent 2025-06-12 21:25:24 +02:00
Peter Kokot
0d74966cd9 CSharpUtilities: Update documentation
- Added intro code block showing how to include this module.
- Used "commands" instead of "functions".
- Reworded command descriptions.
- Synced style or command arguments.
2025-05-29 01:46:34 +02:00
Alex Turbov
9784834b4c Help: Use *.rst extension for included files
So, editor(s) can correctly highlight the RST syntax in the included files.
2025-04-14 03:07:46 +04:00
Felipe Torrezan
c7d2a17253 IAR: Add support for C-STAT static analysis
The IAR platform offers an integrated static analysis tool named
IAR C-STAT.

Closes: #26844
2025-04-09 12:01:02 -04:00
Junpeng Qiu
6b3ec3fefb Ninja/Makefile: Add support for copying directories into Apple bundles
When the `MACOSX_PACKAGE_LOCATION` property is set on a directory, Xcode
copies the entire directory into the bundle.  Implement this on Ninja
and Makefile generators too.

Fixes: #26808
Co-authored-by: Brad King <brad.king@kitware.com>
2025-03-26 14:51:26 -04:00
Nikita Nemkin
8fa9858e20 Help: Improve VS_SETTINGS and VS_TOOL_OVERRIDE documentation
Reorder paragraphs, adjust version notes, add cross-references,
note the ability to exclude files from the build.

Fixes: #11902
2025-02-19 21:07:03 +05:00
Nikita Nemkin
9890cfc4ec Help: More syntax highlighting for literal blocks
Covers almost all blocks containing actual code, except:

* Parsed-literal blocks can't be highlighted, including many command
  summaries and substitution-heavy docs like find_... commands.
  This is a Sphinx limitation.

* Code with errors, like CMP0049, DEPLOYMENT_ADDITIONAL_FILES,
  DEPLOYMENT_REMOTE_DIRECTORY, @PACKAGE_INIT@ substitution in the
  tutorial, bracket arguments/comments in cmake-language.7 and
  cmake-developer.7.

* FindQt4 module, which needs reformatting.
2025-01-29 16:48:53 -05:00
Alex Turbov
bc4c71627a Help: Fix typos found by the rst-backticks hook
The corresponding `pre-commit` configuration is coming in the
separate MR.

Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
2025-01-27 01:43:26 +04:00
Alex Turbov
c3777c1536 ci: Extend spellcheck job with 'typos' tool
Unlike the `codespell`, `typos` is capable of finding typos
in combined identifiers (`CamelCase` or `snake_case`).
2025-01-22 08:51:45 -05:00
Brad King
1bb0066b0c Help: Clarify deprecation of source-file property COMPILE_DEFINITIONS_<CONFIG>
It is not covered by policy `CMP0043`.  Also fix its link
to the `COMPILE_DEFINITIONS` source file property.
2025-01-19 09:41:02 -05:00
Brad King
bd176b430c Renumber post-3.31 development from 3.32 to 4.0
Issue: #26613
2025-01-16 09:18:21 -05:00
Darragh Coy
4ee8705b12 VS: add source property VS_CUSTOM_COMMAND_DISABLE_PARALLEL_BUILD
This boolean setting allows parallel building to be disabled for
individual source files built via `add_custom_command`. Using this
option is equivalent to setting policy `CMP0147` to the `OLD` behavior.

Closes: #26413
2024-11-06 13:29:57 -05:00
Brad King
03c31b0395 Drop Visual Studio 9 2008 generator
This generator has been deprecated since CMake 3.27.  Remove it.
2024-05-08 10:37:34 -04:00
Deniz Bahadir
071f0d6f98 CMP0163: Make GENERATED source file property globally visible
This was originally attempted by policy CMP0118, but its
implementation did not cover all intended use cases.  We fixed its
documentation in commit 1dabbbb5e0 (CMP0118: Revise documentation to
describe actual behavior, 2024-03-20).

Add new policy CMP0163 to cover the remaining use cases.  In particular,
make the `GENERATED` property visible to `get_property` calls in other
directories.  In order to capture the original intention of CMP0118,
define CMP0163's NEW behavior to also imply CMP0118's NEW behavior.

Fixes: #25437
Fixes: #25058
2024-03-29 08:54:11 -04:00
Deniz Bahadir
1dabbbb5e0 CMP0118: Revise documentation to describe actual behavior
The policy was originally intended to make the `GENERATED` source file
property globally visible, but the implementation didn't fully achieve
that goal.  Revise the documentation to describe what it actually does.

Issue: #25437
2024-03-21 11:37:46 -04:00
Ben Boeckel
63bbb3768d cmLocalGenerator: ignore scanned sources for unity builds 2024-01-05 14:21:27 -05:00
Ben Boeckel
0c07f39006 cmExperimental: remove the flag for C++ modules
All the major compilers now have scheduled releases with support for
scanning, so remove the experimental gate.

Fixes: #18355
2023-10-02 10:17:31 -04:00
Robert Maynard
c3a364cae9 Help: Remove incorrect command from list that marks GENERATED
The `file(GENERATE)` does not mark the output as `GENERATED` currently
or when the documentation that says so was added by commit 11615b297f
(GENERATED: Improve the documentation of the GENERATED file property,
2018-01-03, v3.11.0-rc1~145^2).
2023-06-21 14:19:38 -04:00
Kyle Edwards
36ec89639a VERIFY_INTERFACE_HEADER_SETS: Skip header files that have SKIP_LINTING
Fixes: #24972
2023-06-06 10:45:22 -04:00
Ben Boeckel
6ff5cdc533 cxxmodules: remove support for CXX_MODULE_HEADER_UNITS filesets
There's no backing implementation for header units anyways, so just
remove it for now.
2023-05-31 10:57:11 -04:00
Craig Scott
652a785311 Help: Wording, formatting and ordering fixes for SKIP_LINTING docs
Amends b480315e0c (TargetGenerator: Add SKIP_LINTING source property,
2023-05-12).
2023-05-19 12:29:06 +10:00
Orkun Tokdemir
b480315e0c TargetGenerator: Add SKIP_LINTING source property
The `SKIP_LINTING` source property was added to disable code check for
desired source files. The `SKIP_LINTING`includes `cpplint`, `clang-tidy`, \
`cppcheck` and `include-what-you-use`. If `SKIP_LINTING` is set on a
source file, the tools mentioned above will not be run on that source file.
2023-05-16 10:47:56 -04:00
Brad King
bc1ba6d56b Help: Document experimental feature gate affecting CXX_SCAN_FOR_MODULES
Also drop the release note for `CXX_SCAN_FOR_MODULES`, as the rest of
the C++ modules support has not yet been mentioned in release notes
(since it is still experimental).
2023-02-01 13:58:23 -05:00
Marc Chevrier
7480fa0a5f COMPILE_DEFINITIONS property: ensure leading -D is removed in all cases
Fixes: #24186
2022-12-13 16:54:56 +01:00
Brad King
dae70fa7e8 Merge topic 'help-remove-self-reference-links'
eb77695e25 Help: clean up some minor typos
c36910476a Help: remove links from pages to themselves
391c53a851 Help/prop_tgt/LINK_OPTIONS: fix `:genex:` reference
de4909ea16 Help: fix some minor markup errors
c42c77b020 Help/CMAKE_GLOBAL_AUTORCC_TARGET_NAME: fix link reference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7940
2022-11-21 10:07:07 -05:00
Ben Boeckel
c36910476a Help: remove links from pages to themselves
At least the top-reference links. Internal `:ref:` usages have been left
intact.
2022-11-18 14:09:32 -05:00
Ben Boeckel
a02d792c6e cxxmodules: add properties to control scanning
The `CXX_SCAN_FOR_MODULES` property may be used to control scanning for
targets and for source files rather than assuming "C++20 always needs to
be scanned".
2022-11-18 07:54:31 -05:00
Dan Walsh
2a37b7fd77 Help: Fix typo with misnamed set_source_files_property() in example 2022-06-08 21:18:26 +10:00
Kyle Edwards
83a80e5193 Help: Clarify interaction of LANGUAGE and HEADER_FILE_ONLY 2022-03-15 13:06:35 -04:00
Steven Boswell
f21158cdfe VS: Honor VS_SETTINGS source file property on all sources
Extend the feature added by commit 2ce42f281f (VS: Add VS_SETTINGS
source file property, 2020-03-18, v3.18.0-rc1~449^2~3) to support
all source file types.
2021-09-09 14:19:28 -04:00
Brad King
7aad9e8685 Merge topic 'add_hip_language'
8514ee9b31 HIP: analyze output of `hipcc` to determine default GPU architecture
20d086f1a2 HIP: All HIP tests now run on CMake's current AMD hardware
2e86e50c2f HIP: Add HIP to all the Check* modules
947dbed0aa HIP: Automatically inject the `hip::device` runtime target
b50bfc8913 HIP: Add language to CMake
ff0d2858e1 HIP: Extract clang compiler details from hipcc
bd844387df ROCMClang: Add the ROCm toolkit derived clang compiler to CMake
590553f322 Compilers: protect use of  __has_include
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Zack Galbreath <zack.galbreath@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Acked-by: Axel Huebl <axel.huebl@plasma.ninja>
Merge-request: !6121
2021-06-09 07:53:32 -04:00
Robert Maynard
b50bfc8913 HIP: Add language to CMake 2021-06-07 19:25:33 +00:00
Brad King
ccc83ce162 Help: Document order of flags from CMAKE_<LANG>_FLAGS and COMPILE_OPTIONS 2021-06-03 11:02:27 -04:00
Duncan Barber
7f0151dc91 Help: Document the AUTOUIC_SOURCE_GROUP property
This property came into existence with the changes in b4a103bdec because generated files are now being added for UIC.
2021-04-04 12:29:56 +01:00
Brad King
48aac247e9 Compile with explicit language flag when source LANGUAGE property is set
This change was originally made by commit 74b1c9fc8e (Explicitly specify
language flag when source LANGUAGE property is set, 2020-06-01,
v3.19.0-rc1~722^2), but it was reverted by commit 30aa715fac (Revert
"specify language flag when source LANGUAGE property is set",
2020-11-19) to restore compatibility with pre-3.19 behavior.

Implement the change again, but add policy CMP0119 to make this change
while preserving compatibility with existing projects.

Note that the `Compiler/{Clang,Intel,MSVC}-CXX` modules do not need to
specify `-TP` for their MSVC-like variants because we already use the
flag in `CMAKE_CXX_COMPILE_OBJECT`.  Similarly for `Compiler/XL-CXX`
and `Platform/Windows-Embarcadero`.

Note also that this does not seem possible to implement for XL C.
Even with `-qsourcetype=c`, `xlc` complains about an unknown suffix:
`1501-218 (W) file /.../AltExtC.zzz contains an incorrect file suffix`.
It returns non-zero even with `-qsuppress=1501-218`.

Co-Author: Robert Maynard <robert.maynard@kitware.com>
Fixes: #14516, #20716
2020-12-02 11:39:11 -05:00
Deniz Bahadir
0eb30f175e GENERATED prop: Introducing policy CMP0118 and its documentation
Note: This is currently only defining the CMP0118 policy and providing
its documentation, however, the implementation is still not using it.
2020-11-24 17:41:02 +01:00
Robert Maynard
8976817d6d ISPC: Update help documentation to include ISPC 2020-08-28 11:21:31 -04:00
Kitware Robot
496ec6036f Help: Add Sphinx 'versionadded' directives to each top-level document
Run the `Utilities/Sphinx/update_versions.py` script to add initial
markup to every top-level document and find module.

Issue: #19715
2020-07-06 10:23:20 -04:00
Craig Scott
0420de10b5 Help: Add missing cross-referencing for generator expressions 2020-06-18 20:43:46 +10:00
Brad King
62816ff88c Merge topic 'fortran-preprocess-property'
3888de23da Ninja: Skip Fortran preprocessing if Fortran_PREPROCESS is OFF
66c4e87282 Ninja: Add helper functions to generate Fortran build
5cca1ec893 Ninja: Add helper functions to generate Fortran preprocess rule
b0a6161190 Fortran: Add Fortran_PREPROCESS property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4659
2020-05-22 10:35:10 -04:00
Peter Hill
3888de23da Ninja: Skip Fortran preprocessing if Fortran_PREPROCESS is OFF
If `Fortran_PREPROCESS` is explicitly turned off for a source file then
we know it does not need to be preprocessed.  Teach the Ninja generator
to skip preprocessing in this case.  Otherwise we still must preprocess
just in case.

Fixes: #18870
2020-05-21 11:46:32 -04:00
Peter Hill
b0a6161190 Fortran: Add Fortran_PREPROCESS property
Issue: #18870
2020-05-21 11:44:14 -04:00