summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsFortran.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* cmState: Split auxiliary classes into separate filesStephen Kelly2016-10-191-0/+1
| | | | | | | 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.
* Fortran: Inline conversion to relative pathStephen Kelly2016-10-061-1/+5
| | | | | Don't use cmOutputConverter method which relies on directory-specific state.
* Fortran: Wrap path convert in a call with a more-suitable nameStephen Kelly2016-10-061-20/+21
|
* 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.
* Convert: Move access to BinaryDirectory out of loopsStephen Kelly2016-09-191-4/+2
|
* Convert: Inline uses of HOME_OUTPUTStephen Kelly2016-09-191-4/+8
|
* Convert: Move access to BinaryDirectory out of loopsStephen Kelly2016-09-191-28/+12
|
* Convert: Inline HOME_OUTPUT MAKERULE conversionStephen Kelly2016-09-191-14/+30
|
* Convert: Inline MAKERULE conversionsStephen Kelly2016-09-191-2/+1
| | | | This is a trivial use of a static method.
* Convert: Avoid HOME_OUTPUT enum when converting to relative pathsStephen Kelly2016-09-191-1/+1
|
* Convert: Move access to CurrentBinaryDirectory out of loopsStephen Kelly2016-09-191-8/+8
|
* Convert: Avoid START_OUTPUT enum when converting to relative pathsStephen Kelly2016-09-191-3/+5
|
* cmDependsFortran: simplify boolean expressionDaniel Pfeifer2016-09-121-6/+1
|
* Fortran: Warn when dependency scanning fails to parse a source fileBrad King2016-09-061-0/+6
| | | | | | We expect to handle all relevant statements and ignore those that we do not understand. Warn if this process ever fails. Otherwise dependency information may be silently left out.
* fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-1/+7
|
* Convert: Replace trivial conversion with new methodStephen Kelly2016-08-271-5/+5
|
* Merge topic 'intel-fortran-mod-diff'Brad King2016-08-251-0/+6
|\ | | | | | | | | f699323a Fortran: Fix .mod file comparison for Intel 16 format
| * Fortran: Fix .mod file comparison for Intel 16 formatBrad King2016-08-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | The Intel 16 format starts with the 0x0A 0x00 sequence that we use to skip past the timestamp. This occurrence appears to be a version number. Skip the first byte to avoid matching the sequence early. Ideally we should gain a better understanding of the format and avoid depending on short sequences that are likely to appear early by coincidence, but this approach will suffice for now. Closes: #16263
* | CMake: don't use else after returnDaniel Pfeifer2016-08-181-1/+2
| |
* | Make sure unnused parameters are /*named*/Daniel Pfeifer2016-08-161-2/+3
| |
* | use CM_NULLPTRDaniel Pfeifer2016-06-281-1/+1
| |
* | Remove redundant arguments from fstream constructorsDaniel Pfeifer2016-06-141-2/+2
| | | | | | | | Don't pass the default value of the openmode parameter explicitly.
* | Simplify boolean expressionsDaniel Pfeifer2016-06-021-3/+2
|/ | | | | | Use clang-tidy's readability-simplify-boolean-expr checker. After applying the fix-its, revise all changes *very* carefully. Be aware of false positives and invalid changes.
* Merge topic 'improve-character-find-and-replace'Brad King2016-05-251-1/+1
|\ | | | | | | | | | | | | | | 5784747d Improve string find: prefer character overloads. 5cec953e Use std::replace for replacing chars in strings. 2a1a2033 cmExtraEclipseCDT4Generator: use std::replace. 34bc6e1f cmCTestScriptHandler: don't call find repeatedly.
| * Improve string find: prefer character overloads.Daniel Pfeifer2016-05-241-1/+1
| | | | | | | | | | Apply fix-its from clang-tidy's performance-faster-string-find checker. Ignore findings in kwsys.
* | Use enums defined in cmOutputConverter using their fully qualified name.Daniel Pfeifer2016-05-251-20/+20
|/ | | | | | | | | Mostly automated: values=("RelativeRoot" "NONE" "FULL" "HOME" "START" "HOME_OUTPUT" "START_OUTPUT" "OutputFormat" "UNCHANGED" "MAKERULE" "SHELL" "WATCOMQUOTE" "RESPONSE" "FortranFormat" "FortranFormatNone" "FortranFormatFixed" "FortranFormatFree") for i in "${values[@]}"; do git grep -l cmLocalGenerator::$i | xargs sed -i "s|cmLocalGenerator::$i|cmOutputConverter::$i|g"; done
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-299/+208
| | | | | | | | | | | | | 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.
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | Modern editors provide plenty of ways to visually separate functions. Drop the explicit comments that previously served this purpose. Use the following command to automate the change: $ git ls-files -z -- \ "*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" | egrep -z -v "^Source/cmCommandArgumentLexer\." | egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmDependsJavaLexer\." | egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmExprLexer\." | egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmFortranLexer\." | egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmListFileLexer\." | egrep -z -v "^Source/cm_sha2" | egrep -z -v "^Source/(kwsys|CursesDialog/form)/" | egrep -z -v "^Utilities/(KW|cm).*/" | xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}' This avoids modifying third-party sources and generated sources.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* cmLocalGenerator: Add current binary directory accessor.Stephen Kelly2015-10-101-1/+1
|
* cmDependsFortran: Use string to store module directoryBrad King2015-07-291-8/+5
|
* cmFortranParser: Factor out of cmDependsFortranBrad King2015-07-271-465/+0
| | | | | Move the main parser class and method implementations out of cmDependsFortran.cxx and into separate source files.
* cmDependsFortran: Simplify storage of preprocessor definitionsBrad King2015-07-271-12/+8
| | | | | | Collect the original preprocessor definitions in a std::set<> so that it can be copied directly by cmFortranParser's constructor instead of making a copy on the stack.
* cmDependsFortran: Move FindIncludeFile method into parser classBrad King2015-07-271-14/+17
| | | | | This drops the only awareness of cmDependsFortran that cmFortranParser needed.
* Rename Fortran parser infrastructure to drop "Depends" prefixKitware Robot2015-07-271-71/+71
| | | | | | | | | | | The parser can be re-used outside cmDependsFortran or the cmDepends class hierarchy so drop the "Depends" from its name: rename 's/DependsFortran([A-Za-z0-9_])/Fortran$1/' Source/*.* sed -i 's/DependsFortran\([A-Za-z0-9_]\)/Fortran\1/g' Source/*.* sed -i 's/FortranInternals/DependsFortranInternals/g' Source/*.* Also manually fix Source/CMakeLists.txt source file ordering.
* Fortran: Fix passing of preprocessor definitions to dependency scannerBrad King2015-07-061-1/+1
| | | | | | | | | | In commit v3.3.0-rc1~352^2~3 (Genex: Allow COMPILE_LANGUAGE when processing compile definitions, 2015-03-04) the name of the variable used to pass preprocessor definitions to the Fortran dependency scanner was changed to be per-language, but the actual dependency scanning code was not updated accordingly. Update the code and add a test case. Reported-by: Radovan Bast <radovan.bast@gmail.com>
* cmMakefile: Rename GetCurrent{Output,Binary}Directory.Stephen Kelly2015-04-201-1/+1
| | | | Match names used in CMake code.
* Use two-iterator std::set::insert where appropriate.Stephen Kelly2015-01-111-7/+3
|
* strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-2/+2
| | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* cmDepends: Refactor object file path conversionBrad King2014-07-221-9/+14
| | | | | | | | Delay conversion of the path to object files (on the left-hand side of dependencies) until just before they are written. Also do not convert the format of paths written to the 'depend.internal' file. This is consistent with the way the right-hand side of dependencies are already handled.
* cmLocalGenerator: Rename 'MAKEFILE' to 'MAKERULE'Brad King2014-07-221-6/+6
| | | | | Rename the internal enumeration value for converting paths destined for use in Makefile rule syntax.
* Merge topic 'gfortran-compressed-modules'Brad King2014-06-241-14/+27
|\ | | | | | | | | d90be200 Fortran: Add support for GNU >= 4.9 compressed modules (#14975)
| * Fortran: Add support for GNU >= 4.9 compressed modules (#14975)Brad King2014-06-231-14/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | From the GCC 4.9 release notes for Fortran: https://gcc.gnu.org/gcc-4.9/changes.html "Module files: The version of the module files (.mod) has been incremented; additionally, module files are now compressed." Teach cmDependsFortran::ModulesDiffer to look for the gzip magic numbers at the beginning of the module file. If found, assume the module was produced by gfortran >= 4.9. The modules do not appear to contain the date as earlier versions did so we can compare the content directly and do not actually need to decompress.
* | Remove c_str calls when using stream APIs.Stephen Kelly2014-03-111-6/+6
| | | | | | | | | | Use an ad-hoc clang tool for matching the calls which should be ported.
* | Remove some c_str() calls.Stephen Kelly2014-03-111-11/+11
| | | | | | | | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.