18057 Commits

Author SHA1 Message Date
Stephen Kelly
9db1595410 cmMakefile: Move condition to the only calling context where it is true.
Call the Internal method with equivalent parameters, passing a null first
argument.

A duplicate path computation exists inside the external_in condition now,
but that is harmless at this point.
2015-04-18 15:31:11 +02:00
Stephen Kelly
5d4480a8c7 cmMakefile: Populate CMAKE_PARENT_LIST_FILE in callers.
Because all external callers of this method pass a null first
parameter, this change has no effect for them.

This also makes it obvious that the CMAKE_PARENT_LIST_FILE is set to
the name of the file being read itself for CMakeLists.txt files,
which may not make any sense.
2015-04-18 15:29:20 +02:00
Stephen Kelly
3a8ac2423e cmMakefile: Collapse nested conditional. 2015-04-18 15:29:19 +02:00
Stephen Kelly
5947d9b031 cmMakefile: Convert filenametoread into a std::string.
Remove other intermediate variables.
2015-04-18 15:29:19 +02:00
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
fc7ab8874b CPack: Read the config listfile in the normal way.
This is a unique function call in CMake, and it was likely a
programming error when introduced.  All other similar calls to
ReadListFile use a null first paramter.

The effect of this patch is to no-longer define CMAKE_PARENT_LIST_FILE
to the config file itself while evaluating it.

The ReadListFile method also no longer hits a condition that it uses
CollapseFullPath on the input file.  However, as cpack does not
set the StartDirectory anyway, this has no effect. See bug 15522.
2015-04-18 15:26:12 +02:00
Kitware Robot
a0bc4a999d CMake Nightly Date Stamp 2015-04-18 00:01:06 -04:00
Gregor Jasny
6693590f81 Xcode: Refine quoting rules for Strings
$ and . do not need to be quoted, but brackets and * must be to
not confuse the Xcode parser.
2015-04-17 21:50:05 +02:00
Gregor Jasny
a6331eb851 Xcode: Let PrintComment decide if the comment is non-empty 2015-04-17 21:50:05 +02:00
Gregor Jasny
6e8952c193 Xcode: PrintComment will prepend a whitespace itself before the comment 2015-04-17 21:50:05 +02:00
Gregor Jasny
4bd2544b25 Xcode: Do not add whitespace after attribute group opening brace
This suppresses the extra space that would be generated if the
separator is a space. The conditional block is also used in this
form elsewhere.
2015-04-17 21:50:04 +02:00
Gregor Jasny
5cb4c8380d Xcode: Properly indent PBXFileReference and PBXBuildFile
Move indent factor change behind indention of start-of-line.
2015-04-17 21:50:04 +02:00
Gregor Jasny
a723427b64 Xcode: Remove extra space in PBXProject comment 2015-04-17 21:50:04 +02:00
Gregor Jasny
2fe8bca580 Xcode: Add comment after root object 2015-04-17 21:50:04 +02:00
Gregor Jasny
2e0e205e28 Xcode: Indent using tabs 2015-04-17 21:50:04 +02:00
Gregor Jasny
7b68c8df6b Xcode: Sort Xcode objects by Id
this patch series aims to minimize deltas between the CMake Xcode
generator and Xcode itself. It was started by the observation that
if one makes any change to the project within Xcode (e.g. to see
how a variable is called internally) the user cannot diff the CMake
project and the one stored by Xcode afterwards.

Xcode keeps the objects ordered by the object id.
Because cmake stores them into an unordered container
at creation time they must be sorted before writing the
pbxproj file.

