summaryrefslogtreecommitdiff
path: root/Source/cmLocalCommonGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmMakefile::GetDefinition: return cmPropVitaly Stakhovsky2020-09-021-2/+3
|
* cmMakefile: Refactor API to better handle empty config valuesRobert Maynard2020-07-031-4/+2
|
* XL: Fix using Fortran modules from their output directoryBrad King2020-02-281-0/+9
| | | | | | | | | | | | | | | The XL Fortran compiler's `-qmoddir=` flag sets the module output directory but does not add the directory to the search path for using modules. This is inconsistent with other compilers like the GNU Fortran compiler's `-J` flag that does both. In order to make these consistent, add the module output directory with a `-I` flag on the XL Fortran compiler so that it will be searched when using modules too. This fixes our `FortranModules` test's coverage of submodules on Ninja + XL. That test places module files in a subdirectory that with Ninja is not the current working directory when the compiler runs. Fixes: #20400
* Refactor: Prepare Ninja generator for multi-configKyle Edwards2019-12-131-7/+3
|
* cmLocalGenerator: Remove AppendFlags 'const char*' overloadBrad King2019-09-051-4/+2
| | | | | Update call sites to ensure the `std::string` argument can be constructed safely.
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is generated by a python script that uses regular expressions to search for string concatenation patterns of the kind ``` std::string str = <ARG0>; str += <ARG1>; str += <ARG2>; ... ``` and replaces them with a single `cmStrCat` call ``` std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...); ``` If any `<ARGX>` is itself a concatenated string of the kind ``` a + b + c + ...; ``` then `<ARGX>` is split into multiple arguments for the `cmStrCat` call. If there's a sequence of literals in the `<ARGX>`, then all literals in the sequence are concatenated and merged into a single literal argument for the `cmStrCat` call. Single character strings are converted to single char arguments for the `cmStrCat` call. `std::to_string(...)` wrappings are removed from `cmStrCat` arguments, because it supports numeric types as well as string types. `arg.substr(x)` arguments to `cmStrCat` are replaced with `cm::string_view(arg).substr(x)`
* 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-1/+1
|\ \ | |/ |/| | | | | | | | | 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-1/+1
| |
* | clang-tidy: Pass by valueRegina Pfeifer2019-01-221-3/+2
|/
* cmMakefile: Make GetRequiredDefinition return std::stringVitaly Stakhovsky2018-09-051-2/+1
| | | | | | | In all cases the return value is converted to std::string anyway. Also remove unnecessary `c_str()` calls in arguments to `GetRequiredDefinition`.
* Makefile,Ninja: De-duplicate ComputeObjectFilenames methodBrad King2018-01-291-0/+15
| | | | | Move the method implementation up to `cmLocalCommonGenerator` to avoid duplicating it in each generator.
* Meta: replace empty-string assignments with `clear()`.Pavel Solodovnikov2017-09-161-1/+1
|
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-3/+2
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* cmLocalCommonGenerator: Save CMAKE_BUILD_TYPE on constructionBrad King2017-05-151-8/+4
| | | | | | | | | | | | | | | 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
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-2/+3
|
* 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.
* Fortran: Use module dir flag if needed for default module directoryBrad King2016-09-201-1/+2
| | | | | | | | | | | | | | Our buildsystem model says that the default Fortran module output directory is the build tree directory corresponding to the source tree `CMakeLists.txt` file adding the current target. Extend `cmGeneratorTarget::GetFortranModuleDirectory` to allow generators to pass in the compiler working directory. If the working directory does not match the default Fortran module output directory then we need an explicit module directory flag (e.g. `-J`) to tell the compiler to put/use modules in the latter. This does not affect the Makefile generator but will be useful for future introduction of Fortran support to the Ninja generator.
* Common: Use a string instead of enum for WorkingDirectoryStephen Kelly2016-09-191-4/+6
|
* fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-0/+5
|
* Convert: Replace uses of Convert(NONE)Stephen Kelly2016-08-271-2/+1
| | | | These are equivalent to ConvertToOutputFormat.
* cmLocalGenerator: Add method to get Fortran-specific compiler flagsBrad King2016-06-171-0/+47
| | | | | | | | | | Add a cmLocalGenerator::GetTargetFortranFlags virtual method to get generator-specific generation of Fortran-specific flags. Implement it in cmLocalCommonGenerator by moving the implementation from cmCommonTargetGenerator::AddFortranFlags. This will allow it to be used without having a target generator available. Inspired-by: Tobias Hunger <tobias.hunger@qt.io>
* Refactor Makefile/Ninja tool working directory storageBrad King2016-06-171-2/+3
| | | | | Move cmCommonTargetGenerator::WorkingDirectory to cmLocalCommonGenerator and add an access method.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-8/+5
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * 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.
* cmLocalGenerator: Create from already-constructed cmMakefile.Stephen Kelly2015-08-281-2/+2
| | | | Don't manage the lifetime of the cmMakefile with cmLocalGenerator.
* cmLocalGenerator: Remove Parent pointer.Stephen Kelly2015-08-281-2/+1
|
* cmLocalCommonGenerator: Adopt ConfigName memberBrad King2015-07-091-0/+17
| | | | De-duplicate the member from the local Makefile and Ninja generators.
* Add common base classes to Makefile and Ninja generatorsBrad King2015-07-091-0/+23
Provide a place to move functionality common to both.