Commit Graph

27737 Commits

Author SHA1 Message Date
Stephen Kelly 95a27267da cmMakefile: Extract conditional code to caller. 2015-04-18 15:31:17 +02:00
Stephen Kelly 7d24854736 cmMakefile: Remove intermediate variable. 2015-04-18 15:31:17 +02:00
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
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
Brad King f4e5a0e6aa Merge topic 'FPHSA-updates'
84f06d0c FPHSA: Document REQUIRED_VARS recommendation (#15352)
a3ad275c FPHSA: Revise and format documentation
d1a6d15b FPHSA: Always populate the ExactCase_FOUND variable (#15412).
2015-04-17 10:50:10 -04:00
Brad King 84f06d0c84 FPHSA: Document REQUIRED_VARS recommendation (#15352)
State explicitly that the variables specified are user-facing.
2015-04-17 10:46:25 -04:00
Brad King a3ad275ce0 FPHSA: Revise and format documentation
Use better reStructuredText markup and add cross-references.
2015-04-17 10:46:24 -04:00
Stephen Kelly d1a6d15bcd FPHSA: Always populate the ExactCase_FOUND variable (#15412).
The UPPERCASE name was inconsistent with config-packages, the
find_dependency macro, and even FPHSA itself, which expects
components to be specified with names matching ExactCase.

The FOUND_VAR was only permitted to have two possible values, and
now both are set for compatibility.  Document it as obsolete, and
adjust the code for the same.  Users of the variable should just
remove it.
2015-04-17 10:46:24 -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 15f1a6b499 Tests/QtAutogen: Avoid touching files in the source tree 2015-04-16 15:06:32 -04:00
Brad King 3f7c7c6596 Tests/QtAutogen: Help Qt5Autogen test find Qt5 on Windows
Set CMAKE_PREFIX_PATH to tell find_package(Qt5) where to look.
2015-04-16 15:06:31 -04:00
Brad King 26b5cc5e79 Tests/QtAutogen: Enable per-config source tests when possible
Pass CMAKE_BUILD_TYPE into the test on generators that use it so that
the per-config part of the test can activate as needed.  Do not make the
per-config part conditional on the Debug configuration because the
generator expressions evaluate to empty in other configurations.

Skip the per-config source case with the Ninja generator because it does
not currently work.  cmQtAutoGenerators::InitializeAutogenTarget needs
to know the list of source files on a target, but generator expressions
in the list cannot be evaluated until after CreateGeneratorTargets has
been called.  That cannot happen until after Autogen targets have been
generated.  It is a chicken-and-egg problem.
2015-04-16 15:00:26 -04:00
Brad King 4556640855 Tests/QtAutogen: Require CMake 3.1 to set policies everywhere
We want CMP0020 set in the autorcc_depends test.  Also the test should
now only run when we can support per-config source files.
2015-04-16 14:18:00 -04:00
Brad King 53ef9a0a9e Merge topic 'UseSWIG-use-absolute-path'
dd7e31bc UseSWIG: Fix module name detection with relative source file (#15508)
2015-04-16 09:58:52 -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 ea394c63aa Merge topic 'test-xl-preprocess-updates'
baef72f2 Tests: Update Preprocess test for XL compiler limitations
2015-04-15 11:46:15 -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
Brad King 9212d0a75d Merge topic 'doc-ctest-update-option-wording'
fef1f267 Help: Fix {GIT,P4}UpdateCustom documentation (#15512)
2015-04-15 11:46:10 -04:00
Brad King 3ad9fe6329 Merge topic 'FindMatlab-test-timeout'
bb2a42ae Tests: Increasing the stability of the FindMatlab.basic_checks test
2015-04-15 11:46:08 -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