Commit Graph

2818 Commits

Author SHA1 Message Date
Brad King bbc82d85e5 Merge topic 'fix-Qt-autogen'
f7ae1d8a QtAutogen: Short-circut some logic when moc is not available.
4b989d5f QtAutogen: Separate source file processing from AUTOMOC.
c48d877d QtAutogen: Make some methods appropriately file-static.
394e86df QtAutogen: Fix autouic target options in the presence of a config.
964d7f2a QtAutogen: Remove unused variables.
0d934efd QtAutogen: Remove read of SKIP_AUTOUIC target property.
321e348e QtAutogen: Use Qt 4 IMPORTED targets to find executable locations.
e96683b0 Qt4: Use IMPORTED executable names with custom commands.
e6182f5d Qt4: Create IMPORTED executable targets for all Qt executables.
2014-01-29 10:05:04 -05:00
Brad King fed6c73e1d Merge topic 'ExternalProject-git-submodules'
819015ef ExternalProject: Add option GIT_SUBMODULES
2014-01-29 10:05:03 -05:00
Brad King 5e4b8871bc Cygwin: Avoid legacy warnings in RunCMake.CMP004[1235] tests
Set the minimum required version of CMake high enough to avoid the
warning for CMAKE_LEGACY_CYGWIN_WIN32.  The warning appears on stderr
and breaks the expected output matching.
2014-01-28 17:07:56 -05:00
Stephen Kelly f7ae1d8ad6 QtAutogen: Short-circut some logic when moc is not available.
This is the case when AUTOMOC is false.  This prevents creating rules
to moc the files in the absense of moc.
2014-01-28 21:04:40 +01:00
Stephen Kelly 321e348e13 QtAutogen: Use Qt 4 IMPORTED targets to find executable locations.
Avoid using the moc from Qt 5 with Qt 4 based targets. Moc generates
a version check to ensure that such generated code does not compile.

