Commit Graph

1082 Commits

Author SHA1 Message Date
Stephen Kelly 48c6a92b28 cmMakefile: Merge two Scope types and instances. 2015-06-30 23:14:22 +02:00
Stephen Kelly e28e110d22 cmMakefile: Rename a variable. 2015-06-30 23:14:22 +02:00
Stephen Kelly 3f5200ec5f cmMakefile: Expand the scope of scoped buildsystem file state. 2015-06-30 23:14:21 +02:00
Stephen Kelly 0a34ea597a cmMakefile: Compute the filename processed in a scope. 2015-06-30 23:14:21 +02:00
Stephen Kelly be5997ef77 cmMakefile: Inline ProcessBuildsystemFile into only caller. 2015-06-30 23:14:21 +02:00
Stephen Kelly 5bf9bfda3f cmMakefile: Don't use string comparison to check directory level. 2015-06-30 23:14:20 +02:00
Stephen Kelly f346d88d10 cmMakefile: Avoid invoking EnforceDirectoryLevelRules.
This is part of the CMP0000 implementation and only needs to be invoked
for top-level buildsystem files currently.
2015-06-30 23:14:20 +02:00
Stephen Kelly b661403177 cmMakefile: Add filename to ReadListFile auto scopes. 2015-06-30 23:14:19 +02:00
Stephen Kelly 6708d21664 cmMakefile: Remove IncludeScope Quiet call. 2015-06-30 23:14:19 +02:00
Stephen Kelly 0818737c85 cmMakefile: Make listfile scopes responsible for logical checks.
Remove the LexicalPushPop.
2015-06-30 23:14:18 +02:00
Stephen Kelly dd7e42758d cmMakefile: Move the lexical scope. 2015-06-30 23:14:18 +02:00
Stephen Kelly 92cecd9369 cmMakefile: Add automatic scopes to listfile readers. 2015-06-30 23:14:18 +02:00
Stephen Kelly 276c62253e cmMakefile: Move the IncludeScope to where it is used. 2015-06-30 23:14:17 +02:00
Brad King 5ab7dd544e Merge topic 'fix-function-missing-end'
5d85fb4f Fix assertion failure on unmatched function or macro
2015-06-23 09:08:18 -04:00
Brad King ec6d6be57d Merge topic 'minor-cleanups'
820986ed cmLocalGenerator: Constify GetIncludeDirectories method.
b3e2e332 QtAutogen: Get the global generator from the Makefile.
61c0113c cmLocalUnixMakefileGenerator3: Remove unused method.
080489b8 cmMakefile: Use member directly instead of through method.
8bfaadfa cmMakefile: Move IsRoot API from cmLocalGenerator.
217c243d cmake: Update the current snapshot when Resetting.
eb05dcd6 cmLocalGenerator: Add IssueMessage method.
cfae7fa4 cmMakefile: Use cmOutputConverter instead of cmLocalGenerator.
ccf7760f cmOutputConverter: Constify API.
2015-06-22 13:00:32 -04:00
Brad King 24a0825585 Merge topic 'clean-up-ReadListFile'
81eb2c58 cmMakefile: Simplify filename handling.
5c837686 cmMakefile: Make the IncludeScope more responsible.
c10ab014 cmMakefile: Move IncludeScope.
3404f8a0 cmMakefile: Move ListFile parsing responsibility out of internal method.
a1858136 cmMakefile: Rename parameter.
ad47e6e5 cmMakefile: Inline ReadListFileInternal into caller.
254be613 cmMakefile: Move resource management into the IncludeScope.
826b6e68 cmMakefile: Move IncludeScope to ReadDependentFile.
e53072d6 cmMakefile: Move IncludeScope instance.
b7166afa cmMakefile: Remove File from IncludeScope.
27f229b9 cmMakefile: Move include scope out of ReadListFileInternal.
9166b49d cmMakefile: Change order of raii scopes.
384a0dba cmMakefile: Simplify condition handling.
5e24ff17 cmMakefile: Split file handling from execution.
d5aaa2b9 cmMakefile: Move check for unused variables.
fff3c6cd cmMakefile: Move a container population.
...
2015-06-22 13:00:30 -04:00
Brad King 5d85fb4f40 Fix assertion failure on unmatched function or macro
The fix in commit v3.2.3~3^2 (Fix assertion failure on unmatched foreach
in function, 2015-05-18) broke handling of unmatched non-loop blocks
because it assumed all function blockers removed during error unwinding
were for loops, essentially switching the set of mishandled cases.

