1166 Commits

Author SHA1 Message Date
Stephen Kelly
e2d0e0fbeb cmMakefile: Remove intermediate variable. 2015-04-18 15:29:19 +02:00
Stephen Kelly
3a1ad1713f cmMakefile: Combine duplicate condition. 2015-04-18 15:29:19 +02:00
Stephen Kelly
f0dae032ee cmMakefile: Re-order independent statements. 2015-04-18 15:29:19 +02:00
Stephen Kelly
08da874270 cmMakefile: Split a conditional. 2015-04-18 15:29:19 +02:00
Stephen Kelly
3dc4fe02e6 cmMakefile: Re-order independent variable setting. 2015-04-18 15:29:19 +02:00
Stephen Kelly
e4f8f1f1b7 cmMakefile: Remove intermediate variable. 2015-04-18 15:29:18 +02:00
Stephen Kelly
2d6121a9a7 cmMakefile: Remove use of intermediate variable. 2015-04-18 15:29:18 +02:00
Stephen Kelly
bdd4c5f5ba cmMakefile: Move variable definition above a condition. 2015-04-18 15:29:18 +02:00
Stephen Kelly
524ce89542 cmMakefile: Change condition to its equivalent.
This makes it easier to reason about follow-up commits.
2015-04-18 15:29:18 +02:00
Stephen Kelly
813cd719c4 cmMakefile: Determine the file to read before calling Internal. 2015-04-18 15:29:18 +02:00
Stephen Kelly
5c201f1ee6 cmMakefile: Remove duplication in ReadListFile. 2015-04-18 15:29:18 +02:00
Stephen Kelly
0d9555779d cmMakefile: Delegate ListFile reading to internal method. 2015-04-18 15:29:17 +02:00
Stephen Kelly
846608f267 cmMakefile: Remove useless condition. 2015-04-18 15:29:17 +02:00
Stephen Kelly
a2f2aeee2f cmMakefile: Add wrapper for reading listfiles which have an origin.
Such files are delegates from other files, and so they set the
CMAKE_PARENT_LIST_FILE to the originator.  They also may set a
policy scope.
2015-04-18 15:29:17 +02:00
Stephen Kelly
68f791cd06 cmMakefile: Add a method for processing buildsystem files.
These are different from other ListFiles in that a project() command is
required if it is top-level.
2015-04-18 15:29:17 +02:00
Stephen Kelly
5bb4248a80 cmMakefile: Remove fullPath parameter from ReadListFile.
There is no reason for this to be a responsibility of
ReadListFile.  Additionally, the only user of it already computes
it itself.
2015-04-18 15:29:17 +02:00
Stephen Kelly
5d056c0dd8 Port Global property interaction to cmState. 2015-04-15 11:43:50 -04:00
Stephen Kelly
0076b5d834 cmake: Remove the happy global property scope pattern.
Global properties are already global in scope, so remove the
overload for specifying it and port users of the API.

The call from cmMakefile::GetProperty can be simplified because
the scope is only used during chaining, and there is no further
chaining after processing global properties.
2015-04-15 11:43:50 -04:00
Stephen Kelly
0aec491328 Port cmCommand consumers to cmState. 2015-04-15 11:43:49 -04:00
Stephen Kelly
b159bff732 Move property definition to cmState. 2015-04-13 20:13:13 +02:00
Brad King
62c5e6f1a1 Merge topic 'introduce-cmState'
f081c5bd cmState: Move CacheEntryType enum from cmCacheManager.
f71fdf0e cmMakefile: Remove unused CacheManager accessor.
ff7169a0 Port to cmState.
a6b1ad13 Introduce cmState class.
2015-04-13 11:45:02 -04:00
Stephen Kelly
f081c5bddd cmState: Move CacheEntryType enum from cmCacheManager. 2015-04-13 11:44:16 -04:00
Stephen Kelly
f71fdf0ec8 cmMakefile: Remove unused CacheManager accessor.
Remove unneeded friend declarations from cmCacheManager.
2015-04-13 11:44:15 -04:00
Stephen Kelly
ff7169a03c Port to cmState. 2015-04-13 11:44:15 -04:00
Stephen Kelly
a6b1ad1309 Introduce cmState class.
At this point, it is an interface to the cache.  It will be extended
to be a universal interface for access to and manipulation of
configuration-time data (defintions, properties on targets,
directories, source files etc).

