Commit Graph

21515 Commits

Author SHA1 Message Date
Stephen Kelly
cde6eb6249 cmState: Port dependent code to new cmStateSnapshot name 2016-10-19 15:40:59 +02:00
Stephen Kelly
a9bf981a4c cmState: Move Snapshot type to separate namespace
Leave behind a typedef to avoid porting dependent code in this commit.
2016-10-19 15:40:58 +02:00
Stephen Kelly
17d27893e6 cmState: Port dependent code to new cmStateDirectory name 2016-10-19 15:40:58 +02:00
Stephen Kelly
34bcec39c6 cmState: Move Directory class to separate namespace
Leave behind a typedef to avoid porting dependent code in this commit.
2016-10-19 15:40:58 +02:00
Stephen Kelly
2fe3e55d53 cmState: Move CacheEntryType enum to separate namespace
Port dependent code to the change.
2016-10-19 15:40:58 +02:00
Stephen Kelly
a49751fb2e cmState: Move TargetType enum to separate namespace 2016-10-19 15:40:58 +02:00
Stephen Kelly
0060391dff cmState: Move SnapshotType enum to separate namespace 2016-10-18 21:28:46 +02:00
Stephen Kelly
5bc964eddb cmState: Move PositionType to separate namespace
Remove friend declarations supporting it being a nested type.
2016-10-18 21:28:46 +02:00
Stephen Kelly
2dc4099648 cmState: Move PolicyStackEntry to separate namespace 2016-10-18 21:28:45 +02:00
Stephen Kelly
cb40af5d6f cmState: Move SnapshotDataType to separate namespace 2016-10-18 21:28:45 +02:00
Stephen Kelly
1205f75e3b cmState: Move nested struct into separate top-level namespace
Add a friend declaration to give the struct access to
cmState::PositionType.  This will be removed when that type is also
extracted.
2016-10-18 21:28:45 +02:00
Stephen Kelly
163991dd83 cmServerProtocol: Remove unused header 2016-10-18 21:28:45 +02:00
Stephen Kelly
51f89932c0 cmCommandArgumentParserHelper: Remove unused header 2016-10-18 21:28:44 +02:00
Brad King
a5f0e62988 Merge topic 'timeout_after_match_testtime'
909842ff CTest: report time spent after matching output
2016-10-18 08:43:03 -04:00
Brad King
99177a2029 Merge topic 'propagate_ctest_use_launchers'
19beee46 ctest_configure: Propagate CTEST_USE_LAUNCHERS from caller to project
2016-10-18 08:43:00 -04:00
Brad King
9519d79b63 Merge topic 'math-EXPR-unary'
2810e561 math(EXPR): Add support for unary `+` and `-` expressions
834f52a6 cmExprParser: Revise indentation style to match rest of CMake
7aaed265 cmExprParser: Port to bison 3
2016-10-18 08:42:54 -04:00
Kitware Robot
e46350ffd9 CMake Nightly Date Stamp 2016-10-18 00:01:03 -04:00
Zack Galbreath
909842fff9 CTest: report time spent after matching output
When using the TIMEOUT_AFTER_MATCH test property, only report the
time spent by the test after the matching output was found.
2016-10-17 11:24:32 -04:00
Bill Hoffman
19beee46cc ctest_configure: Propagate CTEST_USE_LAUNCHERS from caller to project
If `CTEST_USE_LAUNCHERS` is `TRUE` in a CTest script then the
`ctest_configure` command will add `-DCTEST_USE_LAUNCHERS:BOOL=TRUE` to
the cmake command used to configure the project.  This allows a project
to only set `CTEST_USE_LAUNCHERS` in a ctest script and have launchers
work.
2016-10-17 11:15:36 -04:00
Brad King
188c762f8a Merge topic 'extract-computed-target-properties'
cef59bb8 cmTarget: Implement GetProperty in terms of cmState::Snapshot
0d57b07a cmTarget: Group code for checking written properties together
c3fb0d95 cmTarget: Move sanity checks and computed property access to callers
fa9dbc56 cmGeneratorTarget: Implement cmTargetPropertyComputer interface
848ae2a6 cmTargetPropertyComputer: Template some methods on the Target
a0a720e6 cm{,Generator}Target: Add global generator accessors
637e3f3e cmTargetPropertyComputer: Unify whitelist handling from cmTarget
05251e6d cmTargetPropertyComputer: Move whitelist check from cmTarget
fbf1721c cmTargetPropertyComputer: Extract into new files
390a7d86 cmTargetPropertyComputer: Implement GetProperty without cmMakefile
e32a6bdd cmListFileBacktrace: Add a method to retrieve the Bottom of a snapshot
7863fba1 cmTarget: Extract GetLocation method
8096682e cmTarget: Extract GetSources method
7d57c1a2 cmTarget: Extract location computation methods
a55cac4b cmTarget: Split property computation into separate class
705fcf52 cmTarget: Move IMPORTED check to callers
...
2016-10-17 10:15:21 -04:00
Brad King
9a2048f1ea Merge topic 'extract-cmRulePlaceholderExpander'
b59b6dd9 cmRulePlaceholderExpander: Port clients to direct-use
bdddd423 cmRulePlaceholderExpander: Extract from cmLocalGenerator
f796e1b6 cmLocalGenerator: Move memset to cxx file
c75a9d66 cmLocalGenerator: Use strings instead of a Target in rule replacement
46ad0d21 cmLocalGenerator: Use a converter in rule replacement API
2628dec1 cmLocalGenerator: Store variable replacements as state
315b9a31 cmLocalGenerator: Merge loops which populate mapping
d5feb5b3 cmLocalGenerator: Populate variable mapping for all replacements
efba22e1 cmLocalGenerator: Extract compiler option replacement from loop
b29425f7 cmLocalGenerator: Populate a container of mappings for replacements
f009d8f5 cmLocalGenerator: Move compiler option handling to be more direct
6cd27a85 cmLocalGenerator: Move variable to where it can be used easily
8b0e4795 cmLocalGenerator: Use the language from the compiler container
88016e2e cmLocalGenerator: Introduce a container of compiler names
be87cb0c cmLocalGenerator: Simplify loop with range algorithm
425cd167 cmLocalGenerator: Remove the launcher from RuleVariables
2016-10-17 10:15:17 -04:00
Brad King
248527ed93 Merge topic 'refactor-folder-name-retrieval'
3b6f1587 Factor IDE folder name retrieval out into helper method
2016-10-17 10:15:15 -04:00
Brad King
274ff52092 Merge topic 'cmcldeps-more-safety'
70e268da cmcldeps: prefer the /TC flag
47092d3e cmcldeps: append strings as strings
7db671a1 cmcldeps: search for single-byte strings as characters
2016-10-17 10:15:12 -04:00
Gregor Jasny
3b6f1587be Factor IDE folder name retrieval out into helper method
Add a `cmGeneratorTarget::GetEffectiveFolderName` helper to abstract
lookup of the `FOLDER` property in combination with checking for
generator support of folders.
2016-10-17 10:06:18 -04:00
Kitware Robot
0cbe2edb23 CMake Nightly Date Stamp 2016-10-17 00:01:03 -04:00
Stephen Kelly
cef59bb8ba cmTarget: Implement GetProperty in terms of cmState::Snapshot 2016-10-16 13:57:53 +02:00
Stephen Kelly
0d57b07ad9 cmTarget: Group code for checking written properties together 2016-10-16 13:57:53 +02:00
Stephen Kelly
c3fb0d95ad cmTarget: Move sanity checks and computed property access to callers
The GetProperty method is now just accessing contained data, meaning it
can be implemented in cmState.