The purpose of the loop block push/pop operations is to define a scope
matching the lifetime of the loop function blockers.  Since our function
blockers already have the proper lifetime, simply move the push/pop
operations to their constructor/destructor.

Extend the RunCMake.Syntax test with a case covering this.
2015-06-22 11:41:51 -04:00
Stephen Kelly 080489b8a9 cmMakefile: Use member directly instead of through method.
This function will not be around much longer anyway.
2015-06-21 21:14:06 +02:00
Stephen Kelly 8bfaadfa39 cmMakefile: Move IsRoot API from cmLocalGenerator. 2015-06-21 21:14:05 +02:00
Stephen Kelly a863c59f70 cmMakefile: Use GetExecutionFileStack method. 2015-06-21 20:57:25 +02:00
Stephen Kelly 076760a63c cmMakefile: Add filename context to ExpandArguments.
The cmListFileArgument currently stores a FilePath for use in this
method.  The filename is the same as the CMAKE_CURRENT_LIST_FILE,
except if executing a macro or function defined in another file.

Set the context filename when expanding the arguments of macros and
functions using the filename recorded when defining the prototype.
2015-06-21 20:57:25 +02:00
Stephen Kelly cfae7fa408 cmMakefile: Use cmOutputConverter instead of cmLocalGenerator. 2015-06-21 20:17:18 +02:00
Stephen Kelly 81eb2c58a1 cmMakefile: Simplify filename handling.
This method has only one caller.
2015-06-21 20:10:52 +02:00
Stephen Kelly 5c83768628 cmMakefile: Make the IncludeScope more responsible.
It is now responsible for all resource management when
including a file.
2015-06-21 20:10:52 +02:00
Stephen Kelly c10ab01434 cmMakefile: Move IncludeScope. 2015-06-21 20:10:52 +02:00
Stephen Kelly 3404f8a081 cmMakefile: Move ListFile parsing responsibility out of internal method. 2015-06-21 20:10:51 +02:00
Stephen Kelly a1858136c2 cmMakefile: Rename parameter. 2015-06-21 20:10:51 +02:00
Stephen Kelly ad47e6e5bc cmMakefile: Inline ReadListFileInternal into caller. 2015-06-21 20:10:50 +02:00
Stephen Kelly 254be613b8 cmMakefile: Move resource management into the IncludeScope. 2015-06-21 20:10:50 +02:00
Stephen Kelly 826b6e6818 cmMakefile: Move IncludeScope to ReadDependentFile.
Add replacement simple push/pop in the other two callers of
ReadListFile.
2015-06-21 20:10:50 +02:00
Stephen Kelly e53072d638 cmMakefile: Move IncludeScope instance. 2015-06-21 20:10:49 +02:00
Stephen Kelly b7166afa6d cmMakefile: Remove File from IncludeScope.
Get it from the Makefile instead.
2015-06-21 20:10:49 +02:00
Stephen Kelly 27f229b970 cmMakefile: Move include scope out of ReadListFileInternal.
Simplify the ReadListFileInternal API.
2015-06-21 20:10:48 +02:00
Stephen Kelly 9166b49d70 cmMakefile: Change order of raii scopes. 2015-06-21 20:10:48 +02:00
Stephen Kelly 384a0dba63 cmMakefile: Simplify condition handling. 2015-06-21 20:10:48 +02:00
Stephen Kelly 5e24ff17a2 cmMakefile: Split file handling from execution. 2015-06-21 20:10:47 +02:00
Stephen Kelly d5aaa2b96f cmMakefile: Move check for unused variables. 2015-06-21 20:10:47 +02:00
Stephen Kelly fff3c6cd1c cmMakefile: Move a container population. 2015-06-21 20:10:47 +02:00
Stephen Kelly a6e661b848 cmMakefile: Rename variables. 2015-06-21 20:10:46 +02:00
Stephen Kelly fe38bb2c29 cmMakefile: Change return type of ReadListFileInternal. 2015-06-21 20:10:46 +02:00
Stephen Kelly ac10fc0958 cmMakefile: Move listfile parsing responsibility. 2015-06-21 20:10:45 +02:00
Stephen Kelly 52b9d828ab cmMakefile: Move CMP0059 handling to command code.
Don't pay a penalty for it in all GetProperty calls.

