summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalUnixMakefileGenerator3.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'string-literal-append'Brad King2019-08-191-11/+5
|\ | | | | | | | | | | | | da26b3be89 avoid adding multiple consecutive string literals to std::string Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3698
| * avoid adding multiple consecutive string literals to std::stringRolf Eike Beer2019-08-181-11/+5
| | | | | | | | While at it change some single character additions to be of type char.
* | Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-1/+2
|/ | | | | | | | | This replaces invocations of - `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn` - `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND` - `cmSystemTools::IsOn` with `cmIsOn` - `cmSystemTools::IsOff` with `cmIsOff`
* Introduce memory management helper: cm_memory.hxxMarc Chevrier2019-07-141-1/+2
|
* IWYU: Fix handling of <memory> standard headerBrad King2019-07-101-0/+1
| | | | | | | | An old workaround for `std::allocator_traits<>::value_type` lints from IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`. Convert the workaround to use the same approach we already use for a workaround of `std::__decay_and_strip<>::::__type` lints. Then update the `<memory>` inclusions to follow the now-correct IWYU lints.
* Use cmAppend to append ranges to std::vector instancesSebastian Holtermann2019-05-231-4/+1
|
* Makefiles: Process ADDTIONAL_CLEAN_FILES dir prop at directory levelSebastian Holtermann2019-05-181-5/+9
| | | | | | | | | | | | | | In the "Unix Makefiles" generator, the `ADDTIONAL_CLEAN_FILES` directory property was evaluated on a per target basis. This had two drawbacks: - per directory clean files were repeated in every target clean script - per directory clean files weren't removed in directories without targets (issue #8164) This patch moves the `ADDTIONAL_CLEAN_FILES` directory property processing from the target to the directory level clean target. Fixes: #8164 "ADDITIONAL_CLEAN_FILES directory property not respected if no target present in directory"
* Makefiles: Make build root targets "all", "clean" and "preinstall" recursiveSebastian Holtermann2019-05-181-39/+24
| | | | | | | | | | | | | | | | | In the "Unix Makefiles" generator, the subdirectory targets "all", "clean" and "preinstall" in Makefile2 are recursive. In the build root directory, these targets aren't. Instead they're are added separately and additional dependencies are added on a per target basis. This is inconsistent and it complicates per directory commands, like a per directory clean command. This patch makes the "all", "clean" and "preinstall" targets in Makefile2 in the build root directory recursive, using the same algorithm that is already used for subdirectories. Some side effects are: - Makefile2 gets smaller and simpler - The main "all", "clean" and "preinstall" targets have recursive dependencies, instead of flat (depth of 1) ones.
* Makefiles: Avoid pointer repurposingSebastian Holtermann2019-05-171-4/+4
|
* Makefiles: Inline range loop range argumentsSebastian Holtermann2019-05-171-30/+14
|
* Source: std::string related cleanupVitaly Stakhovsky2019-05-151-1/+1
|
* Modernize: Enable modernize-raw-string-literal in clang-tidyArtur Ryt2019-04-021-3/+3
|
* Fix invalid ///! doxygen comment line startsSebastian Holtermann2019-03-311-1/+1
| | | | | In various places `///!` was used to start a comment line. This is not valid Doygen syntax. This patch replaces `///!` comment starts with `//!`.
* cmake: Teach --build mode to support multiple targetsBartosz Kosiorek2019-03-051-14/+20
| | | | Fixes: #16136
* cmGlobalGenerator: Change case of methods from GeneratedMakeCommand structBartosz Kosiorek2019-03-041-9/+9
|
* Merge topic 'add_consistent_verbose_build_flag'Brad King2019-01-291-8/+14
|\ | | | | | | | | | | | | | | | | | | | | | | 66801f4d40 cmake: Add tests for verbose output to --build mode 439fe2e253 cmake: Add options for verbose output to --build mode 638667efa2 cmake: cmcmd.cxx fix "The arguments are" comments 3ca4402966 ctest: Fix --build-and-test without --build-target on Xcode cb6c233ecc cmake: Add -hideShellScriptEnvironment xcodebuild option 1a45266cb5 cmGlobalGenerator: Add a class that represent the build command Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2708
| * cmake: Add options for verbose output to --build modeFlorian Maushart2019-01-281-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | While we already support `VERBOSE` environment variable and `CMAKE_VERBOSE_MAKEFILE` cached variable, add `-v` and `--verbose` command line options to be able to activate verbose output directly from CMake's build tool mode command line. Also make `msbuild` honor the verbosity setting. `xcodebuild` still doesn't honor the verbosity setting as it will need a policy added and reworking of cmGlobalGenerator and cmsys to support multiple command invocation.
| * cmGlobalGenerator: Add a class that represent the build commandRobert Maynard2019-01-251-7/+6
| | | | | | | | | | | | This refactors a std::vector<std::string> into a class so that we can extend the features to represent things such as multiple chained commands in the future.
* | Merge topic 'cmoutputconverter-simplify'Brad King2019-01-291-8/+13
|\ \ | | | | | | | | | | | | | | | | | | b6a957c969 cmOutputConverter: move ConvertToRelativePath to cmStateDirectory. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2831
| * | cmOutputConverter: move ConvertToRelativePath to cmStateDirectory.Bruno Manganelli2019-01-271-8/+13
| |/
* | Merge topic 'exclude_from_all'Brad King2019-01-251-2/+2
|\ \ | | | | | | | | | | | | | | | | | | dc6888573d Pass EXCLUDE_FROM_ALL from directory to targets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2816
| * | Pass EXCLUDE_FROM_ALL from directory to targetsZack Galbreath2019-01-211-2/+2
| | | | | | | | | | | | | | | | | | When a target is created it now inherits the EXCLUDE_FROM_ALL property from its directory. This change makes it possible to include a target in "all", even if its directory has been marked as EXCLUDE_FROM_ALL.
* | | Merge topic 'cmake-files-directory'Brad King2019-01-251-8/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3e867ed400 cmake: inlined files dir constant and removed it from cmake.h Acked-by: Kitware Robot <kwrobot@kitware.com> Rejected-by: vvs31415 <vstakhovsky@fastmail.com> Merge-request: !2655
| * | | cmake: inlined files dir constant and removed it from cmake.hBruno Manganelli2019-01-211-8/+8
| |/ /
* | | cmLocalUnixMakefileGenerator3: more methods accept std::stringVitaly Stakhovsky2019-01-221-9/+8
| |/ |/|
* | clang-tidy: Use emplaceRegina Pfeifer2019-01-171-6/+6
|/
* cmGlobalUnixMakefileGenerator3: Fix memory leak warningKyle Edwards2019-01-141-4/+4
| | | | | | | | this->Makefiles.empty() is called twice, leading clang scan-build to falsely believe that the delete statement was causing a memory leak. Fix this by using a unique_ptr to hold the temporary cmMakefile. This also has the benefit of making the code exception-safe.
* cmGeneratedFileStream: clang-tidy applied to remove redundant ``c_str`` callsSebastian Holtermann2018-08-071-6/+5
| | | | | | | | | | | | | | | After changing the ``cmGeneratedFileStream`` methods to accept ``std::string const&`` instead of ``const char*`` we don't need to call ``std::string::c_str`` anymore when passing a ``std::string`` to a ``cmGeneratedFileStream`` method. This patch removes all redundant ``std::string::c_str`` calls when passing a string to a ``cmGeneratedFileStream`` method. It was generated by building CMake with clang-tidy enabled using the following options: -DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-4.0;-checks=-*,readability-redundant-string-cstr;-fix;-fix-errors
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-8/+10
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * 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.
* cmake: Add options for parallel builds to --build modeFlorian Maushart2018-05-251-22/+23
| | | | | | | While we already support `cmake --build . -- -j`, the options after `--` are specific to the native build tool. Add new options `--parallel [<N>]` and `-j [<N>]` to abstract this and map to the proper option for the native build tool.
* Cleanup: Fix typos and grammar in docs and codeCraig Scott2018-04-221-1/+1
| | | No functional changes, just docs, comments and error messages.
* Add glob verify support to XCode, VS, Ninja, and Makefile generatorsShane Parris2018-04-021-0/+7
|
* Makefile: Fix "make clean" when there are no targetsBrad King2018-03-081-0/+4
| | | | | The empty `clean` target was missing from `Makefile2`. Add one like we already have for `all` and `preinstall`.
* Document and extend the CMAKE_SUPPRESS_REGENERATION variableShane Parris2018-02-231-5/+21
| | | | Fixes: https://gitlab.kitware.com/cmake/cmake/issues/16815
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-4/+3
| | | | | | | | | | * Change some functions to take `std::string` instead of `const char*` in the following classes: `cmMakeFile`, `cmake`, `cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator` and a few others. * Greatly reduce using of `const char*` overloads for `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`. * Remove many redundant `c_str()` conversions throughout the code.
* Reduce allocation of temporary values on heap.Pavel Solodovnikov2018-01-261-3/+3
| | | | | - Use `std::move` while inserting temporary results into vectors. - Change `push_back` to `emplace_back` where appropriate.
* Makefiles: Drop 'requires' step and its supporting infrastructureYurii Batrak2017-12-141-28/+0
| | | | | | | | The 'requires' step was used to provide implicit dependencies between the generated Fortran module files and a Fortran target that needs these module files to ensure the correct compilation order. After recent refactoring to resolve all dependencies explicitly through `.mod.stamp` make targets, the separate 'requires' step is not needed anymore.
* Replace empty-string comparisons with checking against `empty()`.Pavel Solodovnikov2017-09-211-2/+2
|
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-93/+58
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-4/+4
|
* Performance: Add an index to Change cmLocalGenerator::GeneratorTargets.Aaron Orenstein2017-08-161-11/+12
| | | | | | | | | | | Add an index to Change cmLocalGenerator::GeneratorTargets for faster lookup by name. Also changed a bunch of uses of cmLocalGenerator::GetGeneratorTargets() to take const references instead of copying the vector. Represent generator targets as a map (name -> target) to make name lookups more efficient instead of looping through the entire vector to find the desired one.
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-5/+6
|
* Avoid some copiesDaniel Pfeifer2016-10-301-1/+1
|
* cmState: Split auxiliary classes into separate filesStephen Kelly2016-10-191-0/+2
| | | | | | | Port dependents to the new locations as needed. Leave behind a cmState.h include in cmListFileCache to reduce noise. It is removed in a following commit.
* cmState: Port dependent code to new cmStateSnapshot nameStephen Kelly2016-10-191-6/+5
|
* cmState: Move CacheEntryType enum to separate namespaceStephen Kelly2016-10-191-1/+1
| | | | Port dependent code to the change.
* cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-30/+35
|
* Merge topic 'nmake-encoding'Brad King2016-10-071-1/+2
|\ | | | | | | | | | | | | c666f8cb NMake: Use ANSI encoding for NMake Makefiles f00214aa cmGeneratedFileStream: Add optional encoding support bb1d3370 codecvt: Add class for encoding conversion
| * NMake: Use ANSI encoding for NMake MakefilesDāvis Mosāns2016-10-061-1/+2
| | | | | | | | | | Set ANSI encoding to cmGeneratedFileStream for use with NMake Makefile generator.
* | Makefiles: Hardcode the relative location of the CMakeCache fileStephen Kelly2016-10-061-5/+1
|/ | | | | | In this context, currentBinDir refers to the CMAKE_BINARY_DIR because it comes from the first local generator. GetHomeOutputDirectory is the same as CMAKE_BINARY_DIR, so the computation here is unnecessary.