Remove the cmMakefile context from the signature as a result and remove
the overload with the same signature.

Add a GetComputedProperty to cmTarget so that templates can be properly
instantiated.  Otherwise the Commands would need to be able to reach the
specializations which are currently in cmTarget.cxx.

As a side-effect, the CMP0026 warning now gives a backtrace to the
target when issued from a generator expression.
2016-10-16 13:56:12 +02:00
Kitware Robot
5ebba22882 CMake Nightly Date Stamp 2016-10-16 00:01:17 -04:00
Stephen Kelly
b59b6dd9d2 cmRulePlaceholderExpander: Port clients to direct-use
Add a factory function to cmLocalGenerator so that variableMappings can
be provided from it, and so that Ninja can always have a hard-coded
TargetImpLib.
2016-10-15 11:25:12 +02:00
Stephen Kelly
bdddd4234e cmRulePlaceholderExpander: Extract from cmLocalGenerator
Implement cmLocalGenerator::ExpandRuleVariables in terms of the new
class for source compatibility and to reduce diff noise in this commit.
2016-10-15 11:25:12 +02:00
Stephen Kelly
f796e1b6f6 cmLocalGenerator: Move memset to cxx file 2016-10-15 11:25:12 +02:00
Stephen Kelly
c75a9d6601 cmLocalGenerator: Use strings instead of a Target in rule replacement
Don't rely on the cmGeneratorTarget type needlessly.
2016-10-15 11:25:12 +02:00
Stephen Kelly
46ad0d2183 cmLocalGenerator: Use a converter in rule replacement API
The rule replacement API should not really be in cmLocalGenerator, but
it was historically, and this coupled many other things together here
too, such as output conversion.  Make the output converter a parameter
so that rule replacement can be removed from cmLocalGenerator.
2016-10-15 11:25:12 +02:00
Stephen Kelly
2628dec12c cmLocalGenerator: Store variable replacements as state
These do not change over the lifetime of the cmLocalGenerator.
2016-10-15 11:25:12 +02:00
Stephen Kelly
315b9a3189 cmLocalGenerator: Merge loops which populate mapping 2016-10-15 11:25:12 +02:00
Stephen Kelly
d5feb5b34c cmLocalGenerator: Populate variable mapping for all replacements
This reduces the final replacement to a simple query in the map, which
is much more readable than what was here before.
2016-10-15 11:25:12 +02:00
Stephen Kelly
efba22e1de cmLocalGenerator: Extract compiler option replacement from loop
There is no need to be in the loop.  Being there just adds to
complexity.
2016-10-15 11:25:12 +02:00
Stephen Kelly
b29425f7aa cmLocalGenerator: Populate a container of mappings for replacements
The same variables are replaced/retrieved from cmMakefile again and
again.  Use a container so that they don't have to be retrieved
repeatedly, and to simplify the nested loop.
2016-10-15 11:25:12 +02:00
Stephen Kelly
f009d8f5e2 cmLocalGenerator: Move compiler option handling to be more direct 2016-10-15 11:25:12 +02:00
Stephen Kelly
6cd27a853a cmLocalGenerator: Move variable to where it can be used easily 2016-10-15 11:25:12 +02:00
Stephen Kelly
8b0e479568 cmLocalGenerator: Use the language from the compiler container
This is just to make follow-up diffs smaller.
2016-10-15 11:25:12 +02:00
Stephen Kelly
88016e2e9f cmLocalGenerator: Introduce a container of compiler names
Use it to determine when a rule replacement should gain extra options.
2016-10-15 11:25:12 +02:00
Stephen Kelly
be87cb0c44 cmLocalGenerator: Simplify loop with range algorithm 2016-10-15 11:25:12 +02:00
Stephen Kelly
425cd1670f cmLocalGenerator: Remove the launcher from RuleVariables
This one is not like the others as it doesn't participate in
substitutions.  Keep ExpandRuleVariables doing only one thing and make
callers responsible for inserting a launcher prefix, simplifying the
code all-around.

