Commit Graph

2719 Commits

Author SHA1 Message Date
Zack Galbreath ad330edaa2 Tests/Contracts: Submit notes with VTK build
Submit the configured Dashboard script as as Notes file to CDash.
Also add comments about the origin & purpose of this test.
2013-12-19 10:01:14 -05:00
Zack Galbreath ca9e11727b Tests/Contracts: Fix failing VTK Contract test
This test was failing because it was attempting to build VTK in the
wrong directory.
2013-12-09 10:27:55 -05:00
Zack Galbreath 1b173f25b4 Tests/Contracts: Update test for VTK release branch
The plan is to reinstate the VTK contracts test so that CMake
& VTK devs will both be made aware when a change in CMake causes
build problems for VTK.
2013-12-05 09:26:00 -05:00
Brad King 3eca31f81a Merge topic 'autogen-depends'
1320e07 cmQtAutogen: Allow specifying depends for autogen targets.
2013-11-26 09:38:40 -05:00
Stephen Kelly 1320e0768e cmQtAutogen: Allow specifying depends for autogen targets.
Test this by generating files with a custom target, which moc
requires to be present when it is run.
2013-11-25 22:41:21 +01:00
Stephen Kelly 5ee9e6bc11 cmTarget: Add whitelist of properties on INTERFACE_LIBRARY. 2013-11-25 16:23:11 +01:00
Brad King 3013a11826 Merge topic 'cross-compiling-toolchain-variables'
7521da2 Introduce CMAKE_STAGING_PREFIX variable.
2013-11-22 08:40:50 -05:00
Nils Gladitz a02f3d2de0 Add policy CMP0040 to disallow custom commands on missing targets 2013-11-21 09:24:08 -05:00
Stephen Kelly 7521da2852 Introduce CMAKE_STAGING_PREFIX variable.
This variable can be useful in cross-compiling contexts where the
sysroot is read-only or where the sysroot should otherwise remain
pristine.

If the new CMAKE_STAGING_PREFIX variable is set, it is used instead
of CMAKE_INSTALL_PREFIX when generating the installation rules in
cmake_install.cmake.

This way, the CMAKE_INSTALL_PREFIX variable
always refers to the installation prefix on the target device, regardless
of whether host==target.

If any -rpath paths passed to the linker contain the CMAKE_STAGING_PREFIX,
the matching path fragments are replaced with the CMAKE_INSTALL_PREFIX.
Matching paths in the -rpath-link are not transformed.

