summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
Commit message (Collapse)AuthorAgeFilesLines
* instrumentation: Move target data into content filesMartin Duffy2025-10-021-1/+0
| | | | | | | | | 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
* instrumentation: Record build snippets regardless of hooksMartin Duffy2025-09-261-4/+2
|
* instrumentation: Additional data in custom, install and link snippetsMartin Duffy2025-09-241-0/+2
| | | | | | | | - 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
* autogen: support the `SHORT` intermediate dir strategyBen Boeckel2025-07-291-2/+3
|
* Makefiles: support shortened object filenamesJohn Parent2025-07-291-0/+9
|
* Makefiles: pass the target name to `cmake -E cmake_depends`Ben Boeckel2025-07-291-7/+2
| | | | | When a shortened directory is used, the name of the target is not accessible just by the path. Pass it explicitly.
* Makefiles: populate the `TARGET_SUPPORT_DIR` replacement variableBen Boeckel2025-07-281-0/+8
|
* instrumentation: Exclude (pre|post)Build hooks with MSYS MakefilesTyler Yankee2025-07-221-5/+13
| | | | | | | 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.
* instrumentation: Support preBuild and postBuild hooks on WindowsTyler Yankee2025-07-221-6/+6
| | | | | | | | | | * 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
* cmLocalGenerator: move the `CMakeFiles` subdir from the target to output rootBen Boeckel2025-05-241-1/+3
| | | | | | | 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.
* generators: use GetSupportDirectory() in more placesBen Boeckel2025-05-231-8/+4
|
* cmLocalCommonGenerator: factor out `GetTargetDirectory`John Parent2025-05-221-12/+0
|
* cmLocalUnixMakefileGenerator3: use faster `rfind` overloadBen Boeckel2025-05-221-1/+1
|
* Merge topic 'astgrep-cmstrcat'Brad King2025-05-221-2/+2
|\ | | | | | | | | | | | | | | | | | | | | 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
| * cmStrCat: use character literals where possibleBen Boeckel2025-05-151-2/+2
| | | | | | | | | | Found and replaced using the `cmstrcat-to-char-literal` rule for `ast-grep`.
* | StdIo: Replace uses of KWSys Terminal with StdIo::PrintBrad King2025-05-191-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Makefile: De-duplicate dependency message color codeBrad King2025-05-161-8/+8
|/
* LICENSE: Replace references to Copyright.txt with LICENSE.rstKitware Robot2025-03-031-1/+1
| | | | | | | | | | ``` 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 ```
* cmMakefileGenerator: Update GetConfigName to return const referenceMartin Duffy2025-02-091-1/+1
|
* instrumentation: Run preBuild and postBuild hooks before and after makeMartin Duffy2025-02-061-8/+53
| | | | | Updates the preBuild and postBuild instrumentation hooks to run before and after make is invoked.
* Revise C++ coding style using clang-format with "east const"Kitware Robot2025-01-231-41/+41
| | | | | | | | | | | | | | | 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
* instrumentation: Add targetLabels field to link snippetsMartin Duffy2025-01-171-0/+1
| | | | | Adds a new data field `targetLabels` to link snippets which contains a list of text labels from the LABELS target property.
* instrumentation: Collect and record project build system metricsMartin Duffy2025-01-151-6/+10
| | | | | | Add a feature for collecting build instrumentation for CMake projects. Issue: #26099
* Refactor: Optimize `ostream::operator<<()` calls for some generatorsAlex Turbov2024-12-111-128/+101
|
* Merge topic 'codegen-make'Brad King2024-12-111-26/+18
|\ | | | | | | | | | | | | | | | | | | 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
| * Makefile: Enable progress messages for codegen targetBrad King2024-12-101-2/+2
| | | | | | | | | | This was left out of commit 197cb419d1 (add_custom_command: Add CODEGEN support, 2024-05-27, v3.31.0-rc1~394^2).
| * Makefile: Fix per-directory codegen targetBrad King2024-12-101-0/+2
| | | | | | | | Issue: #26517
| * cmLocalUnixMakefileGenerator3: Simplify progress command generationBrad King2024-12-101-24/+14
| |
* | Link step: Add LINK_WARNING_AS_ERROR target propertyMarc Chevrier2024-11-121-0/+2
| | | | | | | | | | | | | | | | | | 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
* | COMPILE_WARNING_AS_ERROR: rename methods to prepare link similar functionalityMarc Chevrier2024-11-121-2/+4
|/ | | | | | Methods renamed: * SetIgnoreWasinigAsError => SetIgnoreCompileWasningAsError * GetIgnoreWasinigAsError => GetIgnoreCompileWasningAsError
* add_custom_command: Add CODEGEN supportJuan Ramos2024-07-011-0/+15
| | | | | | | | | | | 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.
* Source: Use cmValue::IsOn and IsOffVitaly Stakhovsky2024-03-171-3/+3
| | | | Speed up a bit by calling members directly.
* cmLocalUnixMakefileGenerator3: handle object-referencing Fortran modulesBen Boeckel2023-11-211-0/+11
| | | | | | 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.
* add_custom_{command,target}: Teach JOB_SERVER_AWARE about WORKING_DIRECTORYChris Mahoney2023-07-251-0/+9
| | | | Issue: #16273
* Makefiles: quote `$(COLOR)` expansionsBen Boeckel2023-06-081-1/+1
| | | | | | | | | | | | | | | | | 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
* Preserve --compile-no-warning-as-error in automatic CMake re-runsBrad King2023-05-301-2/+4
| | | | | | | | 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.
* CreateRulePlaceholderExpander(): enhance memory managementMarc Chevrier2023-05-041-2/+1
| | | | This method returns now a std::unique_ptr instance rather than a raw pointer.
* Link step: use linker dependency linker fileMarc Chevrier2023-05-031-0/+18
| | | | | | Based on work done by @ben.boeckel (!8051) Fixes: #22217
* cmLocalGenerator::MayBeRelativeToWorkDir: take care of all casesMarc Chevrier2023-05-021-1/+1
|
* CMake code rely on cmList class for CMake lists management (part. 2)Marc Chevrier2023-04-291-8/+7
|
* CMake code rely on cmList class for CMake lists management (part. 1)Marc Chevrier2023-04-241-6/+6
|
* RULE_LAUNCH_*: Add support for generator expressionsKyle Edwards2023-02-031-2/+4
|
* cmCustomCommandGenerator: refactor GetComment to return std::stringPeter Würth2022-11-191-3/+3
| | | | Refactoring was done because EvaluateComment leaked memory.
* Makefiles generator: dependencies messages in verbose modeMarc Chevrier2022-07-061-14/+23
| | | | Fixes: #23689
* cmSystemTools: Fix 'ErrorOccurred' spellingFeRD (Frank Dana)2022-06-131-2/+2
| | | | | | | | 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.
* Merge topic 'color-diagnostics'Brad King2022-03-091-1/+5
|\ | | | | | | | | | | | | | | | | | | | | 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
| * color: Introduce CMAKE_COLOR_DIAGNOSTICS variableSemyon Kolton2022-03-081-1/+5
| | | | | | | | | | | | | | Add a variable to control both makefile color messages and compiler color diagnostics. Fixes: #15502
* | cmOutputConverter: Always set relative path top source and binary togetherBrad King2022-02-281-7/+6
| | | | | | | | | | Refactor to set both at once so we have a single place in the code that knows both have been set.
* | Makefiles: Fix "make depend" with add_custom_command DEPFILEBrad King2022-02-281-1/+1
|/ | | | | | | | | | 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.
* Source: Avoid gcc 12 compilation warningBrad King2022-01-281-2/+2
| | | | | | | | | | | | | 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