summaryrefslogtreecommitdiffstats
path: root/Source/cmListFileCache.h
Commit message (Collapse)AuthorAgeFilesLines
* Pass large types by const&, small types by valueDaniel Pfeifer2017-06-031-3/+3
|
* cmListFileArgument: remove custom copy ctorDaniel Pfeifer2017-04-211-6/+0
|
* 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'
* cmListFileCache: Remove cmState header includeStephen Kelly2016-10-191-1/+0
| | | | | Include it in dependents which have previously relied on it transitively.
* 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.
* cmState: Port dependent code to new cmStateSnapshot nameStephen Kelly2016-10-191-5/+5
|
* cmListFileBacktrace: Add a method to retrieve the Bottom of a snapshotStephen Kelly2016-10-151-0/+2
|
* 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.
* fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-2/+5
|
* make sure to include cmConfigure.h before cmStandardIncludes.hDaniel Pfeifer2016-09-031-0/+2
|
* Parser: Port away from cmMakefileStephen Kelly2016-08-251-2/+3
| | | | It is an unneeded dependency.
* Parser: Out-of-line conditional code to cmMakefileStephen Kelly2016-06-131-1/+1
| | | | Simplify parser API.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-18/+36
| | | | | | | | | | | | | 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.
* cmListFileBacktrace: Refactor storage to provide efficient value semanticsBrad King2016-04-181-10/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit v3.4.0-rc1~321^2~2 (Genex: Store a backtrace, not a pointer to one, 2015-07-08) we treat cmListFileBacktrace instances as lightweight values. This was true at the time only because the backtrace information was kept in the cmState snapshot hierarchy. However, that forced us to accumulate a lot of otherwise short-lived snapshots just to have the backtrace fields available for reference by cmListFileBacktrace instances. Recent refactoring made backtrace instances independent of the snapshot hierarchy to avoid accumulating short-lived snapshots. This came at the cost of making backtrace values heavy again, leading to lots of string coying and slower execution. Fix this by refactoring cmListFileBacktrace to provide value semantics with efficient shared storage underneath. Teach cmMakefile to maintain its call stack using an instance of cmListFileBacktrace. This approach allows the current backtrace to be efficiently saved whenever it is needed. Also teach cmListFileBacktrace the notion of a file-level scope. This is useful for messages about the whole file (e.g. during parsing) that are not specific to any line within it. Push the CMakeLists.txt scope for each directory and never pop it. This ensures that we always have some context information and simplifies cmMakefile::IssueMessage. Push/pop a file-level scope as each included file is processed. This supersedes cmParseFileScope and improves diagnostic message context information in a few places. Fix the corresponding test cases to expect the improved output.
* cmState: Avoid accumulating snapshot storage for backtracesBrad King2016-04-151-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes during post-3.3/pre-3.4 development refactored storage of most configure-time information, including variable bindings and function scopes. All scopes (even short-lived) were kept persistently for possible future debugging features, causing huge accumulated memory usage. This was mostly addressed by commit v3.4.1~4^2 (cmState: Avoid accumulating snapshot storage for short-lived scopes, 2015-11-24). Since then we still keep short-lived scopes when they are needed for a backtrace. This is because since commit v3.4.0-rc1~378^2 (cmListFileBacktrace: Implement in terms of cmState::Snapshot, 2015-05-29) backtraces have been lightweight objects that simply point into the snapshot tree. While the intention of this approach was to avoid duplicating the call stack file path strings, the cost turned out to be holding on to the entire call stack worth of scope snapshots, which is much worse. Furthermore, since commit v3.4.0-rc2~1^2 (cmIfCommand: Issue CMP0054 warning with appropriate context, 2015-10-20) all conditions used in `if()` commands hold a backtrace for use in diagnostic messages. Even though the backtrace is short-lived it still causes the scope snapshot to be kept. This means that code like function(foo) if(0) endif() endfunction() foreach(i RANGE 1000000) foo() endforeach() accumulates storage for the function call scope snapshots. Fix this by partially reverting commit v3.4.0-rc1~378^2 and saving the entire call stack during cmListFileBacktrace construction. This way we can avoid keeping short-lived scope snapshot storage in all cases.
* cmListFileCache: Fix warning about inconsistent use of class/structTobias Hunger2016-02-111-1/+2
| | | | Exposed by Clang trunk.
* Merge branch 'reduce-cmState-accumulation' into ↵Brad King2015-11-251-4/+2
|\ | | | | | | reduce-cmState-accumulation-for-master
| * cmListFileCache: Implement cmListFileBacktrace ctor/dtor out-of-lineBrad King2015-11-251-4/+2
| |
* | cmTarget: Split storage of link implementation from backtraces.Stephen Kelly2015-10-081-9/+0
|/
* cmListFileBacktrace: Constify API.Stephen Kelly2015-07-181-2/+2
|
* cmListFileBacktrace: Implement in terms of cmState::Snapshot.Stephen Kelly2015-07-061-5/+5
| | | | Avoid copying many strings into each backtrace object.
* cmListFile: Remove FilePath member from cmListFileContext.Stephen Kelly2015-07-061-1/+18
| | | | | There is no need to store the FilePath for every function, as it is known by other means.
* cmListFileArgument: Remove FilePath member.Stephen Kelly2015-06-211-7/+5
| | | | It is now unused.
* cmListFileBacktrace: Replace local generator with cmState::Snapshot.Stephen Kelly2015-06-061-4/+4
| | | | Construct cmOutputConverter only when needed.
* cmListFileBacktrace: Internalize the step of making paths relative.Stephen Kelly2015-06-021-4/+0
| | | | | | Currently cmMakefile calls MakeRelative on a copy of the backtrace, emits the copy to the stream once, then discards the copy. There is no need to have API for the path conversion.
* cmMakefile: Make cmListFileBacktrace default constructible.Stephen Kelly2015-06-021-1/+1
|
* cmListFileBacktrace: Hide the context-stack implementation detail.Stephen Kelly2015-05-181-1/+6
| | | | | | The backtrace will soon not be implemented in terms of a stack of cmListFileContext objects. Keep the cmListFileContext in the API for convenience for now.
* cmListFileContext: Implement EqualityComparable.Stephen Kelly2015-05-181-0/+2
|
* cmListFileContext: Implement LessThanComparable.Stephen Kelly2015-05-181-0/+1
| | | | | Move wrapping existing code from cmMakefile, and simplify the implementation there.
* cmListFile: Remove unused member.Stephen Kelly2015-04-041-5/+0
| | | | | It is written, but not read since commit v2.4.0~575 (ENH: Since list file cache does not make much sense any more ..., 2006-02-07).
* backtrace: Convert to local paths in IssueMessageBen Boeckel2014-06-051-1/+16
| | | | | This is the only place we care show the FilePath to the user, so defer the expensive relative path calculation until here.
* Add Lua-style long brackets and long comments to CMake languageBrad King2013-10-171-1/+2
| | | | | | | | | | | | | | | | | Teach the CMake language parser to recognize Lua-style "long bracket" arguments. These start with two '[' separated by zero or more '=' characters e.g. "[[" or "[=[" or "[==[". They end with two ']' separated by the same number of '=' as the opening bracket. There is no nesting of brackets of the same level (number of '='). No escapes, variable expansion, or other processing is performed on the content between such brackets so they always represent exactly one argument. Also teach CMake to parse and ignore "long comment" syntax. A long comment starts with "#" immediately followed by an opening long bracket. It ends at the matching close long bracket. Teach the RunCMake.Syntax test to cover long bracket and long comment cases.
* cmListFileArgument: Generalize 'Quoted' bool to 'Delimeter' enumBrad King2013-08-081-6/+11
| | | | | | Replace the boolean value that indicates whether an argument is unquoted or quoted with a generalized enumeration of possible argument types. For now "Quoted" and "Unquoted" remain the only types.
* Rename the IncludeDirectoriesEntry to be more generic.Stephen Kelly2013-02-121-0/+9
|
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-4/+4
| | | | | | | | | | | | | | | | | Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
* Convert CMake to OSI-approved BSD LicenseBrad King2009-09-281-14/+9
| | | | | | | This converts the CMake license to a pure 3-clause OSI-approved BSD License. We drop the previous license clause requiring modified versions to be plainly marked. We also update the CMake copyright to cover the full development time range.
* BUG: Make sure context info is always initializedBrad King2008-10-111-0/+1
| | | | | | This adds a missing default constructor to cmListFileContext that makes sure the line number is initialized to zero. A zero line number will indicate a generated context.
* ENH: Improve new error/warning message generationBrad King2008-03-131-0/+4
| | | | | | | | | | - Add cmListFileBacktrace to record stack traces - Move main IssueMessage method to the cmake class instance (make the backtrace an explicit argument) - Change cmMakefile::IssueMessage to construct a backtrace and call the cmake instance version - Record a backtrace at the point a target is created (useful later for messages issued by generators)
* ENH: New format for warning and error messagesBrad King2008-03-071-2/+6
| | | | | | | | | | | | | - Add cmMakefile methods IssueError and IssueWarning - Maintain an explicit call stack in cmMakefile - Include context/call-stack info in messages - Nested errors now unwind the call stack - Use new mechanism for policy warnings and errors - Improve policy error message - Include cmExecutionStatus pointer in call stack so that errors deeper in the C++ stack under a command invocation will become errors for the command
* BUG: change the handling of CMAKE_MINIMUM_REQUIRED and ↵Ken Martin2008-03-061-1/+5
| | | | BACKWARDS_COMPATIBILITY and extend the documentaiton quite a bit
* BUG: const char* FilePath could point to a non-existent std::string forAlexander Neundorf2007-05-111-1/+1
| | | | | | | commands used in a macro, using a std::string instead copies the contents so this works (correct error message) Alex
* STYLE: some m_ to this-> cleanupKen Martin2006-03-151-7/+8
|
* BUG: Remove some old legacy code and remove memory leakAndy Cedilnik2006-03-081-3/+0
|
* ENH: Since list file cache does not make much sense any more (because of ↵Andy Cedilnik2006-02-071-31/+1
| | | | proper list file parsing), and it actually adds unnecessary complications and make ctest scripting not work, take it out
* ENH: Added support for special variables CMAKE_CURRENT_LIST_FILE and ↵Brad King2004-08-041-4/+15
| | | | CMAKE_CURRENT_LIST_LINE that evaluate to the file name and line number in which they appear. This implements the feature request from bug 1012.
* ENH: Using lex-based tokenizer and a simple recursive-descent parser in ↵Brad King2003-12-081-19/+0
| | | | place of the old hand-coded parser for CMake listfiles.
* ERR: Added operator != for SGI.Brad King2002-12-171-0/+4
|
* ENH: Improved filename/line number reporting in error message. Macro ↵Brad King2002-12-121-1/+1
| | | | invocations now chain up the error message.
* ENH: Moved ExpandListVariables out of individual commands. Argument ↵Brad King2002-12-111-1/+34
| | | | evaluation rules are now very consistent. Double quotes can always be used to create exactly one argument, regardless of contents inside.
* ENH: add PROJECT command if there is not oneBill Hoffman2002-12-021-3/+5
|