| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Create a single place to store target data to prevent duplication.
This moves `targetType` and `targetLabels` out of the snippet files
and into a target map in the `cmakeContent` file referenced by each
snippet.
Fixes: #27244
|
| | |
|
| |
|
|
|
|
|
|
| |
- Include `config` in all `install` and `custom` snippets
- Include `target` for `custom` snippets where applicable
- Document and test inclusion of `language` in `link` snippets
Issue: #27244
|
| | |
|
| | |
|
| |
|
|
|
| |
When a shortened directory is used, the name of the target is not
accessible just by the path. Pass it explicitly.
|
| | |
|
| |
|
|
|
|
|
| |
The implementation of (pre|post)Build hooks rely on a direct parent-
child relationship between the build system process and `ctest
--start-instrumentation`. MSYS2's `make.exe` uses the msys-runtime POSIX
compatibility layer which disrupts this relationship.
|
| |
|
|
|
|
|
|
|
|
| |
* Use `uv_disable_stdio_inheritance` to resolve the deadlock between the
parent build system process and `ctest
--wait-and-collect-instrumentation` on Windows.
* Remove Windows gating from preBuild and postBuild indexing and update
tests and documentation accordingly.
Fixes: #26668
|
| |
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
557c44b93e cmStrCat: use character literals where possible
23779057fd cmStrCat: combine neighboring arguments where possible
483d13daf4 ast-grep: add a rule to turn strings into characters
61743471d9 ast-grep: add a rule to find adjacent string literals in cmStrCat calls
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10790
|
| | |
| |
| |
| |
| | |
Found and replaced using the `cmstrcat-to-char-literal` rule for
`ast-grep`.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The latter:
* uses a type-safe representation of text attributes,
* works with `StdIo::Console` to print arbitrary UTF-8 text in color, and
* writes VT100 sequences to Windows Consoles when supported, eliminating
racy console text attribute changes in parallel `make` output.
Fixes: #22450, #26689, #26924
|
| |/ |
|
| |
|
|
|
|
|
|
|
|
| |
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
while IFS= read -r -d $'\0' f ; do
sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
s/Copyright.txt/LICENSE.rst/
}' "$f" ; done
```
|
| | |
|
| |
|
|
|
| |
Updates the preBuild and postBuild instrumentation hooks to run before and
after make is invoked.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
Issue: #26123
|
| |
|
|
|
| |
Adds a new data field `targetLabels` to link snippets which contains a list of
text labels from the LABELS target property.
|
| |
|
|
|
|
| |
Add a feature for collecting build instrumentation for CMake projects.
Issue: #26099
|
| | |
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
25b43a5b7f Makefile: Enable progress messages for codegen target
af2b340a2e Makefile: Fix per-directory codegen target
b7e6c418e3 cmLocalUnixMakefileGenerator3: Simplify progress command generation
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10085
|
| | |
| |
| |
| |
| | |
This was left out of commit 197cb419d1 (add_custom_command: Add CODEGEN
support, 2024-05-27, v3.31.0-rc1~394^2).
|
| | |
| |
| |
| | |
Issue: #26517
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a way to specify, in a portable way, to raise an error for any
warning during the link step. For that purpose, define:
* CMAKE_LINK_WARNING_AS_ERROR variable
* LINK_WARNING_AS_ERROR target property
Fixes: #25343
|
| |/
|
|
|
|
| |
Methods renamed:
* SetIgnoreWasinigAsError => SetIgnoreCompileWasningAsError
* GetIgnoreWasinigAsError => GetIgnoreCompileWasningAsError
|
| |
|
|
|
|
|
|
|
|
|
| |
By specifying CODEGEN as an argument to add_custom_command the
custom command will be added to a codegen build target.
The intent is to provide a convenient way for users to get
their generated files without having to build the whole project.
This can be helpful for code analysis tools which can be useful
for IDEs and CI.
|
| |
|
|
| |
Speed up a bit by calling members directly.
|
| |
|
|
|
|
| |
Targets only using Fortran modules via `$<TARGET_OBJECTS>` also need a
collation step to be performed. Check for this case and trigger the
depends rule to be used.
|
| |
|
|
| |
Issue: #16273
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This handles the case where `COLOR` is set to some ANSI-like color
sequence in the ambient environment. These sequences tend to include `;`
which terminates the command and tries to use the next component
(typically an integer, possibly with a trailing `m`) with errors like:
/bin/sh: line 1: 2: command not found
/bin/sh: line 1: 255: command not found
/bin/sh: line 1: 221: command not found
/bin/sh: line 1: 255m: command not found
Also add a test that sets `COLOR` in the environment which affects the
generated Makefiles behavior.
See: https://discourse.cmake.org/t/cmake-failing-gcc-compiler-checks/8277
|
| |
|
|
|
|
|
|
| |
When the build system re-runs `cmake` to regenerate itself, preserve the
`--compile-no-warning-as-error` option if it was used when `cmake` was
last explicitly invoked. Normally such settings are preserved in the
cache, but the purpose of this option is to be beyond the reach of
project code.
|
| |
|
|
| |
This method returns now a std::unique_ptr instance rather than a raw pointer.
|
| |
|
|
|
|
| |
Based on work done by @ben.boeckel (!8051)
Fixes: #22217
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Refactoring was done because EvaluateComment leaked memory.
|
| |
|
|
| |
Fixes: #23689
|
| |
|
|
|
|
|
|
| |
Rename the booleans 's_ErrorOccured' and 's_FatalErrorOccured' to
's_ErrorOccurred' and 's_FatalErrorOccurred', respectively.
Rename the getters and setters to 'Get[Fatal]ErrorOccurred' and
'Set[Fatal]ErrorOccurred', and fix all uses across the codebase.
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
6ab9fbd43b color: Add tests for CMAKE_COLOR_DIAGNOSTICS
78adb1b952 color: Add CMAKE_COLOR_DIAGNOSTICS environment variable
884d9de8b7 color: Introduce CMAKE_COLOR_DIAGNOSTICS variable
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Frank Dana <ferdnyc@gmail.com>
Merge-request: !6990
|
| | |
| |
| |
| |
| |
| |
| | |
Add a variable to control both makefile color messages and compiler
color diagnostics.
Fixes: #15502
|
| | |
| |
| |
| |
| | |
Refactor to set both at once so we have a single place in the code that
knows both have been set.
|
| |/
|
|
|
|
|
|
|
|
| |
Since commit cfd8a5ac1f (Makefiles: Add support of DEPFILE for
add_custom_command, 2020-12-04, v3.20.0-rc1~237^2~1) we store in
`CMAKE_DEPENDS_DEPENDENCY_FILES` an empty string as the source file with
which the dependencies of a custom command depfile are associated. When
this list is later expanded by `make depend`, the empty element is
removed and breaks list indexing. Fix the list expansion to preserve
empty elements.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
GCC 12 warns:
warning: '%04d' directive output may be truncated writing between
4 and 11 bytes into a region of size 5 [-Wformat-truncation=]
The surrounding logic guarantees the formatted integer will never
be more than 4 bytes, but it doesn't hurt to use a larger buffer.
This GCC behavior is documented:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104012#c5
|