Commit Graph

67 Commits

Author SHA1 Message Date
Brad King 31117bb17c Merge topic 'fix-buildsystem-property-append'
ed258d60 Tests: Cover set_property for buildsystem directory properties
fb45c371 cmState: Only append non-empty values to buildsystem properties.
158f7e31 cmMakefile: Use appropriate parameter name.
08ce3f48 cmTarget: Only append non-empty values to buildsystem properties.
2015-09-14 09:19:59 -04:00
Stephen Kelly 3f4e5e8c3d cmState: Return end snapshot for GetBuildsystemDirectoryParent.
This is the appropriate snapshot for future use.  Existing users
of this method are mostly just calling GetDirectory on the result,
but the progress tracking of the Makefile generator needs a consistent
snapshot to be used, so the end snapshot should be consistently used.
2015-09-11 23:17:27 +02:00
Stephen Kelly fb45c37160 cmState: Only append non-empty values to buildsystem properties.
This is a change in behavior from CMake 3.3, but there is no semantic meaning
to empty entries in buildsystem properties.  This also restores behavior to
that of CMake 2.8.10.
2015-09-11 19:12:46 +02:00
Stephen Kelly 158f7e31dc cmMakefile: Use appropriate parameter name. 2015-09-11 18:30:47 +02:00
Brad King 0d0b9b52f8 Merge topic 'cmState-ProjectName'
637c56b4 cmGlobalGenerator: Implement FillProjectMap in terms of cmState.
b3f2299e cmState: Move ProjectName from cmMakefile.
6ce940ac cmMakefile: Use std::string in ProjectName API.
e8c0341d cmMakefile: Out-of-line GetProjectName.
2015-08-27 10:04:09 -04:00
Brad King 6904b6efdc Merge topic 'rm-cmLocalGenerator-Children'
867b5be8 cmLocalGenerator: Remove unused Children member.
6c832219 cmLocalGenerator: Implement child traversal in terms of cmState.
3fcf3837 Makefiles: Remove valueless cast.
223f4a66 cmLocalGenerator: Simplify condition.
ae026f54 cmState: Store Children states in parent state.
2015-08-27 10:04:07 -04:00
Stephen Kelly b3f2299e06 cmState: Move ProjectName from cmMakefile. 2015-08-25 19:57:42 +02:00
Stephen Kelly ae026f5458 cmState: Store Children states in parent state. 2015-08-24 20:05:37 +02:00
Stephen Kelly af9fc27753 cmState: Make Snapshot EqualityComparable. 2015-08-24 20:03:29 +02:00
Stephen Kelly f4150bd88d cmState: Move directory Properties from cmMakefile. 2015-08-24 20:02:21 +02:00
Brad King 2370a99400 Merge topic 'cmState-definitions'
bff27391 cmState: Host variable definitions.
6954c893 cmState: Add a VariableScope snapshot type.
1fc645bd cmState: Add a Base snapshot type.
0f070dd3 cmMakefile: Decouple the container of cmDefinitions from scoping logic.
25e04ddf cmDefinitions: Implement in terms of cmLinkedTree.
4bbe261c cmMakefile: Extract InitializeVarScope method.
2015-08-24 10:07:04 -04:00
Brad King d5d86ecf50 Merge topic 'refactor-progress'
3fa1b964 cmGlobalUnixMakefileGenerator3: Change the progress container key.
55e39276 cmState: Make it possible to order cmState::Snapshot.
04168cbb cmGlobalUnixMakefileGenerator3: Rename member.
2394584c cmGlobalGenerator: Rename progress initializer method.
b9eb3cd1 cmGlobalGenerator: Move LG to target map to subclass.
f5d2b7a6 cmGlobalGenerator: Remove clearance of map.
2015-08-24 10:06:58 -04:00
Stephen Kelly bff27391a9 cmState: Host variable definitions. 2015-08-23 19:05:11 +02:00
Stephen Kelly 55e3927634 cmState: Make it possible to order cmState::Snapshot. 2015-08-23 18:05:13 +02:00
Stephen Kelly 6954c8936f cmState: Add a VariableScope snapshot type.
Match the scopes currently used in cmMakefile for definitions.
2015-08-23 17:08:54 +02:00
Stephen Kelly 1fc645bd9c cmState: Add a Base snapshot type.
For completeness mostly.
2015-08-23 17:08:54 +02:00
Brad King a4bd30104f include_directories: Fix regression in BEFORE option (#15693)
Refactoring in commit 6ed9c7e0 (cmState: Host buildsystem properties for
directories, 2015-07-18) broke include_directories(BEFORE).  Fix it and
add a test case.
2015-08-21 15:21:37 -04:00
Stephen Kelly 757a1f5408 cmState: Move PolicyState from cmMakefile.
Implement lexical scope checking in terms of the state stack instead
of barriers.
2015-08-02 08:56:57 +02:00
Stephen Kelly 52dbe654de cmState: Record the end position of each directory.
At generate time, variables and policies are determined from the end
state of the cmMakefile.
2015-08-02 08:56:57 +02:00
Stephen Kelly 348354333a cmState: Add Type for policy scope. 2015-08-02 08:56:57 +02:00
Stephen Kelly af0de01c6b cmState: Remove call stack parent tracking.
This was added at a time when I thought the cmState would report errors,
but that is not the direction it is going.  The ordering of the stack of
scopes is canonical and clients are required to maintain it.
2015-08-01 07:31:08 +02:00
Stephen Kelly 0a01e6c6e7 cmState: Add Snapshot Type accessor. 2015-08-01 07:18:34 +02:00
Stephen Kelly 6ed9c7e024 cmState: Host buildsystem properties for directories. 2015-07-25 14:53:05 +02:00
Brad King 8f0a5d84e3 cmState: Fix compilation on IBM XL compiler
Delay use of the PositionType constructor until after SnapshotDataType
is fully defined.
2015-07-25 14:52:05 +02:00
Brad King ae64efa1ce Merge topic 'cmState-Directory'
9ebc7502 cmState: Extract a Directory class.
27ec21db cmState: Forward-declare a type earlier.
2015-07-21 09:22:19 -04:00
Stephen Kelly 9ebc7502b2 cmState: Extract a Directory class.
Move Directory-scoped state accessors to it.  This will be expanded
with directory property state soon.
2015-07-18 19:37:58 +02:00
Stephen Kelly 2007d11caf cmState: Remove unused variable. 2015-07-18 14:40:12 +02:00
Brad King e30fe3eba2 Merge topic 'fix-command-rename'
d4f032b5 cmState: Restore renamed commands on cleanup.
2015-07-13 09:17:46 -04:00
Stephen Kelly d4f032b546 cmState: Restore renamed commands on cleanup.
Commit v3.3.0-rc1~196^2~7 (cmake: Simplify command clean up
loop., 2015-04-12) introduced a bug that built-in commands which
were renamed no longer had their original name restored when
cleanup is performed between configure runs.  Check for that
and restore the commands with their original name.

Extend the complex test for this. That test is run by ctest with
the --build-two-config command line option.
2015-07-12 10:09:54 +02:00
Stephen Kelly 6361f68056 cmState: Store execution context.
Extend snapshot creation API to store the file being executed and the
entry point to get to that context.
2015-07-06 01:37:15 +02:00
Stephen Kelly 94704d759c cmState: Add GetCallStackParent method. 2015-07-05 16:56:36 +02:00
Stephen Kelly a8e5446024 cmState: Store snapshots for more different types.
Adjust cmMakefile implementation to create the snapshots.
2015-07-04 11:51:27 +02:00
Stephen Kelly 217c243db0 cmake: Update the current snapshot when Resetting.
This will matter when definitions are stored in the cmState.
2015-06-21 20:19:53 +02:00
Stephen Kelly ccf7760f00 cmOutputConverter: Constify API. 2015-06-21 20:13:28 +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 d18852d596 Merge topic 'extract-cmOutputConverter'
59e21ffa Port static calls from cmLocalGenerator to cmOutputConverter.
242dcc2c cmListFileBacktrace: Replace local generator with cmState::Snapshot.
1cff330b cmTarget: Port to cmOutputConverter.
2f1bd62b cmCustomCommandGenerator: Port to cmOutputConverter.
0f2a1324 cmCommandArgumentParserHelper: Port to cmOutputConverter.
4d8b79ad cmComputeLinkInformation: Port to cmOutputConverter.
8680520f cmMakefile: Make the cmState::Snapshot accessible.
6d7abb63 cmOutputConverter: Extract from cmLocalGenerator.
a8244157 cmState::Snapshot: Provide accessor for the cmState.
1f4ef396 cmLocalGenerator: Remove some commented lines of code.
2015-06-08 13:54:02 -04: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 9058e27a43 Constify property definition API. 2015-06-07 09:29:30 +02:00
Stephen Kelly 4e5c70abe2 cmState: Extract a cmLinkedTree container adaptor.
This will be used to contain most of the content of the cmState
in several different trees.  Refer to the BuildsystemDirectory
state from the SnapshotData state.  Currently these trees have
the same structure, but that will change when we have more snapshot
types.
2015-06-04 21:20:59 +02:00
Stephen Kelly 7b9c75860d cmState: Group BuildsystemDirectory state together in a struct.
It needs to be snapshotted independently of other state.
2015-06-04 20:44:37 +02:00
Stephen Kelly 1b323949fe cmState: Extend Snapshot concept with a SnapshotType.
Store it together with the Parent position.
2015-06-04 20:44:37 +02:00
Stephen Kelly a824415724 cmState::Snapshot: Provide accessor for the cmState. 2015-06-04 20:20:25 +02:00
Stephen Kelly cf1233a0ea cmState: Rename GetParent method.
Leave the namespace open for other Parent types.
2015-06-03 01:15:03 +02:00
Stephen Kelly 942df88bf8 cmState: Rename CreateSnapshot method.
Leave the namespace open for other snapshot types.
2015-06-03 01:14:34 +02:00
Stephen Kelly da28f11523 cmState: Add CreateBaseSnapshot method. 2015-06-03 01:14:33 +02:00
Stephen Kelly 3b880a0741 cmLocalGenerator: Require a valid cmState::Snapshot in the ctor.
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.
2015-05-27 09:18:32 -04:00
Stephen Kelly e12afe766e cmState: Host some state from the cmGlobalGenerator. 2015-05-27 09:18:31 -04:00
Stephen Kelly 01e1cd5c1f cmState: Move snapshot creation to the cmake instance.
Don't create a snapshot in Initialize(), but leave the creation
responsibility to the cmake instance instead.  Previously, the
cmState would Initialize() in its constructor, and the cmake instance
would re-Initialize() during Configure().  The end result was the
same and there would be one snapshot present.  However, cmLocalGenerator
also created a snapshot on construction, and that one was used, leaving
the first snapshot unused, and potential for off-by-one errors.

Fix that by making the cmLocalGenerator use the existing snapshot
if it is top-level.  Add a CurrentSnapshot to the cmake instance and
populated it while configuring a directory.  This will eventually
replace the 'current local generator' concept.  Fix the GetParent
implementation to be able to return the first snapshot.
2015-05-24 13:30:24 +02:00
Stephen Kelly 9e4b6cc2ce cmState: Store computed relative paths to to current directories. 2015-05-16 08:12:02 +02:00