Commit Graph

2847 Commits

Author SHA1 Message Date
Brad King fb5b48bb27 Merge topic 'variable-expansion-tests'
a9bdef2d tests: Add variable expansion tests
2014-02-24 10:40:09 -05:00
Brad King 624b0fa923 Merge topic 'ExternalProject-BUILD_ALWAYS'
73e5c6ae ExternalProject: Add option to always run the build step
2014-02-24 10:40:07 -05:00
Brad King 6e89c8a5f1 install: Support generator expressions in FILES and PROGRAMS mode
Teach the install(FILES) and install(PROGRAMS) commands to evaluate
generator expressions in the list of files.

Extend the ExportImport test to cover installation cases involving
generator expressions.
2014-02-21 17:05:26 -05:00
Ben Boeckel a9bdef2dda tests: Add variable expansion tests
There are some corner cases in variable expansion which would be nice to
capture before going and rewriting the variable expansion code. The
majority of these are related to configuring files and strings with '@'
in them in conjunction with @ONLY being specified. Another is testing
for '(' usage inside of ENV variable references based on whether it is
quoted or not.
2014-02-21 16:39:12 -05:00
Brad King 73e5c6aead ExternalProject: Add option to always run the build step
Teach ExternalProject_Add a new BUILD_ALWAYS option to skip using
the build step stamp file and execute the step on every build.

Extend the BuildDepends test with a case to cover this option.
2014-02-21 11:05:41 -05:00
Stephen Kelly f6cae4ea06 Tests: Remove some trailing black lines. 2014-02-17 18:54:53 +01:00
Stephen Kelly f2eee72fac add_custom_command: Disallow use of SOURCE signatures.
Add CMP0050 to control this behavior.
2014-02-12 11:19:27 -05:00
Stephen Kelly c248a437c4 Add policy CMP0049 to avoid variable expansion in source lists 2014-02-12 11:17:38 -05:00
Brad King c00d84cdf3 Merge topic 'remove-Example'
2e615d4b Remove the Example from the source.
2014-02-10 11:25:06 -05:00
Brad King cdcf23bde2 Merge topic 'fix-CMP0028-iface'
b2915238 CMP0028: Trigger on libraries from INTERFACE of dependencies.
2014-02-10 11:25:02 -05:00
Brad King f67ab2a920 Merge topic 'release-notes-prep'
4b7f2f52 Help: Add hyperlink targets for argument types in cmake-language(7)
113df227 Remove ChangeLog.manual
79f55909 Remove ChangeLog.txt
d25dbc90 Tests/BundleTest: Drop use of ChangeLog.txt
2014-02-10 11:24:58 -05:00
Brad King 27d3974c66 Merge topic 'wix_desktop'
b78d74de CPackWiX: Add support for CPACK_CREATE_DESKTOP_LINKS
2014-02-10 11:24:56 -05:00
Brad King 6e149e1591 Merge topic 'interface-library-signatures'
6d85a6a6 add_library: Issue better diagnostic for INTERFACE GLOBAL signature.
770245e9 add_library: Test invalid GLOBAL INTERFACE signature.
2014-02-10 11:24:54 -05:00
Stephen Kelly 2e615d4be9 Remove the Example from the source.
It is not showing modern practice, and is obsolete as documentation
after the rst documentation system and new content.
2014-02-09 22:09:20 +01:00
Stephen Kelly b29152387d CMP0028: Trigger on libraries from INTERFACE of dependencies. 2014-02-09 15:35:28 +01:00
Timo Rothenpieler b78d74de64 CPackWiX: Add support for CPACK_CREATE_DESKTOP_LINKS 2014-02-08 19:19:33 +01:00
Brad King d25dbc9059 Tests/BundleTest: Drop use of ChangeLog.txt
The test just wants a source file from outside its tree.
Use README.rst instead.
2014-02-07 13:35:31 -05:00
Stephen Kelly 6d85a6a64c add_library: Issue better diagnostic for INTERFACE GLOBAL signature. 2014-02-07 15:49:15 +01:00
Stephen Kelly 770245e928 add_library: Test invalid GLOBAL INTERFACE signature.
This has to be tested separately from the invalid_signature test because
target sources are evaluate at a later time, and earlier errors in the
invalid_signature test cause early exit.
2014-02-07 15:49:15 +01:00
Brad King 78be324762 Tests: Speed up RunCMake.CheckModules test
Enable the C and CXX languages only in the test cases that really need
them.  In the failure cases we do not get far enough to really use the
languages, so skip enabling them.
2014-02-06 11:12:50 -05:00
Stephen Kelly 8f8edeb09b QtAutogen: Only add source files to the target if AUTORCC is ON.
The qtx_add_resources() macro adds the resource file to the output list
to maintain file-level dependencies.  Having the qrc file in a target
sources is a precondition for AUTORCC to function.