Remove now-obsolete InsertRuleLauncher method.
2016-10-15 11:25:12 +02:00
Stephen Kelly
fa9dbc56a1 cmGeneratorTarget: Implement cmTargetPropertyComputer interface
Populate a local member for the sources property when the instance is
created.  Pass the parameter to avoid the policy check when doing so.
Ordinarily, the GetSources function should not be called unconditionally
(at generate time), but we need to do so here in case the property is
read in a generator expression.  The intent is to be able to implement
cmGeneratorTarget without requiring cmTarget.
2016-10-15 11:14:21 +02:00
Stephen Kelly
848ae2a663 cmTargetPropertyComputer: Template some methods on the Target
Implement the methods for cmTarget in the cmTarget source.
2016-10-15 11:14:21 +02:00
Stephen Kelly
a0a720e6a7 cm{,Generator}Target: Add global generator accessors
Provide 'static polymorphism' between the types in this aspect so that
they can be used indiscriminately in a C++ template.
2016-10-15 11:14:21 +02:00
Stephen Kelly
637e3f3ee1 cmTargetPropertyComputer: Unify whitelist handling from cmTarget 2016-10-15 11:14:21 +02:00
Stephen Kelly
05251e6d80 cmTargetPropertyComputer: Move whitelist check from cmTarget 2016-10-15 11:14:21 +02:00