Commit Graph

97 Commits

Author SHA1 Message Date
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
Cristian Adam
f6cb1e646c Multi-Ninja: Fix PCHs for Visual C++
Fixes: #20711
2020-05-20 11:20:38 +02:00
Joachim Wuttke (h)
448e2d7a9d Help: Provide cross-references between compiler settings 2020-05-14 22:17:10 +02:00
Joachim Wuttke (h)
1f697b3991 Help: COMPILE_OPTIONS: bundle cross refs, add example 2020-05-14 22:05:30 +02:00
Robert Maynard
9f4eb352fe Unity Builds: Support explicit specification of sources to groups
Instead of having CMake determine which files should go into each
unity file, the user can now use explicitly state the mapping.
2020-05-07 11:13:34 -04:00
Craig Scott
b5f39772a4 Merge topic 'docs-SKIP_PRECOMPILE_HEADERS-formatting'
a293d05c41 Help: Fix unescaped asterisks in docs for SKIP_PRECOMPILE_HEADERS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4592
2020-04-11 09:10:33 -04:00
Craig Scott
a293d05c41 Help: Fix unescaped asterisks in docs for SKIP_PRECOMPILE_HEADERS 2020-04-10 19:03:47 +10:00
Matt Davies
0723e04f7a VS: Add documentation for VS_SETTINGS and VS_SOURCE_SETTINGS_<tool>. 2020-03-27 12:01:21 -04:00
FeRD (Frank Dana)
3eb2b62d21 Help: Expand discussion of GENERATED / BYPRODUCTS
- Mention the Makefile Generators' `make clean` removal in the
  BYPRODUCTS section of add_custom_command and add_custom_target
- Expand the GENERATED property docs' description of which files will
  be marked with the property, and of what it implies (including
  `make clean` removal)
2020-03-12 11:55:10 -04:00
Craig Scott
fcacd8ce8d Help: Improve readability and fix inaccuracies in unity build docs 2019-11-09 19:48:34 +11:00
Cristian Adam
7114c141e2 Unity build: Add support for Ninja and Makefile generators 2019-08-29 16:44:09 +02:00
Cristian Adam
8da78d4efe Precompile headers: Update documentation 2019-08-28 11:47:51 -04:00
Brad King
e075e64fd8 Help: Document Swift_DEPENDENCIES_FILE property defaults
Copy wording from the release notes.
2019-06-04 09:55:37 -04:00
Saleem Abdulrasool
d745551fb6 Help: add some initial documentation for Swift support 2019-05-16 14:41:05 -04:00