summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsFortran.cxx
Commit message (Collapse)AuthorAgeFilesLines
* IWYU: Update for Debian 12 CI jobBrad King2023-07-281-0/+1
| | | | | | `include-what-you-use` diagnostics, in practice, are specific to the environment's compiler and standard library. Update includes to satisfy IWYU for our CI job under Debian 12.
* codespell: Fix typosBrad King2023-05-221-1/+1
|
* CMake code rely on cmList class for CMake lists management (part. 2)Marc Chevrier2023-04-291-5/+5
|
* cmDependsFortran: require that dependency info files workBen Boeckel2023-02-011-5/+11
| | | | | Now that only targets expected to have information are listed, all `DependInfo.cmake` files should exist.
* cmMakefileTargetGenerator: make "target linked info" variable Fortran-specificBen Boeckel2023-02-011-1/+1
| | | | This variable is Fortran-specific, so clarify that through its name.
* clang-tidy: fix `performance-unnecessary-copy-initialization` lintsBen Boeckel2022-05-241-1/+1
|
* Merge topic 'IntelLLVM-Fortran-copy-mod'Brad King2021-11-181-1/+1
|\ | | | | | | | | | | | | 209b896f2c IntelLLVM: Enable Fortran module rebuild avoidance in Makefile generators Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6740
| * IntelLLVM: Enable Fortran module rebuild avoidance in Makefile generatorsBrad King2021-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | The Makefile generators use an internal `cmake -E cmake_copy_f90_mod` tool to avoid rebuilding module consumers when the `.mod` content changes only in a trivial way (e.g. the time it was built). This is done with logic specific to each vendor's module file format. Enable the "Intel" format support when using the IntelLLVM compiler (ifx) too. Issue: #22922
* | Rename cmProp in cmValueMarc Chevrier2021-09-211-2/+2
| |
* | Makefiles: Add support for building Fortran intrinsicsIsuru Fernando2021-06-241-3/+14
| | | | | | | | Fixes: #21463
* | cmLocalGenerator: Factor out relative path conversion helpersBrad King2021-05-131-19/+10
| | | | | | | | | | | | Most calls to `MaybeConvertToRelativePath` use one of our common work directories (e.g. top of the build tree) as the local path. Add helpers for each of the common cases to simplify and clarify call sites.
* | cmDependsFortran: Simplify relative path conversion helperBrad King2021-05-131-7/+1
|/ | | | | | Revert commit 8377d9e00b (Fortran: Inline conversion to relative path, 2016-10-04, v3.8.0-rc1~494^2~4). The inline implementation is still identical to what was previously called. Restore the call again.
* cmDepends: merge dependers of depend makefileKai Wang2021-01-051-7/+22
| | | | | | | | | | | Since one depender has multiple dependees, depend makefile generated same depender line by line, to reduce file size and refine make file parse speed, merge same dependers to one. And add a testcase for large depend.make which generated source file includes 20000 header files and run build and incremental build Signed-off-by: Wangkai <wangkai86@huawei.com> Signed-off-by: Zhaoyingdong <zhaoyingdong@huawei.com>
* cmMakefile::GetDefinition: return cmPropVitaly Stakhovsky2020-09-021-2/+3
|
* Source: use cmNonempty()Vitaly Stakhovsky2020-07-281-1/+1
|
* cmMakefile: add GetDefExpandList() that splits value into std::vectorVitaly Stakhovsky2020-05-301-8/+2
| | | | Combines cmMakefile:GetDefinition() and cmExpandList()
* Merge topic 'makefile-target-special'Brad King2020-04-161-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | a4173ef165 Tests: Enable coverage of special chars in include dirs for Makefiles d74e651b78 Makefiles: Re-implement makefile target path escaping and quoting 031bfaa865 Makefiles: Factor out makefile target path escaping and quoting ca343dad07 Makefiles: Convert paths with '#' on command-lines to short path on Windows af7de05853 Makefiles: Do not use '\#' escape sequence with Windows-style make tools 1639ee70ef cmDepends: Update types to always use a Makefile generator 413d26030f cmGlobalNinjaGenerator: Remove outdated comment Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4605
| * cmDepends: Update types to always use a Makefile generatorBrad King2020-04-131-2/+2
| | | | | | | | | | | | We only use these classes with a `cmLocalUnixMakefileGenerator3`. Construct using that type instead of just `cmLocalGenerator` so that the Makefile-specific methods are available.
* | clang-tidy: address bugprone-branch-clone lintsBen Boeckel2020-04-131-3/+1
|/ | | | | | | | | Arguably, many of these are bugs in `clang-tidy`. An if/else tree with other conditionals between cloned blocks may be relying on the intermediate logic to fall out of the case and inverting this logic may be non-trivial. See: https://bugs.llvm.org/show_bug.cgi?id=44165
* Refactor: Avoid `std::endl` where it's not necessary (part 2)Alex Turbov2020-03-241-19/+18
| | | | | | | | | | | | The `std::endl` manipulator, except inserting `\n` character, also performs `os.flush()`, which may lead to undesired effects (like disk I/O in the middle of forming data strings). For the `std::stringstream` it also has no meaning. * replace multiple `operator<<` calls on a string literal w/ the only call and the only (bigger) string literal; * replace one character string literal used in `operator<<` w/ a char literal.
* Modernize memory managementMarc Chevrier2020-03-051-4/+1
| | | | Update internals of various classes.
* Fortran: Add support for NAG Fortran submodulesNeil Carlson2020-01-151-2/+6
| | | | | | They use a `.sub` extension. Fixes: #20220
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-1/+2
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-2/+2
|
* clang-tidy: modernize-use-autoRegina Pfeifer2019-09-101-9/+3
| | | | | | Set the MinTypeNameLength option to an impossibly high value in order to limit the diagnostics to iterators. Leave new expressions and cast expressions for later.
* clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-041-2/+2
| | | | | | | | Automate the conversion with perl -i -0pe 's/typedef ([^;]*) ([^ ]+);/using $2 = $1;/g' then manually fix a few places.
* clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-031-4/+4
|
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-31/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)`
* Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgumentSebastian Holtermann2019-08-141-2/+2
|
* cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.hSebastian Holtermann2019-07-291-1/+1
| | | | | This adds the `cmStringAlgorithms.h` header and moves all string functions from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
* Modernize: Prefer .substr in place of .c_str() + intArtur Ryt2019-03-301-1/+1
| | | | | | A lot of temporary/local strings were created out of C-strings substr can utilize current string size, so in theory be a little more efficient.
* Fortran: Fix submodule file names across compilersBrad King2019-02-141-0/+4
| | | | | | | | | 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/+6
|
* 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 `{}`).
* cmDepends: all members accept std::string argumentsVitaly Stakhovsky2019-01-191-30/+28
| | | | | | Most `const char*` arguments converted to `const std::string&` in `cmDepends` and derived classes. In addition performed minor code cleanup.
* clang-tidy: Use default member initializationRegina Pfeifer2018-12-151-1/+0
|
* cmOutputConverter: Moved ContainedInDirectory to cmStateDirectoryBruno Manganelli2018-12-081-2/+2
|
* cmOutputConverter: Moved ForceToRelativePath to cmSystemBruno Manganelli2018-12-071-1/+1
|
* cmGeneratedFileStream: clang-tidy applied to remove redundant ``c_str`` callsSebastian Holtermann2018-08-071-2/+2
| | | | | | | | | | | | | | | 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
* Fortran: Add support for submodule dependenciesBrad King2018-04-201-2/+5
| | | | | | | | | | | | | | | | | | | | | Since commit v3.7.0-rc1~73^2~1 (Fortran: Add support for submodule syntax in dependency scanning, 2016-09-05) we support parsing Fortran sources that use submodule syntax, but it left addition of `.smod` dependencies to future work. Add it now. The syntax submodule (module_name) submodule_name means the current source requires `module_name.mod` and provides `module_name@submodule_name.smod`. The syntax submodule (module_name:submodule_name) nested_submodule_name means the current source requires `module_name@submodule_name.smod` provides `module_name@nested_submodule_name.smod`. Fixes: #17017
* Fortran: Refactor to treat .mod extension as part of module nameBrad King2018-04-201-19/+37
| | | | | | When tracking module names internally, include the `.mod` extension. This will later be useful to distinguish them from `.smod` extensions for submodules.
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-10/+10
| | | | | | | | | | * 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.
* Various typo fixesLuz Paz2018-01-031-1/+1
| | | | Some are user-facing. Others are source comments.
* Makefiles: Drop 'requires' step and its supporting infrastructureYurii Batrak2017-12-141-31/+1
| | | | | | | | 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.
* Makefiles: Avoid nested make calls for Fortran module dependenciesYurii Batrak2017-12-141-5/+19
| | | | | | | | | | | | | | | | | | 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.
* 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-54/+37
| | | | | | 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-1/+1
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-1/+1
| | | | | | | | | | | | | 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'
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-8/+9
|