The Qt4And5Automoc unit test should have been testing this, but it
was not because the test was broken. In that unit test, moc was run
on trivial files which have no significant content, and in particular
no Q_OBJECT macro.  Therefore moc was generating empty files which
do not even contain the version check.  Fix this by generating files
for input to moc at cmake time.
2014-01-28 21:04:10 +01:00
Gereon Kremer 819015ef3a ExternalProject: Add option GIT_SUBMODULES
This option allows to filter the submodules that are checked out.
Add a simple testcase for GIT_SUBMODULES option passing an empty list.
2014-01-28 12:51:27 -05:00
Brad King 5781842bc2 Merge topic 'ctest-update-p4-unknown-revision'
243cfc2f ctest_update: Handle P4 unknown revisions more robustly
2014-01-27 13:03:37 -05:00
Brad King 20263b719f Merge topic 'robust-ep-download-verify'
a432b93b file DOWNLOAD: Display the curl result status when a hash mismatch occurs.
1cb9ef81 file DOWNLOAD: Test non-zero return status.
f73f0fb3 file DOWNLOAD: Add test for bad hash.
b5e2265f ExternalProject: Reattempt download when verification fails.
2014-01-27 13:03:33 -05:00
Pedro Navarro 243cfc2f6f ctest_update: Handle P4 unknown revisions more robustly
Mark unknown revisions as such and fail instead of reporting revision 0.
Otherwise CTest reports massive file updates between revisions when the
server timeouts while trying to fetch the current revision number.
2014-01-22 08:33:33 -05:00
Brad King 82d4317503 Allow projects to specify extra inputs to CMake
Define a new 'CMAKE_CONFIGURE_DEPENDS' directory property that projects
can use to specify input files to the CMake configuration process.
Extend the RunCMake.Configure test to verify that the build system
re-runs CMake when this input changes.
2014-01-21 14:14:49 -05:00
Brad King 1ef444d678 Add test case to verify CMake does not re-run on first build
Extend the RunCMake.Configure with a case to verify that the CMake
configuration process does not immediately re-run the first time that
the generated build system is invoked.
2014-01-21 13:57:15 -05:00
Brad King 94389f6388 cmake: Add '-E sleep' command
Add a cmake command-line interface to provide a cross-platform 'sleep'.
2014-01-21 13:50:49 -05:00
Brad King e0228e2b04 cmake: Improve '-E create_symlink' edge case handling (#14713)
The logic added by commit ffc0b5e4 (Overwrite the symlink if it already
exists, 2007-02-15) does not recognize and remove existing broken links
before replacing them.  Improve the logic to remove any existing
destination file or link (but not directory).  On failure, report an
error message explaining why the existing path could not be removed or
the new one could not be created.

Add a RunCMake.CommandLine test to cover 'cmake -E' cases.  Start with
test cases covering 'cmake -E create_symlink' behavior on UNIX platforms.
2014-01-20 14:02:21 -05:00
Brad King d4ca30ae15 Tests/RunCMake: Add function to run a specified command-line
Add a 'run_cmake_command' function that can be used by tests to run a
given command-line and check the results rather than always running a
CMake configuration process.  This can be used in the future to test
'cmake -E' for example.
2014-01-20 13:46:51 -05:00
Brad King 392a6553f9 Tests/RunCMake: Move documentation to a README.rst 2014-01-20 13:46:24 -05:00
Matt McCormick 1cb9ef8173 file DOWNLOAD: Test non-zero return status. 2014-01-15 19:43:25 -05:00
Matt McCormick f73f0fb357 file DOWNLOAD: Add test for bad hash. 2014-01-15 19:43:23 -05:00
Rolf Eike Beer 3a0d164bb2 allow to mark a test as "Not Run" with a specific return code (#8466) 2014-01-14 23:57:40 +01:00
Brad King cb8c9dd01b Merge topic 'missing-dependency-error'
0bf6f13b AddDependencies: new policy requires dependencies to exist
2014-01-13 10:25:33 -05:00
Nils Gladitz 0bf6f13b1d AddDependencies: new policy requires dependencies to exist
Added new policy CMP0046 which requires dependencies added by
add_dependencies() to actually exist.
2014-01-12 12:58:04 +01:00
Stephen Kelly dea71aae6d Tests: Fix find-package mode test.
The all target was depending on the clean and pngtest targets, but
when running the tests with -jN, those can be executed out of order.

Make the main.o target depend on the clean target instead to fix
this.
2014-01-11 13:58:23 +01:00
Brad King 674bfadef0 Merge topic 'remove-duplicate-file'
fcd5531 Tests: Remove .orig file.
2014-01-10 09:19:51 -05:00
Stephen Kelly fcd5531004 Tests: Remove .orig file.
Introduced in commit be0458c5 (InstallRules: added new variable to
disable generation of install rules, 2013-12-25).
2014-01-10 10:29:36 +01:00
Stephen Kelly e7a111f094 InterfaceLibrary: Add test requiring MAP_IMPORTED_CONFIG whitelisting
The target properties with this prefix are whitelisted for
INTERFACE_LIBRARY targets.
2014-01-09 20:11:42 +01:00
Brad King 15562c11ef Merge topic 'policies'
73e9340 get_target_property: Error on non-existent target.
ab9f58f FindQt4: Ensure target exists before calling get_target_property.
37ebeb9 FindQt4: Fix use of get_target_property to use actual target name.
6aabb6a Genex: Use case-sensitive comparison for COMPILER_ID.
5bb53f6 cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy.
2014-01-09 09:37:20 -05:00
Brad King 69c366a281 Merge topic 'optional-install'
be0458c InstallRules: added new variable to disable generation of install rules
2014-01-09 09:37:17 -05:00
Stephen Kelly 73e93400e2 get_target_property: Error on non-existent target.
Introduce policy CMP0045 to control this behavior.
2014-01-08 16:41:34 +01:00
Stephen Kelly 6aabb6a62b Genex: Use case-sensitive comparison for COMPILER_ID. 2014-01-08 16:41:34 +01:00
Stephen Kelly 5bb53f6b73 cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy. 2014-01-08 16:41:34 +01:00
Nils Gladitz be0458c562 InstallRules: added new variable to disable generation of install rules
The boolean variable CMAKE_SKIP_INSTALL_RULES
allows disabling generation of install rules for projects which don't
want them.
2014-01-08 16:28:14 +01:00
Stephen Kelly 5d1fc198b7 Help: Ensure that target-policies are added to the documentation.
The two most-recently-added policies were not tested for.
2014-01-07 16:05:15 +01:00
Stephen Kelly 3917d86b26 Genex: Add a nullary form for CONFIG
This is consistent with other similar expressions such as PLATFORM_ID,
and makes the CONFIGURATION expression obsolete.

Fix an off-by-one error in
GeneratorExpressionContent::EvaluateParameters exposed by a unit test.

Remove the test for 'bad' nullary use of $<CONFIG>.

Add a unit test to verify that $<CONFIG> and $<CONFIGURATION> have
the same value.
2014-01-07 09:38:01 -05:00
Stephen Kelly ee21f1c605 CompatibleInterface: Test debugging of not-set property. 2014-01-07 09:38:01 -05:00
Stephen Kelly 28c865bb22 Tests: simplify Qt4 target usage
This content was copied from another test where both the Core and Gui
targets are used.
2014-01-07 09:38:00 -05:00
Stephen Kelly b7deca4a54 Test: Remove obsolete commented code.
This should not have survived in commit a247911a (Tests: Don't read
the LOCATION property from build targets., 2013-11-18).
2014-01-07 09:38:00 -05:00
Stephen Kelly 9c9f69fb9c Genex: Make EQUAL support upper case binary literals
As C++11, python, D and java do.

 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3472.pdf

Add test for uppercase hex literals.
2014-01-06 18:46:45 +01:00
Stephen Kelly 84fac67f90 Don't allow include() of export(EXPORT) file at configure time.
As a new feature it does not need to participate in CMP0024.

Store cmExportBuildFileGenerator instances which correspond to the
export(EXPORT) signature in a second map which does not own the
pointers.  This avoids the need to add cmExportBuildFileGenerator
and dependencies to the bootstrap system.
2014-01-06 17:25:11 +01:00
Stephen Kelly faedd2bea9 cmTarget: Fix system include annotation propagation.
Direct users of IMPORTED targets treat INTERFACE_INCLUDE_DIRECTORIES
as SYSTEM, after commit a63fcbcb (Always consider includes from IMPORTED
targets to be SYSTEM., 2013-08-29).  It was intended that transitive
use of an IMPORTED target would have the same behavior, but that
did not work.  The implementation processed only direct dependencies
in cmTarget::FinalizeSystemIncludeDirectories.

Implement transitive evaluation of dependencies by traversing the
link interface of each target in the link implementation.
2014-01-06 17:25:10 +01:00
Stephen Kelly 9eb06d0dde add_library: Disallow invalid signatures for INTERFACE_LIBRARY.
Document the valid signatures. Add a test for the IMPORTED GLOBAL
signature.
2014-01-06 17:25:10 +01:00
Stephen Kelly 7461d67cf3 cmTarget: Enable convenient include dir handling for INTERFACE_LIBRARY.
Make the CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE variable affect
INTERFACE_LIBRARY targets.
2014-01-06 17:25:10 +01:00
Stephen Kelly 2af966d9ab Genex: Add EQUAL expression.
Support decimal, hex, octal and binary literals.
2014-01-06 17:25:09 +01:00
Stephen Kelly 2d6638008c cmTarget: Use strtol for numeric parsing.
On Windows apparently sscanf can not handle hex numbers.

Test that numeric comparison works with hex numbers.
2014-01-06 17:25:09 +01:00
Brad King b225dbbd02 Merge topic 'minor-cleanups'
a55c70d cmTarget: Remove support for <CONFIG>_LOCATION property.
c9f9b3c cmTarget: Test impliedByUse number-compatible properties.
fbe1fa7 cmTarget: Don't repeat property origin debug information.
01c545c cmTarget: Fix debug report for interface-set compatibility types.
c67e1a6 cmTarget: Fix reporting interface-set properties which are FALSE.
07b0f54 Qt Tests: Remove commented and unneeded line.
79db8ef cmTarget: Fix the property compatibility error message
43340a9 Help: Reformat Qt autogenerator documentation.
d98ea6c Help: Mark some code blocks as containing cmake code.
ea78935 GenerateExportHeader: Reformat docs.
272a20f cmTarget: Don't update IMPORTED target compilation properties
03d842a Run the add_compile_options command unit test.
cd3d0b6 get_property: Fix testing ALIASED_TARGET target property (#14670)
6a62228 install: Ensure that install(TARGETS) works with no DESTINATION
af3d3b8 export: Only generate and install configuration files if needed.
0de81bb Help: Workaround pygments reporting an error for genexes.
...
2014-01-06 11:15:34 -05:00
Brad King b8786da79f Merge topic 'fix-text-typos'
9e41eb6 Fix wording of "the the" typos throughout text
2014-01-06 10:36:03 -05:00
Stephen Kelly c9f9b3cd94 cmTarget: Test impliedByUse number-compatible properties.
Test that it is an error to read a number-compatible property to
determine the link implementation.  An alternative would be to
consider the value to be "0", however, that is too arbitrary
given the use-cases of this feature.  Values from this feature may
be used in setting a define, where "0" may have special or invalid
meaning and should be explicit.
2014-01-04 11:28:58 +01:00
Stephen Kelly fbe1fa722f cmTarget: Don't repeat property origin debug information. 2014-01-04 11:28:58 +01:00
Stephen Kelly 01c545c596 cmTarget: Fix debug report for interface-set compatibility types.
If the dependent target sets the property to boolean false, ensure
that that appears in the debug report.  Previously, the report
output contained whether the property was consistent among dependencies,
displaying 'TRUE', instead of the content of the property, which may
be 'FALSE'.

Return a std::pair from the consistentProperty method.  This makes
it possible to make the return value for string types easier to
reason about.  The return value of consistentProperty was previously
set to an empty static string to emulate a 'true' value for the caller
in commit 816b4a8a (cmTarget: Make consistentProperty
return consistent content., 2013-10-22).  The pair makes the
consistency result properly typed.
2014-01-04 11:28:58 +01:00
Stephen Kelly c67e1a6aac cmTarget: Fix reporting interface-set properties which are FALSE. 2014-01-04 11:28:58 +01:00
Stephen Kelly 07b0f54647 Qt Tests: Remove commented and unneeded line. 2014-01-04 11:28:57 +01:00
Stephen Kelly 79db8ef78d cmTarget: Fix the property compatibility error message
Don't refer to 'both', but a 'mixture'. List all compatible interface
property types possible.

Add another test for a mixture of three compatibilities.
2014-01-04 11:28:57 +01:00