summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalNinjaGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmSystemTools::Error: consolidate parameters into single std::stringVitaly Stakhovsky2019-02-201-2/+2
|
* Modernize: Use ranged for-loops when possibleArtur Ryt2019-02-071-3/+5
| | | | | | | Replaced most manual `const_iterator`-based loops and some reverse-iterator loops with range loops. Fixes: #18858
* Merge topic 'tidy-use-equals-default'Brad King2019-01-291-3/+1
|\ | | | | | | | | | | | | | | | | 094f01d0f0 cleanup: Prefer compiler provided special member functions 55671b41d2 clang-tidy: Use `= default` Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Brad King <brad.king@kitware.com> Merge-request: !2841
| * clang-tidy: Use `= default`Regina Pfeifer2019-01-251-3/+1
| | | | | | | | | | | | Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and `Source/cmUVHandlePtr.h` where a few older compilers require a user-defined default constructor (with `{}`).
* | Merge topic 'cmoutputconverter-simplify'Brad King2019-01-291-4/+5
|\ \ | | | | | | | | | | | | | | | | | | 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-4/+5
| |/
* | Merge topic 'exclude_from_all'Brad King2019-01-251-3/+1
|\ \ | | | | | | | | | | | | | | | | | | 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-3/+1
| |/ | | | | | | | | | | 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.
* | cmake: inlined files dir constant and removed it from cmake.hBruno Manganelli2019-01-211-2/+2
|/
* cmLocalNinjaGenerator: Prevent echoing of lines in ninja generated batch filesMark O'Neill2018-12-061-0/+1
|
* cmLocalNinjaGenerator: Report line of failure in ninja generated batch fileMark O'Neill2018-12-061-2/+14
| | | | Fixes: 18676
* cmLocalNinjaGenerator: Propagate failures from batch file back to ninjaMark O'Neill2018-12-061-1/+1
| | | | Fixes: #18676
* clang-tidy: Fix readability-static-accessed-through-instanceRegina Pfeifer2018-11-211-4/+3
| | | | Enable the check in .clang-tidy and fix all warnings.
* cmLocalNinjaGenerator: Simplify CreateRulePlaceholderExpanderMateusz Zych2018-10-261-2/+2
| | | | Re-use the derived class implementation instead of duplicating it.
* Ninja,Makefile: Drop extra space after RULE_LAUNCH_CUSTOM valueBrad King2018-09-111-5/+2
| | | | | | | | | | | The Ninja and Makefile generators were adding a space to the value both before and after expanding rule variables. Only the latter is needed. While at it, revise some outdated comments since the rule variable expansion is no longer responsible for inserting the launcher. Suggested-by: Mate Pek <mate.pek@gmail.com> Fixes: #18340
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-3/+3
| | | | | | | | | | | | 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.
* Ninja: Drop unnecessary ident encoding logic for pathsBrad King2018-04-191-2/+1
| | | | | | The only uses of `EncodeIdent` are surrounding `EncodePath`, but the special ident encoding is not needed for path contexts in a ninja build manifest.
* Add glob verify support to XCode, VS, Ninja, and Makefile generatorsShane Parris2018-04-021-0/+10
|
* Ninja: Generate scripts for long custom command sequencesRoger Leigh2018-02-061-4/+84
| | | | | | | | | | | | Ninja runs just one command line for every build statement, so the Ninja generator needs to `&&`-chain multiple commands together into one long string. For long custom command sequences this can exceed the maximum command-line length for the operating system. In such cases, write the commands out to a script instead, and then run the script from Ninja's one command line. Co-Author: Brad King <brad.king@kitware.com> Fixes: #15612
* Makefile,Ninja: De-duplicate ComputeObjectFilenames methodBrad King2018-01-291-14/+0
| | | | | Move the method implementation up to `cmLocalCommonGenerator` to avoid duplicating it in each generator.
* Ninja: add CMAKE_JOB_POOLS variable as default for JOBS_POOLSMatt McCormick2017-11-291-0/+3
| | | | | | | | | | | This enables configuration of build parallelism with the Ninja generator by passing arguments on the command line to CMake. For example, cmake \ '-DCMAKE_JOB_POOLS:STRING=compile=5;link=2' \ -DCMAKE_JOB_POOL_COMPILE:STRING=compile \ -DCMAKE_JOB_POOL_LINK:STRING=link \ ~/src/MyProject
* Retire std::auto_ptr and its macro CM_AUTO_PTRMatthias Maennich2017-09-251-2/+2
| | | | Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Meta: replace empty-string assignments with `clear()`.Pavel Solodovnikov2017-09-151-1/+1
|
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-23/+17
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* Performance: Add an index to Change cmLocalGenerator::GeneratorTargets.Aaron Orenstein2017-08-161-2/+2
| | | | | | | | | | | 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.
* Add const-reference qualificationsPavel Solodovnikov2017-05-261-1/+1
|
* cmLocalCommonGenerator: Save CMAKE_BUILD_TYPE on constructionBrad King2017-05-151-2/+0
| | | | | | | | | | | | | | | Copy the value to our `ConfigName` member on construction to ensure it is available even to code paths that run before `Generate`. We once needed to delay this lookup until `Generate` because the local generators were at one time created before `Configure`. Now they are created at generate time which is late enough to expect `CMAKE_BUILD_TYPE` to be available. Without this, `cmGlobalUnixMakefileGenerator3::WriteConvenienceRules` causes use of `ConfigName` before it is populated which breaks use of source files that depend on the `$<CONFIG>` generator expression. Fixes: #16889
* Merge topic 'split-sysroot'Brad King2017-05-111-2/+3
|\ | | | | | | | | | | | | 53e89b6a Add options for separate compile and link sysroots Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !819
| * Add options for separate compile and link sysrootsBrad King2017-05-091-2/+3
| | | | | | | | | | | | | | | | | | Add `CMAKE_SYSROOT_COMPILE` and `CMAKE_SYSROOT_LINK` variables to as operation-specific alternatives to `CMAKE_SYSROOT`. This will be useful for Android NDKs that compile and link with different sysroot values (e.g. `r14` with unified headers). Co-Author: Florent Castelli <florent.castelli@gmail.com>
* | Ninja: Fix command concatenation on WindowsBernhard Burgermeister2017-05-091-1/+7
|/ | | | | | | | | | | Put commands that contain `||` into brackets to avoid early abort of execution by `cmd.exe` because `||` has higher precedence than `&&` in `cmd.exe`. Add test to check for command execution after `||` as part of a parameter and as command separator. Fixes: #16850
* Merge topic 'loosen-object-deps'Brad King2017-04-241-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | d96e5d9a Tests: use BYPRODUCTS in the CustomCommandWorkingDirectory test 664591ce RunCMake.Ninja: add a test for assumed sources adf60b28 ninja: break unnecessary target dependencies 01c5bb95 RunCMake.Ninja: support passing arguments when running ninja 7f947b60 ninja: remove duplicate order-only dependencies e9827eba ninja: describe the intermediate order depends target better b57b7d8e Ninja: Order Fortran dyndep file generation explicitly Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !430
| * ninja: break unnecessary target dependenciesBen Boeckel2017-04-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, given two libraries, X and Y where X depends on Y, all object compilations of X would require the Y library to have been linked before being compiled. This is not necessary and can instead be loosened such that object compilations of X only depend on the order-only dependencies of Y to be completed. This is to ensure that generated sources, headers, custom commands, etc. are completed before X starts to compile its objects. This should help build performance in projects with many libraries which cause a deep library dependency chain. Previously, a library at the bottom would not start compilation until after all other libraries completed, but now only its link step needs to wait and its compilation jobs can be run in parallel with other tasks. Fixes: #15555
* | CUDA: Allow sources to be compiled to .ptx filesRobert Maynard2017-04-201-2/+5
|/ | | | | When the target property `CUDA_PTX_COMPILATION` is enabled CUDA OBJECT libraries will generate ptx files instead of object files.
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-7/+8
|
* Ninja: Fix POST_BUILD noop on WindowsBrad King2016-10-281-6/+2
| | | | | | Use `cd .` instead of `:` in a Windows shell. Closes: #16393
* cmListFileCache: Remove cmState header includeStephen Kelly2016-10-191-0/+1
| | | | | Include it in dependents which have previously relied on it transitively.
* cmState: Port dependents to new cmStateTypes headerStephen Kelly2016-10-191-1/+1
|
* cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-1/+1
|
* cmRulePlaceholderExpander: Port clients to direct-useStephen Kelly2016-10-151-3/+15
| | | | | | Add a factory function to cmLocalGenerator so that variableMappings can be provided from it, and so that Ninja can always have a hard-coded TargetImpLib.
* cmLocalGenerator: Use a converter in rule replacement APIStephen Kelly2016-10-151-1/+1
| | | | | | | The rule replacement API should not really be in cmLocalGenerator, but it was historically, and this coupled many other things together here too, such as output conversion. Make the output converter a parameter so that rule replacement can be removed from cmLocalGenerator.
* cmLocalGenerator: Remove the launcher from RuleVariablesStephen Kelly2016-10-151-4/+6
| | | | | | | | | This one is not like the others as it doesn't participate in substitutions. Keep ExpandRuleVariables doing only one thing and make callers responsible for inserting a launcher prefix, simplifying the code all-around. Remove now-obsolete InsertRuleLauncher method.
* cmLinkLineComputer: Extract from cmLocalGeneratorStephen Kelly2016-10-101-6/+0
| | | | | | | | | | | CMake has several classes which have too many responsibilities. cmLocalGenerator is one of them. Start to extract the link line computation. Create generator-specific implementations of the interface to account for generator-specific behavior. Unfortunately MSVC60 has different behavior to everything else and CMake still generates makefiles for it. Isolate it with MSVC60-specific names.
* Ninja: Extract identical code from conditionStephen Kelly2016-10-081-3/+1
|
* Ninja: Replace array access with local variableStephen Kelly2016-10-071-4/+4
|
* Ninja: Separate two coupled callsStephen Kelly2016-10-071-4/+3
|
* cmLocalGenerator: Simplify ConvertToLinkReferenceStephen Kelly2016-10-061-3/+2
| | | | | Make conversion to output format the caller responsibility, so that the method only 'converts to a link reference'.
* Simplify CMake per-source license noticesBrad King2016-09-271-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* Convert: Inline uses of START_OUTPUTStephen Kelly2016-09-191-2/+4
|
* Convert: Inline uses of HOME_OUTPUTStephen Kelly2016-09-191-1/+2
|
* Common: Use a string instead of enum for WorkingDirectoryStephen Kelly2016-09-191-1/+1
|