Commit Graph

18127 Commits

Author SHA1 Message Date
Stephen Kelly de21168612 Port to static cmPolicies API. 2015-05-04 22:32:20 +02:00
Stephen Kelly 13981f2068 cmPolicies: Make all API static. 2015-05-04 22:32:20 +02:00
Stephen Kelly 23e2bcc8db cmPolicies: Remove unused DefinePolicy method.
Policies are no longer defined at runtime.
2015-05-04 22:32:20 +02:00
Stephen Kelly 5641ba4fca cmPolicies: Remove unused cmPolicy class. 2015-05-04 22:32:20 +02:00
Stephen Kelly 3de5449703 cmPolicies: Loop over all policies using enum constants. 2015-05-04 22:32:19 +02:00
Stephen Kelly 387aff200c cmPolicies: Trivialize GetPolicyStatus method.
It would be possible to implement this with an XMacro and switch
statement, but every codepath currently would still return WARN.
2015-05-04 22:32:19 +02:00
Stephen Kelly dbf680d670 cmPolicies: Use more-direct ID access. 2015-05-04 22:32:19 +02:00
Stephen Kelly 8c204133e5 cmPolicies: Implement in terms of public API. 2015-05-04 22:32:19 +02:00
Stephen Kelly e3a8c0291e cmPolicies: Make private method file-static. 2015-05-04 22:32:19 +02:00
Stephen Kelly cb765af049 cmPolicies: Implement short description access with XMacros. 2015-05-04 22:32:18 +02:00
Stephen Kelly 5df267fa1d cmPolicies: Implement version check with XMacro. 2015-05-04 22:32:18 +02:00
Stephen Kelly 2235cfebee cmPolicies: Implement id to version with XMacro. 2015-05-04 22:32:18 +02:00
Stephen Kelly 05d8438860 cmPolicies: Implement id to string conversion with XMacro. 2015-05-04 22:32:18 +02:00
Stephen Kelly 6eaade8a82 cmPolicies: Introduce XMacro table for policy data.
Use it to populate the policy enum.
2015-05-04 22:32:18 +02:00
Stephen Kelly fdca04db68 cmPolicies: Implement more-compact IsPolicyNewerThan. 2015-05-04 22:32:17 +02:00
Stephen Kelly a7ff972751 cmPolicies: Parse string for id conversion.
Remove now-unused PolicyStringMap.
2015-05-04 22:32:17 +02:00
Stephen Kelly 953d1b00af cmPolicies: Make private method file-static. 2015-05-03 10:09:10 +02:00
Stephen Kelly 2c10494ab3 cmPolicies: Remove runtime check for programming errors. 2015-05-03 10:08:50 +02:00
Stephen Kelly 48f9fd39ad cmPolicies: Remove unused forward declaration. 2015-05-03 10:08:35 +02:00
Stephen Kelly fd0aa7434b cmPolicies: Remove unused static data. 2015-05-03 10:08:04 +02:00
Stephen Kelly a3291fe8ec cmPolicies: Remove unused header. 2015-05-03 10:07:58 +02:00
Stephen Kelly a6fb6db49d cmPolicies: Fix values for policies 57-60. 2015-05-03 10:07:48 +02:00
Kitware Robot 22a707e861 CMake Nightly Date Stamp 2015-05-02 00:01:06 -04:00
Brad King 514640411a Merge topic 'refactor-RaiseScope'
e8ae46e5 cmMakefile: Implement RaiseScope without relying on Parent.
30a021cc cmMakefile: Implement RaiseScope in terms of local Get method.
2015-05-01 13:16:16 -04:00
Brad King a588d1ee99 Merge topic 'fix-cmState-try_compile-languages'
27343e3b cmGlobalGenerator: Finish storing enabled languages in cmState
2015-05-01 13:16:12 -04:00
Brad King c1081a45d5 Merge topic 'cmComputeLinkInformation-minor-cleanup'
faede40b cmComputeLinkInformation: Reduce 'if' nesting in AddItem
2015-05-01 13:16:09 -04:00
Kitware Robot 59edc038d5 CMake Nightly Date Stamp 2015-05-01 00:01:05 -04:00
Stephen Kelly e8ae46e5e2 cmMakefile: Implement RaiseScope without relying on Parent. 2015-04-30 23:45:06 +02:00
Stephen Kelly 30a021cc22 cmMakefile: Implement RaiseScope in terms of local Get method.
The cmDefinitions::Get will change behavior in follow up commits.
2015-04-30 23:34:01 +02:00
Brad King 5e35d4a67f Merge topic 'refactor-cmDefinitions'
b48ea26a cmDefinitions: Invert conditional code.
5ccff640 cmDefinitions: Externalize looping for ClosureKeys.
f79cd99d cmDefinitions: Implement MakeClosure in terms of reverse iterators.
aa4d1ee8 cmDefinitions: Convert MakeClosure into a static method.
60becdc6 cmDefinitions: Implement MakeClosure in terms of a list of ancestors.
d858f363 cmDefinitions: Use list of cmDefinitions* to create closure.
aaaa65b6 cmMakefile: Remove stack adaptor for the VarStack.
f983d891 cmDefinitions: Replace recursion with loop.
24885d4e cmDefinitions: Replace private constructor with MakeClosure.
012a75a0 cmDefinitions: Make ClosureKeys API vector-based.
ca9fa77d cmDefinitions: Inline GetClosureKeys implementation.
78e1454e cmDefinitions: Replace ClosureKeys recursion with looping.
818bf727 cmDefinitions: Change LocalKeys to return a vector.
5067ae41 cmDefinitions: Externalize the Set logic.
60200ca5 cmDefinitions: Add an Erase method.
b43c162e cmMakefile: Use the Internal class to enclose the VarStack.
2015-04-30 11:19:20 -04:00
Brad King 735b7092e8 Merge topic 'if-IN_LIST'
aed6239e if: Implement new IN_LIST operator
2015-04-30 10:32:03 -04:00
Brad King b39929ab42 Merge topic 'revert-CMP0057'
32a2f414 Revert "add_custom_command: Diagnose MAIN_DEPENDENCY limitation."
2015-04-30 10:32:01 -04:00
Nils Gladitz aed6239e40 if: Implement new IN_LIST operator 2015-04-30 10:21:19 -04:00
Nils Gladitz 32a2f41402 Revert "add_custom_command: Diagnose MAIN_DEPENDENCY limitation."
This reverts commit 242c3966 (add_custom_command: Diagnose
MAIN_DEPENDENCY limitation, 2015-03-09) and the follow up commit
b372a99a (UseSWIG: Do not use MAIN_DEPENDENCY on custom commands,
2015-03-26).

