summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Source: Replace most calls to sprintf with snprintfSean McBride2021-10-251-3/+3
|
* Rename cmProp in cmValueMarc Chevrier2021-09-211-15/+15
|
* HIP: Add language to CMakeRobert Maynard2021-06-071-4/+4
|
* cmOutputConverter: Adopt relative path conversion helpersBrad King2021-05-171-9/+4
| | | | Move them up from cmLocalGenerator and out of cmStateDirectory.
* cmLocalCommonGenerator: Select work directory semanticallyBrad King2021-05-131-1/+1
|
* cmLocalGenerator: Factor out relative path conversion helpersBrad King2021-05-131-39/+24
| | | | | | 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.
* clang-tidy: fix `readability-qualified-auto` warningsBen Boeckel2021-01-271-3/+3
|
* Code style: add missed explicit 'this->'Oleksandr Koval2021-01-051-2/+2
| | | | | CMake uses explicit 'this->' style. Using custom clang-tidy check we can detect and fix places where 'this->' was missed.
* Makefiles: Add support of DEPFILE for add_custom_commandMarc Chevrier2020-12-231-12/+27
| | | | | Issue: #20286 Fixes: #21415
* Makefiles Generators: use compiler for dependencies generationMarc Chevrier2020-11-291-199/+330
| | | | | | | | | | | 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
* Refactoring: enhance include file filteringMarc Chevrier2020-11-281-24/+14
| | | | | In preparation of support of 'CMAKE_DEPENDS_IN_PROJECT_ONLY' when dependencies are generated by the compiler.
* Refactoring: Makefiles Generators: Add support for various depends scannersMarc Chevrier2020-11-281-4/+6
|
* cmLocalGenerator::GetRuleLauncher: return cmPropvvs314152020-11-021-2/+2
|
* Makefile: Add policy CMP0113 to avoid duplication of custom commandsBrad King2020-09-081-0/+10
| | | | | | | | | | | | | | | | | 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.
* cmLocalUnixMakefileGenerator3: Generate targets in dependency orderBrad King2020-09-041-3/+4
| | | | | Use the globally computed target ordering so that we generate all of a target's dependencies before generating the target itself.
* cmMakefile::GetDefinition: return cmPropVitaly Stakhovsky2020-09-021-18/+17
|
* Add ISPC compiler support to CMakeRobert Maynard2020-08-281-2/+4
|
* Source: use cmNonempty()Vitaly Stakhovsky2020-07-281-1/+1
|
* Factor out generator checks for filtering on non-compiling targetsBrad King2020-07-231-2/+1
| | | | | Add a `cmGeneratorTarget::CanCompileSources` helper method to tell generators whether a target might compile anything.
* Factor out generator checks for filtering out interface librariesBrad King2020-07-231-1/+1
| | | | | | Add a `cmGeneratorTarget::IsInBuildSystem` helper method to tell generators whether a target should participate in the generated build system.
* cmLocalUnixMakefileGenerator3: Skip object file listing for custom targetsBrad King2020-07-231-1/+2
|
* Fix typos identified using codespellJean-Christophe Fillion-Robin2020-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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,\ " ```
* cmNonempty: Convenience inlines to check for non-empty stringVitaly Stakhovsky2020-07-141-1/+1
|
* Makefile: Fix regression in .SILENT ruleDaniel Colascione2020-06-221-3/+4
| | | | | | | | | | | | | | | | | | | | 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:
* Single location for cmProp typedefVitaly Stakhovsky2020-06-011-0/+1
|
* cmGeneratorTarget::GetProperty: return cmPropVitaly Stakhovsky2020-04-291-6/+4
|
* Merge topic 'makefile-objc'Brad King2020-04-281-1/+1
|\ | | | | | | | | | | | | | | 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
| * Makefiles: Scan Objective C/C++ preprocessor dependenciesBrad King2020-04-281-1/+1
| | | | | | | | Fixes: #20635
* | Makefiles: Factor out makefile target path escaping and quotingBrad King2020-04-151-39/+16
| | | | | | | | | | | | | | | | 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.
* | cmMakefile::GetProperty: return cmPropVitaly Stakhovsky2020-04-011-4/+4
| |
* | Merge topic 'cleanup-endls-1'Brad King2020-03-271-16/+12
|\ \ | | | | | | | | | | | | | | | | | | 3fdd8db3aa Refactor: Avoid `std::endl` where it's not necessary (part 1) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4513
| * | Refactor: Avoid `std::endl` where it's not necessary (part 1)Alex Turbov2020-03-261-16/+12
| | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge topic 'make-nested-silent'Brad King2020-03-271-1/+5
|\ \ \ | | |/ | |/| | | | | | | | | | | | | d6d9da5178 Makefiles: Fix silencing of nested calls for GNU make 4.3 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4515
| * | Makefiles: Fix silencing of nested calls for GNU make 4.3Brad King2020-03-261-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge topic 'string-prefix'Brad King2020-03-261-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | replace "std::string::find(x) == 0" with cmHasPrefix()Rolf Eike Beer2020-03-231-1/+1
| | | |