This will allow porting all command implementations away
from the cmMakefile and cmTarget classes, and result in something
more-purely related to configuration-time processing of cmake
commands.  That should serve at least the following goals:

 * Split the CMake implementation more definitively into three
   stages: Configuration, computation and generation, and be able to
   implement each optimally for memory access patterns etc.
 * Make better IDE integration possible by making more configuration
   data available.
 * Make it possiblte to use a smaller library than CMakeLib.a in
   cpack and ctest, resulting in smaller executables.
 * Make it possible to run the configure step multiple times in
   the same CMake run (#14539).

Manage its lifetime in the cmake class, and add a convenience accessor
to cmMakefile.
2015-04-13 11:44:14 -04:00
Stephen Kelly
ea819b29f8 cmMakefile: Remove unused method. 2015-04-12 23:10:45 +02:00
Stephen Kelly
6ad86c7fc4 cmMakefile: Remove bad comment. 2015-04-12 23:10:45 +02:00
Stephen Kelly
fca2b542b4 cmMakefile: Internalize setting of CMakeInstance on Properties. 2015-04-12 23:10:45 +02:00
Stephen Kelly
7bb4e3db06 cmMakefile: Out-of-line Home directory accessors. 2015-04-12 23:10:44 +02:00
Stephen Kelly
ba404938a2 cmCacheManager: Port consumers to non-iterator API.
This simplifies reasoning about the follow-up commit which ports
away from cmCacheManager to a class with the same method names.
2015-04-08 18:47:00 +02:00
Stephen Kelly
9e64156725 cmMakefile: Port away from CacheEntry.Initialized.
The API has no other external users.
2015-04-08 18:47:00 +02:00
Stephen Kelly
77f2807ce5 cmCacheManager: Rename GetCacheValue to GetInitializedCacheValue.
Being initialized is a requirement for this method to return something,
and is what differentiates it from using GetIterator with it.GetValue.
2015-04-07 23:25:44 +02:00
Stephen Kelly
1f2c12ebd1 cmMakefile: Remove cache version accessors.
They are only used by legacy code. Inline them there to simplify
cmMakefile.
2015-04-07 23:25:35 +02:00
Stephen Kelly
97c50a8dbd cmMakefile: Simplify GetDefinitions implementation. 2015-04-07 23:25:31 +02:00
Brad King
3347c5e4f9 Revert topic 'refactor-cache-api'
This topic was never tested without some follow-up commits.  The
GetCacheEntryValue API returns a pointer to memory freed on return.
It will have to be revised along with the rest of the original topic.
2015-04-07 17:15:04 -04:00
Stephen Kelly
9410e24a4a cmCacheManager: Port consumers to non-iterator API.
This simplifies reasoning about the follow-up commit which ports
away from cmCacheManager to a class with the same method names.
2015-04-06 17:58:55 +02:00
Stephen Kelly
2e50f5e7d9 cmMakefile: Port away from CacheEntry.Initialized.
The API has no other external users.
2015-04-06 17:58:55 +02:00
Stephen Kelly
9ada4c0433 cmCacheManager: Rename GetCacheValue to GetInitializedCacheValue.
Being initialized is a requirement for this method to return something,
and is what differentiates it from using GetIterator with it.GetValue.
2015-04-06 17:58:55 +02:00
Stephen Kelly
08c642c6ae cmMakefile: Remove cache version accessors.
They are only used by legacy code. Inline them there to simplify
cmMakefile.
2015-04-06 17:58:54 +02:00
Stephen Kelly
cec8f97e57 cmMakefile: Simplify GetDefinitions implementation. 2015-04-06 17:58:54 +02:00
Stephen Kelly
c37cf7fa9e cmCacheManager: Remove unused method 2015-04-05 10:26:10 +02:00
Stephen Kelly
06f61c26cf Do not treat DEFINITIONS as a built-in directory property
Add policy CMP0059 to cover this change.  The property has been
deprecated since CMake 2.4 anyway.

This will help clean up cmMakefile -- the DefineFlagsOrig member should
not need to exist.
2015-04-02 13:00:48 -04:00
Stephen Kelly
f2e07a6d90 cmMakefile: Remove unused PreOrder member.
Remove references from dependendent API.
2015-04-01 20:32:48 +02:00
Stephen Kelly
aafe282188 cmMakefile: Remove unused Prefix member.
Unused since it was added in commit 1f42f521 (NEW: move from tools
and config to create CMake, 2000-08-29).
2015-04-01 20:32:48 +02:00
Stephen Kelly
1fcf590b14 cmMakefile: Remove unused SubDirectoryOrder member.
The last use was removed in v2.4.0~2054 (ENH: add support for out
of source source, 2005-03-14)
2015-04-01 20:32:47 +02:00
Stephen Kelly
c3a60cc9cc cmMakefile: Remove AddExtraDirectory method.
It has no effect.
2015-04-01 20:32:47 +02:00
Bill Hoffman
a4a1b729c6 Fix warnings from clang scanbuild. 2015-03-25 12:38:37 -04:00
Brad King
15b06bc012 Merge topic 'cmAlgorithms-cleanup'
95dd238f cmRemoveDuplicates: Fix iterator -> const_iterator.
4448f175 cmInstalledFile: Move Property implementation out of line.
7916d7ba Include cmAlgorithms where it is used.
2015-03-12 15:26:35 -04:00
Stephen Kelly
7916d7bac6 Include cmAlgorithms where it is used. 2015-03-11 00:17:29 +01:00
Nils Gladitz
242c396656 add_custom_command: Diagnose MAIN_DEPENDENCY limitation.
The new policy CMP0057 diagnoses reuse of the same MAIN_DEPENDENCY across
multiple custom commands.
2015-03-09 12:45:38 +01:00