summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Ninja: Add support for additional clean filesSebastian Holtermann2019-05-141-7/+95
| | | | | | | | | Additional clean files for the Ninja generator can be registered via the new method `cmGlobalNinjaGenerator::AddAdditionalCleanFile`. If there are additional clean files, a new rule `CLEAN_ADDITIONAL` and a new build target `CMakeFiles/clean.additional` get generated. The `clean` target will depend on `CMakeFiles/clean.additional`, if the target exists.
* Ninja: Use clean target instead of clean tool in `cmake --target clean` callsSebastian Holtermann2019-05-131-5/+1
| | | | | | | A convenience `clean` target for the Ninja generator exists since commit 3bd41f2eb5. It's safe to call `ninja clean` instead of `ninja -t clean`. This removes the exception mapping of the `clean` target in `cmake --build ... --target clean` calls to the Ninja `-t clean` tool.
* Ninja: Inline range loop range argumentsSebastian Holtermann2019-05-121-22/+11
|
* Ninja: In cmGlobalNinjaGenerator use std::unique_ptr to manage output streamsSebastian Holtermann2019-05-111-20/+22
|
* Ninja: Add and use cmGlobalNinjaGenerator::CMakeCmd methodSebastian Holtermann2019-05-101-45/+46
|
* Ninja: Fix message in cmGlobalNinjaGenerator::WriteBuild methodSebastian Holtermann2019-05-101-5/+3
|
* Ninja: Simplify cmGlobalNinjaGenerator::AddRule and HasRule methodsSebastian Holtermann2019-05-101-7/+5
| | | | | - Use `std::unordered_set` for the emitted rule register - Use `std::unordered_map` for command length register
* Ninja: Simplify cmGlobalNinjaGenerator::WriteRule methodSebastian Holtermann2019-05-101-45/+31
|
* Modernize: Enable modernize-raw-string-literal in clang-tidyArtur Ryt2019-04-021-3/+3
|
* cmake_ninja_dyndep: don't duplicate slashesBen Boeckel2019-03-121-1/+1
|
* cmake: Teach --build mode to support multiple targetsBartosz Kosiorek2019-03-051-11/+17
| | | | Fixes: #16136
* cmGlobalGenerator: Change case of methods from GeneratedMakeCommand structBartosz Kosiorek2019-03-041-6/+6
|
* ninja: name dyndep internal files using the object fileBen Boeckel2019-02-251-4/+4
| | | | | Now that preprocessing outputs are not necessarily used all the way through, the output name is a better base name to use for these files.
* ninja: pass language to cmake_ninja_dependsBen Boeckel2019-02-251-37/+82
|
* ninja: make dyndep generation language awareBen Boeckel2019-02-251-11/+20
| | | | | A target may have multiple languages with dyndep rules, separate `.dd` files should be generated.
* Merge topic 'cmrange-improvements'Brad King2019-02-251-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | b8031308f3 cmRange: Add unit tests a8d51ef8b7 cmRange: Add functions filter and transform da4773e8b8 cmRange: Add functions all_of, any_of, none_of 17a367e77f cmRange: Stylistic cleanup 9eb0e73f46 cmRange: Move to dedicated header file Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Artur Ryt <artur.ryt@gmail.com> Merge-request: !2972
| * cmRange: Move to dedicated header fileRegina Pfeifer2019-02-211-0/+1
| |
* | cmSystemTools::Error: consolidate parameters into single std::stringVitaly Stakhovsky2019-02-201-31/+24
|/
* Merge topic 'fortran-submodule-names'Brad King2019-02-141-1/+11
|\ | | | | | | | | | | | | | | | | | | d80ecba5c2 Fortran: Fix submodule file names across compilers 72057d9c15 Fortran: Thread compiler id through to internal Fortran parser 7ae329e2ed Fortran: Factor out .mod and .smod file name construction Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Michael Hirsch, Ph.D. <michael@scivision.co> Merge-request: !2958
| * Fortran: Fix submodule file names across compilersBrad King2019-02-141-0/+6
| | | | | | | | | | | | | | | | | | The naming convention for submodule files varies across compilers. Add a table to the compiler information modules and thread the information through to the Fortran module dependency parser. Fill out the table for compiler ids known to support Fortran submodules. Fixes: #18746
| * Fortran: Thread compiler id through to internal Fortran parserBrad King2019-02-141-1/+5
| |
* | Modernize: Use ranged for-loops when possibleArtur Ryt2019-02-071-2/+1
|/ | | | | | | Replaced most manual `const_iterator`-based loops and some reverse-iterator loops with range loops. Fixes: #18858
* Ninja: Detect when ninja is new enough to support a multi-line depfileBrad King2019-01-301-0/+9
| | | | | | Ninja 1.9 supports the multi-line depfile format generated by the Intel Compiler for Windows. Teach the global generator to detect when the version is new enough to support this.
* Merge topic 'add_consistent_verbose_build_flag'Brad King2019-01-291-10/+7
|\ | | | | | | | | | | | | | | | | | | | | | | 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
| * cmGlobalGenerator: Add a class that represent the build commandRobert Maynard2019-01-251-10/+7
| | | | | | | | | | | | 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.
* | cmOutputConverter: move ConvertToRelativePath to cmStateDirectory.Bruno Manganelli2019-01-271-1/+1
|/
* clang-tidy: Use emplaceRegina Pfeifer2019-01-171-5/+5
|
* Properties: Add CMAKE_ROLE global propertyKyle Edwards2019-01-171-1/+1
| | | | | This property allows scripts to determine whether they're in project mode, script mode, find-package mode, CTest, or CPack.
* Factor out enum MessageType into dedicated headerBruno Manganelli2019-01-161-5/+9
| | | | Reduce the number of files relying on `cmake.h`.
* clang-tidy: Remove redundant member initializationsRegina Pfeifer2018-12-151-2/+0
|
* clang-tidy: Fix readability-static-accessed-through-instanceRegina Pfeifer2018-11-211-3/+5
| | | | Enable the check in .clang-tidy and fix all warnings.
* clang-tidy: fix warnings from version 7Regina Pfeifer2018-11-201-3/+3
| | | | | Fix some warnings that are new since clang-tidy version 4, and update `.clang-tidy` to suppress the rest.
* Using front() and back() instead of calculationsCengizhan Pasaoglu2018-11-061-1/+1
|
* add_dependencies: Track backtraces internallyBrad King2018-10-181-3/+5
| | | | | Record backtraces for "utility" dependencies created by `add_dependencies` calls.
* Merge topic 'provide_explicit_source_and_build_command_line_options'Brad King2018-09-191-1/+1
|\ | | | | | | | | | | | | | | | | 638f00117a Add release note for the -S and -B options. de962cc00d CMake: Internally uses -S instead of -H to specify source directory a10d63d578 cmake: -S and -B can be used to specify source and build directories Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2358
| * CMake: Internally uses -S instead of -H to specify source directoryRobert Maynard2018-09-151-1/+1
| |
* | cmMakefile: Make GetSafeDefinition return std::string const&Vitaly Stakhovsky2018-09-181-6/+6
|/
* Merge topic 'lg-directory'Brad King2018-08-281-2/+1
|\ | | | | | | | | | | | | 50fbfee3a0 cmLocalGenerator: return directories as const std::string& Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2309
| * cmLocalGenerator: return directories as const std::string&Vitaly Stakhovsky2018-08-271-2/+1
| |
* | Merge topic 'ninja-generator-do-not-add-alias-matching-custom-command-output'Brad King2018-08-271-0/+6
|\ \ | |/ |/| | | | | | | | | | | 180c2f8de8 Ninja: Fix dupbuild error skipping alias with conflicting custom command Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Isaiah <isaiah.norton@gmail.com> Merge-request: !2276
| * Ninja: Fix dupbuild error skipping alias with conflicting custom commandJean-Christophe Fillion-Robin2018-08-091-0/+6
| | | | | | | | | | | | See-also: https://issues.slicer.org/view.php?id=4595 Reported-by: Isaiah Norton <inorton@bwh.harvard.edu>
* | cmGeneratedFileStream: clang-tidy applied to remove redundant ``c_str`` callsSebastian Holtermann2018-08-071-8/+7
|/ | | | | | | | | | | | | | | 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-3/+4
| | | | | | | | | | | | 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-1/+7
| | | | | | | 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.
* Ninja: Make assumed source dependencies order-onlyBrad King2018-04-261-3/+5
| | | | | | | | | | | Since its beginning the Ninja generator has handled `GENERATED` source files that have no custom command producing them by writing a dummy custom command for them that depends on the target ordering phony edge. Make the custom command's dependency order-only since the phony edge also has only order-only dependencies. The dummy custom command should never be considered "dirty" by `ninja`. Fixes: #17942
* Fortran: Refactor to treat .mod extension as part of module nameBrad King2018-04-201-1/+1
| | | | | | When tracking module names internally, include the `.mod` extension. This will later be useful to distinguish them from `.smod` extensions for submodules.
* Ninja: Drop unnecessary ident encoding logic for pathsBrad King2018-04-191-31/+9
| | | | | | 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-6/+71
|
* Document and extend the CMAKE_SUPPRESS_REGENERATION variableShane Parris2018-02-231-5/+10
| | | | Fixes: https://gitlab.kitware.com/cmake/cmake/issues/16815
* Ninja: Don't add custom command outputs to phony rule for CMake inputsPatrick Stewart2018-02-151-1/+7
|