When processing the source files of a target, only add the generated
qrc_<file>.cpp to the target sources if AUTORCC is ON.  This avoids
pre-porting conflict with the macro.

Reported-by: Micha Hergarden
2014-02-05 10:13:39 +01:00
Brad King f748b59e20 Merge topic 'fix-Qt-autogen'
6053ce22 QtAutogen: Make uic work even when the source is in a subdir.
1fc9ecfa FindQt4: Make AUTOMOC work regardless which order Qt 4/5 is found.
2014-02-04 13:34:54 -05:00
Stephen Kelly 6053ce22f6 QtAutogen: Make uic work even when the source is in a subdir.
Modify the includedUis to store the path to the file which includes
the ui file. Reuse that path to generate the output file from the
uic process.
2014-02-04 13:21:43 -05:00
Brad King cdadec9f24 Merge topic 'fix-visibility-inlines-hidden'
efdcebdd VisibilityInlinesHidden: only apply -fvisibility-inlines-hidden to C++ sources
2014-02-03 11:11:11 -05:00
Brad King a7f5a6ee12 Merge topic 'project-version-variables'
41d2f2c4 write_basic_package_version_file: use PROJECT_VERSION
7e142c5a project: Manage VERSION variables
16d040c9 project: Add optional LANGUAGES keyword
00007dcc Help: Format project command and variable documentation
2014-02-03 11:10:58 -05:00
Nils Gladitz efdcebddbd VisibilityInlinesHidden: only apply -fvisibility-inlines-hidden to C++ sources 2014-02-01 09:55:24 +01:00
Stephen Kelly 1fc9ecfae6 FindQt4: Make AUTOMOC work regardless which order Qt 4/5 is found.
Commit 321e348e (QtAutogen: Use Qt 4 IMPORTED targets to find
executable locations., 2014-01-24) attempted to fix this problem,
but only solved it for a particular ordering of find_package for
Qt 4 and Qt 5.

Add a test to ensure that it works with both orderings.
2014-01-29 17:02:43 +01:00
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 7e142c5ac2 project: Manage VERSION variables
Teach the project() command to set variables

  {PROJECT,<PROJECT-NAME>}_VERSION{,_MAJOR,_MINOR,_PATCH,_TWEAK}

holding the project version number and its components.  Add project()
command option "VERSION" to specify the version explicitly, and default
to the empty string when it is not given.

Since this clears variables when no VERSION is given, this may change
behavior for existing projects that set the version variables themselves
prior to calling project().  Add policy CMP0048 for compatibility.

Suggested-by: Alex Neundorf <neundorf@kde.org>
2014-01-29 09:45:18 -05:00
Brad King 16d040c958 project: Add optional LANGUAGES keyword
Teach the project() command to recognize an optional "LANGUAGES"
keyword after the project name and prior to the list of languages.
Do not allow multiple copies of the keyword.  If the keyword is
specified and no languages are listed, imply NONE.
2014-01-29 09:40:51 -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