summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
Commit message (Collapse)AuthorAgeFilesLines
* VS: Compute project GUIDs deterministicallyBrad King2015-06-041-15/+0
| | | | | | | | | Compute deterministic GUIDs that are unique to the build tree by hashing the path to the build tree with the GUID logical name. Avoid storing them in the cache, but honor any found there. This will allow project GUIDs to be reproduced in a fresh build tree so long as its path is the same as the original, which may be useful for incremental builds.
* Merge topic 'inject-state-snapshot'Brad King2015-05-271-1/+4
|\ | | | | | | | | | | | | | | 3b880a07 cmLocalGenerator: Require a valid cmState::Snapshot in the ctor. e12afe76 cmState: Host some state from the cmGlobalGenerator. c7b79aa1 cmGlobalGenerator: Require a cmake instance in ctor. 01e1cd5c cmState: Move snapshot creation to the cmake instance.
| * cmLocalGenerator: Require a valid cmState::Snapshot in the ctor.Stephen Kelly2015-05-271-1/+4
| | | | | | | | | | | | | | | | | | | | | | Refactor the local generator creation API to accept a cmState::Snapshot. Adjust MakeLocalGenerator to use the 'current' snapshot in cases where there is no parent. Create the snapshot for subdirectories in cmMakefile::AddSubdirectory. This means that snapshots are now created at the point of extending the tree, as appropriate, and independently of the cmLocalGenerator and cmMakefile they represent the state for.
* | cmMakefile: Don't pop the directory listfile off the stack.Stephen Kelly2015-05-251-16/+10
| | | | | | | | Simplify the IssueMessage implementation.
* | cmMakefile: Simplify convert condition.Stephen Kelly2015-05-251-2/+1
|/ | | | The CallStack is checked above.
* cmake: Add IssueMessage overload taking a single cmListFileContext.Stephen Kelly2015-05-211-22/+18
| | | | Port appropriate clients to use it.
* Merge topic 'clean-up-CMAKE_COMMAND'Brad King2015-05-211-1/+0
|\ | | | | | | | | 6fbd4cae Use cmSystemTools::GetCMakeCommand() to get path to cmake internally
| * Use cmSystemTools::GetCMakeCommand() to get path to cmake internallyBrad King2015-05-201-1/+0
| | | | | | | | | | This is much simpler than finding a way to lookup "CMAKE_COMMAND" everywhere.
* | cmMakefile: Remove VarUsageStack.Stephen Kelly2015-05-191-50/+8
| | | | | | | | | | | | Store usage information in the cmDefintions value instead. We already pay for the memory as padding in the Def struct, so we might as well use it.
* | cmMakefile: Remove VarInitStack.Stephen Kelly2015-05-191-21/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In cmMakefile::PushScope, a copy of the closure of keys initialized in the parent scope is made. In PopScope, essentially the same copy is inserted back into the parent. That means a lot of duplication of strings and a lot of string comparisons. None of it is needed, because the cmDefinitions keys already provide a canonical representation of what is initialized. The removal of the separate container also makes the variable handling code more easy to reason about in general. Before this patch, configuring llvm uses 200 KiB for the VarInitStack. Overall peak memory consumption goes from 35.5 MiB to 35.1 MiB.
* | cmMakefile: Use more suitable method name to log var usage.Stephen Kelly2015-05-191-6/+6
| |
* | cmMakefile: Mark definitions explicitly erased, even at top level.Stephen Kelly2015-05-191-9/+1
| | | | | | | | | | | | | | | | | | | | Presumably the intention here is to attempt to optimize memory by not storing what is not needed. However, all keys need to be tracked anyway to implement initialization tracking, and this special case gets in the way of simplifying the implementation of that. This doesn't change any observable effects because values set to 0 are considered not to exist by the cmDefinitions API.
* | cmMakefile: Raise variable in scope explicitly when needed.Stephen Kelly2015-05-191-1/+1
| | | | | | | | | | The Get method implicitly pulls a copy of all variables into a local scope. This is not necessary.
* | cmMakefile: Use early return to reduce nested code.Stephen Kelly2015-05-191-15/+16
| |
* | cmMakefile: Don't use else after return.Stephen Kelly2015-05-191-4/+1
| |
* | cmMakefile: Remove redundant conditions.Stephen Kelly2015-05-191-6/+3
| | | | | | | | This container is never empty.
* | cmMakefile: Remove Print() debugging facilities.Stephen Kelly2015-05-191-53/+0
| | | | | | | | They don't print things that are important in the modern implementation.
* | cmMakefile: Remove duplicate variable initialization.Stephen Kelly2015-05-191-4/+2
| |
* | cmMakefile: Don't expect the VarStack iterator to support size().Stephen Kelly2015-05-191-2/+1
| |
* | cmMakefile: Remove redundant condition.Stephen Kelly2015-05-191-8/+2
| | | | | | | | | | As this is called in the constructor, the definition will never be already set.
* | cmMakefile: Rename method to something more appropriate.Stephen Kelly2015-05-191-1/+1
| | | | | | | | Allow the name to be used for something more-suitable.
* | cmMakefile: Make the public ReadListFile method take one param.Stephen Kelly2015-05-191-4/+6
| | | | | | | | | | Make the existing method a private overload. All external callers invoke the method with only one argument.
* | cmMakefile: Remove CurrentListFile member.Stephen Kelly2015-05-191-6/+1
| | | | | | | | | | It is never read externally. The CollapseFullPath removed in this commit is a repeat of a similar call inside ReadListFile.
* | cmMakefile: Port CurrentListFile clients to GetDefinition.Stephen Kelly2015-05-191-1/+2
|/ | | | There is no need to store this as a member variable.
* Merge topic 'minor-cleanups'Brad King2015-05-191-22/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 61d52e6e cmListFileBacktrace: Hide the context-stack implementation detail. a271f7f1 cmTarget: Simplify CMP0023 message loop. f4300cd4 cmTarget: Simplify output computation. 65a42849 cmTarget: Store context in stack only if different. 9645cba3 cmListFileContext: Implement EqualityComparable. 52a8d19c cmTarget: Store only cmListFileContext for CMP0023 handling. 59ba1215 cmTarget: Remove needless iteration. 18f810a8 cmListFileContext: Sort by line before file. e96b5d14 cmListFileContext: Implement LessThanComparable. 7eb0dfa0 cmMakefile: Use std::set::insert API to simplify CMP0054 handling. f9785e0c cmMakefile: Simplify CMP0054 handling. e17b5e42 cmMakefile: Add access to the top-level execution context. 1ec1bf9f if(): Test the effect of cmMakefileCall use in elseif() handling. 9b4aefad cmMakefile: Replace deques with vectors.
| * cmListFileBacktrace: Hide the context-stack implementation detail.Stephen Kelly2015-05-181-5/+5
| | | | | | | | | | | | 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 LessThanComparable.Stephen Kelly2015-05-181-3/+1
| | | | | | | | | | Move wrapping existing code from cmMakefile, and simplify the implementation there.
| * cmMakefile: Use std::set::insert API to simplify CMP0054 handling.Stephen Kelly2015-05-181-9/+1
| |
| * cmMakefile: Simplify CMP0054 handling.Stephen Kelly2015-05-181-3/+2
| |
| * cmMakefile: Add access to the top-level execution context.Stephen Kelly2015-05-181-4/+10
| | | | | | | | | | This is cheaper than getting the whole backtrace, and the cmListFileBacktrace will not always be composed of cmListFileContext objects.
| * cmMakefile: Replace deques with vectors.Stephen Kelly2015-05-181-1/+1
| |
* | Merge topic 'clean-up-makefile-generators'Brad King2015-05-191-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 036372c4 Remove obsolete overrides of CreateLocalGenerator. 684e5cef cmGlobalGenerator: Host the MakeSilentFlag. 2047144f cmLocalGenerator: Remove unused IgnoreLibPrefix. 333c1fa8 cmGlobalUnixMakefileGenerator3: Host the UnixCD. a97df5e1 cmGlobalUnixMakefileGenerator3: Host the PassMakeflags. 14f171c3 Remove method calls just repeating the default. cf7f03e5 cmGlobalUnixMakefileGenerator3: Host the DefineWindowsNULL. e9b134b9 cmGlobalUnixMakefileGenerator3: Host the include directive. 24613d8b cmLocalGenerator: Remove unused method. b659d161 cmGlobalGenerator: Add NVI wrapper to create local generator.
| * | cmGlobalGenerator: Add NVI wrapper to create local generator.Stephen Kelly2015-05-161-1/+1
| |/
* | Merge topic 'clean-up-cmDefinitions'Brad King2015-05-191-10/+2
|\ \ | | | | | | | | | | | | | | | | | | f170985e cmDefinitions: Make the ClosureKeys method static. 98c5c903 cmDefinitions: Centralize knowledge of iterator type. 7872201b cmDefinitions: Remove internal MakeClosure method.
| * | cmDefinitions: Make the ClosureKeys method static.Stephen Kelly2015-05-171-10/+2
| |/ | | | | | | For consistency with all other closure-related methods.
* | Merge topic 'fix-function-missing-endforeach'Brad King2015-05-191-0/+1
|\ \ | |/ |/| | | | | 3a656065 Fix assertion failure on unmatched foreach in function (#15572)
| * Fix assertion failure on unmatched foreach in function (#15572)Brad King2015-05-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The lexical scope counting added by commit v3.2.0-rc1~332^2~1 (Track nested loop levels in CMake language with a stack of counters, 2014-11-18) forgot to account for scopes popped by error messages about unclosed scopes. Teach the error handler to pop the lexical scope it reports as unclosed. Re-order the lexical scope RAII object to be inside the variable scope RAII object scope so that the lexical scope is fully closed before we check assertions about variable scopes. Extend the RunCMake.Syntax test with a case covering this.
* | cmMakefile: Handle CMP0014 before configuring the generator.Stephen Kelly2015-05-141-1/+36
| |
* | cmMakefile: Remove redundant variable set.Stephen Kelly2015-05-141-1/+0
| | | | | | | | The variable is initialized by the constructor already.
* | cmMakefile: Use the state to determine the parent directory.Stephen Kelly2015-05-141-3/+4
| | | | | | | | Do not depend on the local generator for that.
* | cmLocalGenerator: Initialize state before creating cmMakefile.Stephen Kelly2015-05-141-15/+1
| | | | | | | | Access the state from the local generator in the cmMakefile.
* | CTest: Stop telling 'make' to ignore errors with -iBrad King2015-05-121-0/+20
| | | | | | | | Add policy CMP0061 to maintain compatibility for existing projects.
* | Merge topic 'refactor-cmPolicies'Brad King2015-05-051-43/+26
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 013ada80 cmPolicies: Implement PolicyMap in terms of bitset. be6664c2 cmPolicies: Implement abstraction for PolicyMap. de211686 Port to static cmPolicies API. 13981f20 cmPolicies: Make all API static. 23e2bcc8 cmPolicies: Remove unused DefinePolicy method. 5641ba4f cmPolicies: Remove unused cmPolicy class. 3de54497 cmPolicies: Loop over all policies using enum constants. 387aff20 cmPolicies: Trivialize GetPolicyStatus method. dbf680d6 cmPolicies: Use more-direct ID access. 8c204133 cmPolicies: Implement in terms of public API. e3a8c029 cmPolicies: Make private method file-static. cb765af0 cmPolicies: Implement short description access with XMacros. 5df267fa cmPolicies: Implement version check with XMacro. 2235cfeb cmPolicies: Implement id to version with XMacro. 05d84388 cmPolicies: Implement id to string conversion with XMacro. 6eaade8a cmPolicies: Introduce XMacro table for policy data. ...
| * | cmPolicies: Implement abstraction for PolicyMap.Stephen Kelly2015-05-041-6/+5
| | | | | | | | | | | | Hide the detail that it is a std::map.
| * | Port to static cmPolicies API.Stephen Kelly2015-05-041-37/+21
| | |
* | | Merge topic 'refactor-cmMakefile-constructor'Brad King2015-05-051-8/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | 42142d4f cmMakefile: Inline Intialize method in constructor f39f0c0a cmMakefile: Initialize SuppressWatches member before use
| * | | cmMakefile: Inline Intialize method in constructorBrad King2015-05-041-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | Since commit 80909041 (cmMakefile: Disable copy constructor, 2015-04-18) the only call to cmMakefile::Initialize is in one constructor. Inline it and drop the separate method.
| * | | cmMakefile: Initialize SuppressWatches member before useBrad King2015-05-041-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 86f3cd0f (cmMakefile: Require the localGenerator in the constructor, 2015-04-27) we added use of GetDefinition to the Initialize method. Set SuppressWatches before calling this method since GetDefinition checks it.
* | | | Merge topic 'add-cmMakefile-GetGlobalGenerator'Brad King2015-05-041-46/+34
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a0836ed9 Port to cmMakefile::GetGlobalGenerator. cbf143bb cmComputeTargetDepends: Use simpler global generator access. 040491fc cmComputeLinkDepends: Remove unused local generator. 0bb6dbe0 cmMakefile: Extract an accessor for the global generator. e1bdf5f5 cmMakefile: Use GetCMakeInstance. efcca935 cmMakefile: Simplify GetCMakeInstance implementation.
| * | | | Port to cmMakefile::GetGlobalGenerator.Stephen Kelly2015-05-031-37/+26
| | | | |