I misdiagnosed the underlying issue that prompted creation of policy CMP0057.
The actual issue surfaces when a single custom command's MAIN_DEPENDENCY
is listed in more than one target; this issue will have to be addressed
independently.
2015-04-30 10:20:20 -04:00
Brad King 27343e3b68 cmGlobalGenerator: Finish storing enabled languages in cmState
In commit 74de9a73 (cmGlobalGenerator: Delegate storage of enabled
languages to cmState, 2015-04-11) the original LanguageEnabled
member of cmGlobalGenerator was left behind by mistake.  One use
of it in EnableLanguagesFromGenerator (for try_compile) was left,
but the member is not populated anymore.  Drop the member and
teach EnableLanguagesFromGenerator to copy the list of enabled
languages from one cmState to the other.

Reported-by: Matt McCormick <matt.mccormick@kitware.com>
2015-04-30 09:08:25 -04:00
Kitware Robot 0060e159fb CMake Nightly Date Stamp 2015-04-30 00:01:06 -04:00
Stephen Kelly b48ea26a9d cmDefinitions: Invert conditional code.
Return the simple case first.
2015-04-30 00:32:48 +02:00
Stephen Kelly 5ccff6408c cmDefinitions: Externalize looping for ClosureKeys. 2015-04-30 00:32:18 +02:00
Stephen Kelly f79cd99d6d cmDefinitions: Implement MakeClosure in terms of reverse iterators.
Iterate directly over the parent content provided by cmMakefile.
2015-04-29 23:54:20 +02:00
Stephen Kelly aa4d1ee80f cmDefinitions: Convert MakeClosure into a static method.
Accept a range of cmDefinitions*.
2015-04-29 23:54:17 +02:00
Stephen Kelly 60becdc65c cmDefinitions: Implement MakeClosure in terms of a list of ancestors. 2015-04-29 23:54:02 +02:00
Stephen Kelly d858f36339 cmDefinitions: Use list of cmDefinitions* to create closure. 2015-04-29 23:38:44 +02:00
Stephen Kelly aaaa65b6a5 cmMakefile: Remove stack adaptor for the VarStack.
The purpose of the stack is to allow access only to the top of it.  Access
to items which are not at the top is needed, so cmDefinitions objects
get a Parent pointer.

The existence of the Parent pointer is a workaround for the inappropriate
use of stack in the first place.  Remove it now.
2015-04-29 22:51:47 +02:00
Stephen Kelly f983d8913b cmDefinitions: Replace recursion with loop. 2015-04-29 22:51:46 +02:00
Stephen Kelly 24885d4efa cmDefinitions: Replace private constructor with MakeClosure. 2015-04-29 22:51:46 +02:00
Stephen Kelly 012a75a00f cmDefinitions: Make ClosureKeys API vector-based.
Construct the final list directly in a named return value.  Use
a single set to track bindings already found.

Co-Author: Brad King <brad.king@kitware.com>
2015-04-29 22:51:28 +02:00
Stephen Kelly ca9fa77d5d cmDefinitions: Inline GetClosureKeys implementation. 2015-04-29 22:49:05 +02:00
Stephen Kelly 78e1454ea0 cmDefinitions: Replace ClosureKeys recursion with looping. 2015-04-29 22:49:05 +02:00
Stephen Kelly 818bf727c1 cmDefinitions: Change LocalKeys to return a vector.
This is more efficient and we lose nothing.
2015-04-29 22:49:05 +02:00
Stephen Kelly 5067ae41b0 cmDefinitions: Externalize the Set logic. 2015-04-29 22:48:56 +02:00