The cross-prefix usr-move workaround is assumed not to require extension
regarding CMAKE_STAGING_PREFIX. The staging area is a single prefix, so
there is no scope for cross-prefix symlinks. The CMAKE_INSTALL_PREFIX
is still used to determine the workaround path, and that variable
remains the relevant one even if CMAKE_STAGING_PREFIX is used. If the
generated export files are deployed to the target, the workaround
will still be in place, and still be employed if required.
2013-11-21 11:48:03 +01:00
Stephen Kelly a247911a88 Tests: Don't read the LOCATION property from build targets. 2013-11-19 18:07:27 +01:00
Brad King 1da77bf1ee Merge topic 'cleanup-build-commands'
4cce44b Help: Document the CMAKE_MAKE_PROGRAM variable in more detail
558c74d VS: Switch to internal CMAKE_MAKE_PROGRAM lookup by generators
5229f2d Tests: Do not use an explicit make program for VS generators
72dd738 Tests: Fix MFC test heuristic for empty CMAKE_TEST_MAKEPROGRAM
fd6076d Tests: Pass CMAKE_MAKE_PROGRAM instead of --build-makeprogram
68031ab Tests: Configure SubProject-Stage2 test more robustly
003d10c Tests: Simplify VSExcludeFromDefaultBuild configuration
e47d934 Tests: Simplify VSProjectInSubdir configuration
e965cb1 Tests: Simplify CTest.BuildCommand.ProjectInSubdir configuration
72bf255 Tests: Pass --build-options to every test
4d1d772 ctest: Teach --build-options to allow zero options
96966b5 ctest: Make the --build-makeprogram optional for --build-and-test
91a0211 Simplify some calls to cmGlobalGenerator::Build
123a060 Teach GenerateBuildCommand to find its own make program
5f5c92b VS: Add internal APIs to find MSBuild, devenv/VCExpress, and msdev
4ac75fd Prefer CMAKE_MAKE_PROGRAM over CMAKE_BUILD_TOOL (#14548)
...
2013-11-19 10:55:39 -05:00
Nils Gladitz 3900fcf4a8 CMP0037: Extend policy to reserved names and custom targets
Teach add_custom_target to check the policy too.  Extend the policy to
disallow reserved target names that we use for builtin targets like
"all".

Extend the RunCMake.CMP0037 test to cover these cases.
2013-11-19 09:44:22 -05:00
Brad King 5229f2df63 Tests: Do not use an explicit make program for VS generators
Do not pass the CMAKE_MAKE_PROGRAM cache entry to tests when using the
VS generators.  Allow them to pick the correct build tool automatically.
2013-11-18 11:30:50 -05:00
Brad King 72dd738bd4 Tests: Fix MFC test heuristic for empty CMAKE_TEST_MAKEPROGRAM
Also disable the MFC test if CMAKE_MAKE_PROGRAM is vcexpress.
2013-11-18 11:30:50 -05:00
Brad King fd6076d075 Tests: Pass CMAKE_MAKE_PROGRAM instead of --build-makeprogram
Pass the CMAKE_TEST_MAKEPROGRAM, if any, to each test at CMake time in
the CMAKE_MAKE_PROGRAM cache entry.  Pass the CMAKE_TEST_MAKEPROGRAM
into the ExportImport, Fortran, and MacRuntimePath tests so that they
may do the same for the nested project configurations.

Now "ctest --build-and-test" can get the make program from the test
build tree cache, so drop the explicit --build-makeprogram.
2013-11-18 11:30:50 -05:00
Brad King 68031abf15 Tests: Configure SubProject-Stage2 test more robustly
Fix the condition that adds the test to check CMAKE_TEST_GENERATOR
rather than the tools used to build CMake.  Drop the test on Ninja
because the generator does not support subproject generation anyway.
Stop using the general build_generator_args and pass the
--build-generator options explicitly.  Also pass --build-makeprogram
explicitly when CMAKE_TEST_MAKEPROGRAM is available because there is no
CMakeCache.txt in the test project subdirectory from which to pick up
the make program.
2013-11-18 11:30:50 -05:00
Brad King 003d10c248 Tests: Simplify VSExcludeFromDefaultBuild configuration
Create a CTEST_TEST_DEVENV variable that is set to the
CMAKE_MAKE_PROGRAM used for Visual Studio 7, 8, and 9.  It will always
be either "devenv" or "VCExpress", and not "MSBuild".  Add the
VSExcludeFromDefaultBuild test only when this variable is set, and use
its value as the --build-makeprogram value.

More work will be needed later to restore the test on VS 10 and above
when devenv is available, but this is the simplest approach for now.
2013-11-18 11:30:49 -05:00
Brad King e47d934a5a Tests: Simplify VSProjectInSubdir configuration
The test is only enabled on VS 10 and above, where the generators now
select for "ctest --build-and-test" the MSBuild tool by default.
Simplify the test configuration by dropping the --build-makeprogram
option and all the logic needed to compute its value.  The test will
automatically use MSBuild.
2013-11-18 11:30:49 -05:00
Brad King e965cb12e2 Tests: Simplify CTest.BuildCommand.ProjectInSubdir configuration
Collect all ctest_configure options in a list to configure it into the
test script.  Drop the unused -DCMAKE_MAKE_PROGRAM argument to ctest.
2013-11-18 11:30:49 -05:00
Brad King 72bf2552f2 Tests: Pass --build-options to every test
Create a "build_options" variable whose value is passed to every
"ctest --build-and-test" call through the --build-options argument.
2013-11-18 11:30:49 -05:00
Brad King 4ac75fdfe6 Prefer CMAKE_MAKE_PROGRAM over CMAKE_BUILD_TOOL (#14548)
Historically these were both added for the Makefile and Visual Studio
generators, respectively.  Later the VS generators started using the
CMAKE_MAKE_PROGRAM cache entry to find the IDE build tool, and the
CMAKE_BUILD_TOOL was simply set as an alias.

Fix the documentation to explain that CMAKE_MAKE_PROGRAM is the modern
variable and that CMAKE_BUILD_TOOL is the compatibility alias, not the
other way around.  Replace uses of CMAKE_BUILD_TOOL with
CMAKE_MAKE_PROGRAM in CMake-provided modules.  Nothing needs to lookup
CMAKE_BUILD_TOOL in the cache, so simply set it as a normal variable.
2013-11-18 08:26:23 -05:00
Brad King cc23f92861 Tests: Split <test>_EXTRA_OPTIONS into <test>_(CTEST|BUILD)_OPTIONS
Some extra options are for "ctest --build-and-test" directly, and others
are values for "--build-options".  Split these two roles out into two
separate variables and update existing uses.
2013-11-18 08:26:23 -05:00
Brad King 20bac8f19e Tests: Simplify ExternalProjectUpdate test arguments
Drop the -DCMAKE_TEST_MAKEPROGRAM argument because the value is not
used inside the test script.
2013-11-18 08:26:23 -05:00
Brad King 4d85365307 Tests: Fix make capability selection for empty CMAKE_TEST_MAKEPROGRAM 2013-11-18 08:26:23 -05:00
Brad King 95b28eb763 Tests: Teach MakeClean to use "cmake --build"
Switch from "ctest --build-and-test" to "cmake --build" to drive the
clean target in the MakeClean test.
2013-11-18 08:26:23 -05:00
Brad King c85672634c Tests: Teach SimpleInstall to use "cmake --build"
Switch from "ctest --build-and-test" to "cmake --build" to drive the
install and package targets in the SimpleInstall test.
2013-11-18 08:26:22 -05:00
Brad King f2b1d653cf Tests: Launch CMake.Install test through 'cmake --build'
Use "cmake --build" to drive the "install" target from the CMake build
tree itself.  This avoids using the heavier "ctest --build-and-test"
just to run the native build tool to drive installation.
2013-11-18 08:26:22 -05:00
Brad King 8ee6b47630 Tests: Launch BootstrapTest through cmake instead of ctest
Run the bootstrap script through "cmake -P" instead of
"ctest --build-and-test" so that we do not need to abuse
the --build-makeprogram option of the latter.
2013-11-18 08:26:22 -05:00
Brad King 7fc7624af5 Tests: Move CMAKE_TEST_MAKEPROGRAM into Tests/CMakeLists.txt
Also drop the temporary MAKEPROGRAM variable and the DART_ROOT special
case.  We never run dashboard clients with Dart anymore.
2013-11-18 08:26:22 -05:00
Brad King 1f679b8d46 Tests: Drop remnants of unused ShellInstall test
The ShellInstall test has long been replaced by the CMake.Install test.
2013-11-18 08:26:21 -05:00
Brad King bca67c710f build_command: Return a "cmake --build" command-line
Re-implement the build_command() command to use "cmake --build" instead
of generating a native build tool invocation directly.  This command
will internally invoke the proper native build tool.

This avoids requiring cmGlobalGenerator::GenerateBuildCommand to produce
a string so that it can be later refactored to produce a vector with no
quoting or escaping.  It will also allow us to later teach CMake to
delay the decision about which build tool to invoke until after the
project build system is generated to disk.  For example, on Visual
Studio 10 and above the preferred command-line tool is MSBuild, but we
need to fall back to devenv if the .sln has Intel Fortran .vfproj files.
2013-11-15 14:38:18 -05:00
Brad King 15872a3c30 Merge topic 'set_emptyvar_PARENT_SCOPE'
bf755c7 set: Add unit tests for set/unset PARENT_SCOPE
bc280f1 set: Fix handling of empty value with PARENT_SCOPE
20afbd5 set: Handle value-less PARENT_SCOPE explicitly
2013-11-14 11:28:12 -05:00
Brad King 42eaf34168 Merge topic 'configure_file-drop-IMMEDIATE'
15610bb Drop use of configure_file IMMEDIATE option
2013-11-14 11:28:07 -05:00
Daniele E. Domenichelli bf755c7c38 set: Add unit tests for set/unset PARENT_SCOPE
Create a RunCMake.set test to cover set() command cases, starting with
PARENT_SCOPE.
2013-11-13 10:18:38 -05:00
Daniele E. Domenichelli 15610bb5b1 Drop use of configure_file IMMEDIATE option
Since commit 7d47c693 (Drop compatibility with CMake < 2.4, 2013-10-08)
we no longer need to use the configure_file IMMEDIATE option to support
compatibility modes less than 2.0.
2013-11-13 10:12:17 -05:00
Brad King 8eb20eeabe ExternalData: Allow local stores without any URL templates
Allow ExternalData_URL_TEMPLATES to be empty if a value for
ExternalData_OBJECT_STORES is provided.  Assume in this use case that
the object stores will already contain all needed objects.  Extend the
Module.ExternalData test to cover this case (all objects in stores).
Extend the RunCMake.ExternalData test to cover the non-failure message
case when stores are provided without URL templates.
2013-11-13 10:03:36 -05:00
Brad King 558a6f1f92 Merge topic 'cmake-copyright-year'
3bade75 Help: Parse Copyright.txt instead of using current year
2bbf6bd Copyright.txt: Add test to check year range
3ee67d0 Copyright.txt: Update year range to end in 2013
621ba1f cmake-gui: Parse Copyright.txt instead of duplicating notice
993b685 bootstrap: Parse Copyright.txt instead of duplicating notice
2013-11-13 09:59:12 -05:00
Brad King 978d796e8d Merge topic 'policy-summary-periods'
49cbca6 CMP0038: Add missing '.' to policy summary line
7390002 CMP0039: Add missing '.' to policy summary line
2013-11-13 09:58:50 -05:00
Brad King 3c4071bec4 Merge topic 'fix-INTERFACE-with-no-SHARED-libs'
64f73b0 add_library: Fix INTERFACE on platforms with no shared libs (#14561)
2013-11-13 09:57:20 -05:00
Brad King 2bbf6bd7f8 Copyright.txt: Add test to check year range
Add a CMake.Copyright test that, when the CMake version number knows the
year (as it does in development versions), checks that Copyright.txt has
been updated with the current version year.
2013-11-12 16:35:26 -05:00
Daniele E. Domenichelli 7390002964 CMP0039: Add missing '.' to policy summary line 2013-11-12 11:54:14 -05:00
Stephen Kelly 64f73b0fb6 add_library: Fix INTERFACE on platforms with no shared libs (#14561) 2013-11-12 09:07:10 -05:00
Brad King 298ef43329 Merge topic 'test-RunCMake.CMP0037-everywhere'
8c6c1f1 Enable RunCMake.CMP0037 test everywhere
2013-11-12 08:31:48 -05:00
Brad King 8c6c1f16c9 Enable RunCMake.CMP0037 test everywhere
Split the test cases covering spaces and colons into separate units.
Run the space cases everywhere.  Disable the colon cases where they
are known to fail.  This approach increases platform coverage for the
test and makes the known-failure logic as local as possible.

No Makefile generator on Windows can generate targets with ':'
in their name because the CMakeFiles/<target>.dir directory cannot
be created.  Skip this part of the test on all Windows Make tools.
2013-11-11 07:27:02 -05:00
Brad King 110f244601 Merge topic 'test-LINK_ONLY-expression'
53b10fd Genex: Add a test for the LINK_ONLY expression.
2013-11-08 10:33:18 -05:00
Brad King 2053e0cd51 Merge topic 'tll-target-policies'
596b2a8 Disallow linking to utility targets (#13902).
301bb5c Disallow link-to-self (#13947).
05f5fde Disallow invalid target names (#13140)
2013-11-08 10:33:14 -05:00
Stephen Kelly 596b2a8c08 Disallow linking to utility targets (#13902). 2013-11-07 11:06:40 +01:00
Stephen Kelly 301bb5cdda Disallow link-to-self (#13947). 2013-11-07 11:06:39 +01:00
Stephen Kelly 05f5fde0eb Disallow invalid target names (#13140)
Exclude Borland and NMake from the CMP0037 test. They do not accept
the colon in a target name.
2013-11-07 11:06:39 +01:00
Stephen Kelly 53b10fdad7 Genex: Add a test for the LINK_ONLY expression.
Commit 239b0c6b (Don't add invalid content to static lib
INTERFACE_LINK_LIBRARIES., 2013-10-20) extended a test which
excercised the logic of the LINK_ONLY generator expression.

Commit ef10b87c (CMP0022: Plain target_link_libraries must populate
link interface, 2013-11-02) removed the instance of LINK_ONLY which
was excercised by that test.

Add a new test which excercises the other instance of LINK_ONLY by
setting the CMP0022 policy to NEW and consuming the contents of the
INTERFACE_LINK_LIBRARIES target property.
2013-11-06 22:57:31 +01:00