Additionally, the storage of properties will eventually move to
cmState, which should only contain state and not logic for policies
like this.
2015-06-08 22:23:44 +02:00
Brad King d17aa60659 Merge topic 'data-layout'
8174e5cd cmCustomCommand: Remove special member functions.
34e1d6db cmCustomCommand: Re-arrange data layout.
54cb76f2 cmComputeLinkDepends: Re-arrange data layout.
b661d6c6 cmQtAutoGenerators: Re-arrange data layout.
40844a14 cmProcessTools: Re-arrange data layout.
b1ff32af cmOrderDirectories: Re-arrange data layout.
dd0417c7 cmInstallTargetGenerator: Re-arrange data layout.
125c4866 cmInstallFilesGenerator: Re-arrange data layout.
92b8b1fc cmGraphVizWriter: Re-arrange data layout.
7f3e1623 cmGlobalGenerator: Re-arrange data layout.
d9df7fa7 cmComputeComponentGraph: Re-arrange data layout.
db24e41b cmCommandArgumentParserHelper: Re-arrange data.
4cd13e80 cmComputeLinkInformation: Re-arrange data layout.
3e087a40 cmLocalUnixMakefileGenerator: Re-arrange data layout.
e0421701 cmMakefile: Re-arrange data layout.
c26696eb cmSourceFile: Re-arrange data.
...
2015-06-08 13:54:11 -04:00
Brad King ccc6fe9445 Merge topic 'clean-up-cmMakefile'
4c192fb5 cmMakefile: Remove cacheOnly option from GetDefinitions.
046aafff cmGetCMakePropertyCommand: Don't explicitly specify default param.
021c4b6f cmMakefile: Simplify handling of CACHE_VARIABLES property.
1981c971 cmMakefile: Simplify InitializeFromParent method.
353e422b cmMakefile: Remove unused GetPolicies method.
00bfa047 cmMakefile: Out-of-line the cmMakefileCall.
db74ce58 cmMakefile: Inline PushScope into PushFunctionScope.
ca140c2e cmMakefile: Create a unified raii for macro scopes.
d5dc4169 cmMakefile: Create a unified raii for function scopes.
2015-06-08 13:54:09 -04:00
Brad King f5690cc57c Merge topic 'move-Feature-API'
f573bd22 cmLocalGenerator: Add Feature API from cmMakefile.
ccbc2259 cmGeneratorTarget: Move Feature API from cmTarget.
2015-06-08 13:54:05 -04:00
Stephen Kelly 4c192fb531 cmMakefile: Remove cacheOnly option from GetDefinitions.
It is now unused.
2015-06-07 15:21:56 +02:00
Stephen Kelly 021c4b6f2b cmMakefile: Simplify handling of CACHE_VARIABLES property. 2015-06-07 15:21:55 +02:00
Stephen Kelly 5181fae264 cmPropertyMap: Remove chaining logic.
The chaining logic doesn't belong to the container, and the
CMakeInstance pointer doesn't need to be in cmPropertyMap.

Size goes from 56 to 48 bytes with GNU libstdc++-5.1.
2015-06-07 09:29:31 +02:00
Stephen Kelly 7c0aa672fe cmPropertyMap: Remove scope parameter from API where not used. 2015-06-07 09:29:30 +02:00
Stephen Kelly f573bd22e4 cmLocalGenerator: Add Feature API from cmMakefile. 2015-06-06 15:44:17 +02:00