| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|
|
| |
Move them up from cmLocalGenerator and out of cmStateDirectory.
|
| |
|
|
|
|
|
|
| |
Most calls to `MaybeConvertToRelativePath` use one of our common work
directories (e.g. top of the build tree) as the local path. Add helpers
for each of the common cases to simplify and clarify call sites.
|
| |
|
|
|
|
|
| |
CMake uses explicit 'this->' style. Using custom clang-tidy check we can
detect and fix places where 'this->' was missed.
|
|
|
|
|
| |
Issue: #20286
Fixes: #21415
|
|
|
|
|
|
|
|
|
|
|
| |
Each source compilation generates a dependencies file. These dependencies
files are consolidated in one file per target. This consolidation is done
as part of command 'cmake -E cmake_depends` launched before evaluation of
makefile dependency graph.
The consolidation uses the same approach as `CMake` dependencies management.
Fixes: #21321
|
|
|
|
|
| |
In preparation of support of 'CMAKE_DEPENDS_IN_PROJECT_ONLY'
when dependencies are generated by the compiler.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do not attach a custom command to a target if it is already attached to one of
the target's dependencies. The command's output will be available by the time
the target needs it because the dependency containing the command will have
already been built.
This may break existing projects that do not properly mark non-created
outputs with the `SYMBOLIC` property. Previously a chain of two custom
commands whose intermediate dependency is not created would put both
commands in a dependent project's Makefile even if the first command is
also in its dependency's Makefile. The first command would run twice
but the build would work. Now the second command needs an explicit
`SYMBOLIC` mark on its input to tell CMake that it is not expected to
exist. To maintain compatibility with projects that left out the mark,
add a policy activating the behavior.
|
|
|
|
|
| |
Use the globally computed target ordering so that we generate all
of a target's dependencies before generating the target itself.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Add a `cmGeneratorTarget::CanCompileSources` helper method to tell
generators whether a target might compile anything.
|
|
|
|
|
|
| |
Add a `cmGeneratorTarget::IsInBuildSystem` helper method to tell
generators whether a target should participate in the generated build
system.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See https://github.com/codespell-project/codespell#readme
The following command was used:
```
codespell -q6 --skip="\
.git,\
*.json,\
./Copyright.txt,\
./Help/command/foreach.rst,\
./Help/prop_test/REQUIRED_FILES.rst,\
./Help/variable/CTEST_COVERAGE_COMMAND.rst,\
./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\
./Modules/CMakeRCInformation.cmake,\
./Modules/Internal/CPack/NSIS.template.in,\
./Modules/FindMatlab.cmake,\
./Modules/MatlabTestsRedirect.cmake,\
./Modules/Platform/Windows-Clang.cmake,\
./Modules/Platform/Windows-Intel-Fortran.cmake,\
./Modules/Platform/Windows-MSVC.cmake,\
./Source/CMakeVersion.cmake,\
./Source/cmConvertMSBuildXMLToJSON.py,\
./Source/cmCreateTestSourceList.cxx,\
./Source/cmGlobalVisualStudio10Generator.cxx,\
./Source/cmExportBuildFileGenerator.cxx,\
./Source/cmExportInstallAndroidMKGenerator.cxx,\
./Source/cmExportInstallFileGenerator.cxx,\
./Source/cmExportSet.cxx,\
./Source/cmExportTryCompileFileGenerator.cxx,\
./Source/cmFindPackageCommand.cxx,\
./Source/cmInstallCommand.cxx,\
./Source/cmGeneratorExpressionLexer.cxx,\
./Source/cmLocalVisualStudio7Generator.cxx,\
./Source/cmOrderDirectories.cxx,\
./Source/cmTarget.cxx,\
./Source/kwsys/*,\
./Source/QtDialog/CMakeSetupDialog.ui,\
./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\
./Source/CTest/cmParseCoberturaCoverage.h,\
./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\
./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\
./Tests/RunCMake/GoogleTest/xml_output.cpp,\
./Tests/RunCMake/Make/TargetMessages*,\
./Utilities/*,\
" \
-L "\
dependees,\
endwhile,\
fo,\
filetest,\
helpfull,\
nd,\
objext,\
stoll,\
supercedes,\
superceded,\
vas,\
varn,\
"
```
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit d74e651b78 (Makefiles: Re-implement makefile target path
escaping and quoting, 2020-04-10, v3.18.0-rc1~334^2~1), `WriteMakeRule`
now correctly escapes `$` in make target paths as `$$`. However, this
caused an existing call site to escape the `$(VERBOSE)` variable
reference in the `.SILENT` prefix, making it ineffective. Sub-makefiles
are invoked with `MAKESILENT`, so this bug matters only for the `all`
target, which emits progress messages from toplevel.
Before:
# Suppress display of executed commands.
$$(VERBOSE).SILENT:
After:
# Suppress display of executed commands.
$(VERBOSE).SILENT:
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
c4d09fdc6d Makefiles: Add Objective C/C++ compilations to compile_commands.json
98aa628f0b Makefiles: Scan Objective C/C++ preprocessor dependencies
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4675
|
| |
| |
| |
| | |
Fixes: #20635
|
| |
| |
| |
| |
| |
| |
| |
| | |
Code paths that write makefile target paths use a combination of
`cmSystemTools::ConvertToOutputPath` and `cmMakeSafe`. Some were
missing the latter. Wrap these two steps up into a dedicated
`ConvertToMakefilePath` method provided on both the local and global
generators.
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
3fdd8db3aa Refactor: Avoid `std::endl` where it's not necessary (part 1)
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4513
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The `std::endl` manupulator, except inserting `\n` character, also
performs `os.flush()`, which may leads to undesired effects (like
disk I/O in the middle of forming data strings). For the
`std::stringstream` it also has no meaning.
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | | |
d6d9da5178 Makefiles: Fix silencing of nested calls for GNU make 4.3
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4515
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since GNU make 4.3, `.SILENT:` no longer causes nested `$(MAKE)` calls
to get `-s` implicitly. Add the `-s` flag explicitly on such calls to
suppress messages about Entering/Leaving directories.
Fixes: #20487
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
ec7928ef26 use _s to construct static string_views at several places
94de927cab VS10Generator: avoid many string allocations
8ca2504a4d use string_views to avoid memory allocations
761f1adcae check for a valid URL scheme before starting to do any splitting
ef778d77e0 replace std::string::substr() with operations that do not allocate memory
77616f4681 pass cm::string_view to cmVisualStudioSlnParser::ParseTag()
ada6a3226f use cm::string_view for language extension lookups
48adc29721 replace "std::string::find(x) == 0" with cmHasPrefix()
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4501
|
| | | | |
|