I tested this series with Xcode 6.3 and Xcode 3.2. Both show a
reduced diff after this series was applied.
2015-04-17 21:49:05 +02:00
Brad King
1f1b62b0e2 Merge topic 'cpack-one-component-only'
ed0b0630 CPack: Fix single component packaging
2015-04-17 10:50:15 -04:00
Brad King
9efee16a7a Merge topic 'ninja-autogen'
e8fdd5f1 QtAutogen: Workaround rcc CRCRLF newlines on Windows (#15459)
15f1a6b4 Tests/QtAutogen: Avoid touching files in the source tree
3f7c7c65 Tests/QtAutogen: Help Qt5Autogen test find Qt5 on Windows
26b5cc5e Tests/QtAutogen: Enable per-config source tests when possible
45566408 Tests/QtAutogen: Require CMake 3.1 to set policies everywhere
2015-04-17 10:50:13 -04:00
Kitware Robot
a4d201a747 CMake Nightly Date Stamp 2015-04-17 00:01:05 -04:00
Raffi Enficiaud
ed0b063085 CPack: Fix single component packaging
Refine logic added in commit 0ffd3534 (CPack single component packaging,
2015-04-02).  Component packaging should be enabled if either at least
one component or one group is set and should not require both.
2015-04-16 16:29:33 -04:00
Brad King
e8fdd5f12a QtAutogen: Workaround rcc CRCRLF newlines on Windows (#15459)
The 'rcc --list' operation may print newlines of the form CRCRLF,
so strip any trailing CR characters found on each line.

Update the Tests/QtAutogen test to use a resource named in a
subdirectory.  This causes 'rcc --list' to display a blank line
and tests that it is correctly filtered out.
2015-04-16 15:10:40 -04:00
Brad King
2ee128d9c8 Merge topic 'vs10-no-macros'
885ab9ab VS: Drop reload macros for VS >= 10 (#11258,#14680)
2015-04-16 09:58:50 -04:00
Brad King
ab033b0789 Merge topic 'vs70-deprecate'
7b8e7c4a Deprecate Visual Studio 7 generator (.NET 2002)
2015-04-16 09:58:48 -04:00
Brad King
5a45497fc1 Merge topic 'vs6-deprecate'
85c2626b Deprecate Visual Studio 6 generator
2015-04-16 09:58:45 -04:00
Kitware Robot
532644ea14 CMake Nightly Date Stamp 2015-04-16 00:01:04 -04:00
Brad King
8469b6f694 Merge topic 'port-global-properties-to-cmState'
5d056c0d Port Global property interaction to cmState.
de722d7d Move property initialization to cmState.
9b5f80a8 Move global properties to cmState.
0076b5d8 cmake: Remove the happy global property scope pattern.
24b7f31d cmake: Remove unused cmCommand methods.
0aec4913 Port cmCommand consumers to cmState.
96f8c5f9 cmState: Move cmCommand-related methods from cmake class.
97e53ebb cmake: Simplify command clean up loop.
1e738bcf cmake: Simplify RemoveUnscriptableCommands algorithm.
62854e99 cmState: Move try_compile state from cmake class.
db8425be cmake: Get enabled languages from cmState.
74de9a73 cmGlobalGenerator: Delegate storage of enabled languages to cmState.
b159bff7 Move property definition to cmState.
2015-04-15 11:46:17 -04:00
Brad King
fc579b91e0 Merge topic 'doc-ninja-non-experimental'
9ac05683 Ninja: Drop 'experimental' label in documentation
2015-04-15 11:46:12 -04:00
Stephen Kelly
5d056c0dd8 Port Global property interaction to cmState. 2015-04-15 11:43:50 -04:00
Stephen Kelly
de722d7d63 Move property initialization to cmState. 2015-04-15 11:43:50 -04:00
Stephen Kelly
9b5f80a83c Move global properties 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
24b7f31d3a cmake: Remove unused cmCommand methods. 2015-04-15 11:43:50 -04:00
Stephen Kelly
0aec491328 Port cmCommand consumers to cmState. 2015-04-15 11:43:49 -04:00
Brad King
885ab9ab37 VS: Drop reload macros for VS >= 10 (#11258,#14680)
We never implemented them for VS 11 (2012), 12 (2013), or 14 (2015).
For VS 10 (2010) the reload macro does not work correctly when run from
inside a build launched through the IDE because stopping the build kills
the CMake that is driving the reload.  Fortunately VS >= 10 know how to
reload the whole solution anyway.
2015-04-15 09:58:42 -04:00
Brad King
7b8e7c4ac3 Deprecate Visual Studio 7 generator (.NET 2002)
Update documentation to mark the generator deprecated.  Add a warning at
the end of generation plus an option to turn off the warning.
2015-04-15 09:21:24 -04:00