summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmOutputConverter: Moved ContainedInDirectory to cmStateDirectoryBruno Manganelli2018-12-081-2/+1
|
* cmOutputConverter: Moved ForceToRelativePath to cmSystemBruno Manganelli2018-12-071-1/+1
|
* clang-tidy: Fix readability-static-accessed-through-instanceRegina Pfeifer2018-11-211-4/+4
| | | | Enable the check in .clang-tidy and fix all warnings.
* add_dependencies: Track backtraces internallyBrad King2018-10-181-2/+5
| | | | | Record backtraces for "utility" dependencies created by `add_dependencies` calls.
* cmLocalGenerator: Remove AddCompileDefinitions methodBrad King2018-10-101-2/+2
| | | | | | | This method offers the same definitions as `GetTargetDefines` except that it excludes the "export" macro on shared libraries. Update call sites to use `GetTargetDefines` instead. Some of them were incorrectly excluding the export macro.
* Merge topic 'provide_explicit_source_and_build_command_line_options'Brad King2018-09-191-2/+2
|\ | | | | | | | | | | | | | | | | 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-2/+2
| |
* | cmMakefile: Make GetSafeDefinition return std::string const&Vitaly Stakhovsky2018-09-181-1/+2
| |
* | Ninja,Makefile: Drop extra space after RULE_LAUNCH_CUSTOM valueBrad King2018-09-111-3/+1
|/ | | | | | | | | | | 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
* cmGeneratedFileStream: clang-tidy applied to remove redundant ``c_str`` callsSebastian Holtermann2018-08-071-6/+4
| | | | | | | | | | | | | | | 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-12/+14
| | | | | | | | | | | | 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.
* Add glob verify support to XCode, VS, Ninja, and Makefile generatorsShane Parris2018-04-021-1/+15
|
* Document and extend the CMAKE_SUPPRESS_REGENERATION variableShane Parris2018-02-231-20/+27
| | | | Fixes: https://gitlab.kitware.com/cmake/cmake/issues/16815
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-10/+9
| | | | | | | | | | * 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.
* 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.
* Reduce allocation of temporary values on heap.Pavel Solodovnikov2018-01-261-21/+25
| | | | | - Use `std::move` while inserting temporary results into vectors. - Change `push_back` to `emplace_back` where appropriate.
* LocalGenerator: refactoringMarc Chevrier2018-01-231-3/+3
| | | | | Introduce method AppendCompileOptions to support future source file property COMPILE_OPTIONS.
* Various typo fixesLuz Paz2018-01-031-1/+1
| | | | Some are user-facing. Others are source comments.
* Makefiles: Avoid nested make calls for Fortran module dependenciesYurii Batrak2017-12-141-0/+2
| | | | | | | | | | | | | | | | | | Makefiles generated by cmake use a series of nested calls to build `*.provides.build` targets that are used when the 'requires' step is needed. That leads to significant degradation of the build time for incremental builds. Re-arrange dependencies to eliminate the nested calls. Explicit `.mod.stamp` targets introduced by this commit could lead to situation when a stamp file always older than its dependency. This happens during the incremental build when building of an updated Fortran source produces a module file that has no differences from the stored stamp file. In such case `cmake_copy_f90_mod` will be triggered on each new build to compare a module file with the corresponding stamp file. This behavior is expected and can not be changed without nested calls that slow down the build. The copy-if-different check is much cheaper than an entire nested make call.
* Retire std::auto_ptr and its macro CM_AUTO_PTRMatthias Maennich2017-09-251-4/+4
| | | | Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Avoid using std::bind1st that is removed in C++17Brad King2017-09-231-2/+1
| | | | Use a lambda instead now that we require C++11.
* Meta: replace empty-string assignments with `clear()`.Pavel Solodovnikov2017-09-151-2/+2
|
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-131/+98
| | | | | | 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-8/+8
| | | | | | | | | | | 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.
* Remove second arg: npos in substr usagesPavel Solodovnikov2017-06-011-1/+1
|
* Access string npos without instancePavel Solodovnikov2017-06-011-9/+12
|
* cmLocalUnixMakefileGenerator3: Remove unnecessary local variableBrad King2017-06-011-2/+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
* 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.
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-2/+2
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* cmAlgorithms: add cmEraseIf functionDaniel Pfeifer2017-02-101-4/+1
|
* Makefiles: Make fast local and strip install truly fastMike Gelfand2017-01-131-2/+2
| | | | | | | | | | | When using a Makefiles generator, `install/local/fast` and `install/strip/fast` targets are not at all fast. They depend on `install/local` and `install/strip` targets respectively instead of `preinstall/fast` and don't contain any commands instead of repeating commands in `install/local` and `install/strip`. The issue was introduced by simple typos in commits v2.6.0~2825 (Adding install/local global target for Makefile generators, 2006-08-29) and v2.6.0~1743 (add install/strip target for makefile generators, 2007-05-18).
* CUDA: Enable header dependency scanning.Robert Maynard2016-11-141-1/+2
|
* CUDA: State that cuda has preprocessor output and can generate assembly.Robert Maynard2016-11-141-2/+2
| | | | We can consider PTX code to be a form of assembly.
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-9/+10
|
* 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 dependents to new cmStateTypes headerStephen Kelly2016-10-191-1/+1
|
* cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-9/+9
|
* cmRulePlaceholderExpander: Port clients to direct-useStephen Kelly2016-10-151-2/+6
| | | | | | 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 strings instead of a Target in rule replacementStephen Kelly2016-10-151-1/+2
| | | | Don't rely on the cmGeneratorTarget type needlessly.
* 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-3/+3
| | | | | | | | | 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.
* Makefiles: Extract identical code from conditionStephen Kelly2016-10-091-5/+2
|
* Makefiles: Replace array access with local variableStephen Kelly2016-10-091-5/+6
|
* Makefiles: Separate two coupled callsStephen Kelly2016-10-091-4/+3
|
* Merge topic 'nmake-encoding'Brad King2016-10-071-3/+8
|\ | | | | | | | | | | | | 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-3/+8
| | | | | | | | | | Set ANSI encoding to cmGeneratedFileStream for use with NMake Makefile generator.
* | Makefiles: Introduce local RelativePath methodStephen Kelly2016-10-061-10/+23
|/ | | | | | | This makes it easier to remove directory-specific state from cmOutputConverter where it doesn't belong. Of course, this just relocates the problem to the makefiles generator for now, but that's better than affecting the core.
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+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.