Commit Graph

627 Commits

Author SHA1 Message Date
Brad King 88c5ec72b0 Merge topic 'test-RunCMake-parallel-make'
703e7625 Tests: Protect RunCMake tests from MAKEFLAGS in environment (#15542)
2015-04-30 10:32:15 -04:00
Nils Gladitz aed6239e40 if: Implement new IN_LIST operator 2015-04-30 10:21:19 -04:00
Nils Gladitz 32a2f41402 Revert "add_custom_command: Diagnose MAIN_DEPENDENCY limitation."
This reverts commit 242c3966 (add_custom_command: Diagnose
MAIN_DEPENDENCY limitation, 2015-03-09) and the follow up commit
b372a99a (UseSWIG: Do not use MAIN_DEPENDENCY on custom commands,
2015-03-26).

I misdiagnosed the underlying issue that prompted creation of policy CMP0057.
The actual issue surfaces when a single custom command's MAIN_DEPENDENCY
is listed in more than one target; this issue will have to be addressed
independently.
2015-04-30 10:20:20 -04:00
Brad King 703e762529 Tests: Protect RunCMake tests from MAKEFLAGS in environment (#15542) 2015-04-29 16:14:52 -04:00
Brad King f0673c1022 Merge topic 'deterministic-CTest-tests'
bf24b6c5 Tests: Guard more CTest tests against parallel execution.
2015-04-28 13:55:57 -04:00
Stephen Kelly bf24b6c501 Tests: Guard more CTest tests against parallel execution. 2015-04-27 22:03:40 +02:00
Brad King 75bd5ca06a Tests: Fix RunCMake.CTest to tolerate source line number changes 2015-04-27 10:46:52 -04:00
Brad King 195a724c57 Merge topic 'deterministic-CTest-tests'
b5b20d20 ctest: Treat ENV{CTEST_OUTPUT_ON_FAILURE} as a boolean
fcf9cf6c Tests: Make a CTest test deterministic.
2015-04-23 09:04:33 -04:00
Brad King e1c6df392b ExternalProject: Allow dependencies on INTERFACE libraries
Respect INTERFACE library property whitelist.  Check that a target has
type "UTILITY" before querying other properties.
2015-04-22 08:48:52 -04:00
Andrey Pokrovskiy 7bd8cfb813 ExternalProject: Allow generator expressions in initial cache options
Use file(GENERATE) to write the initial cache file so that we can
evaluate generator expressions.  Use a per-config initial cache file
name in case the content varies by configuration.
2015-04-21 10:50:29 -04:00
Brad King 3961ccb972 Merge topic 'ExternalProject-test-refactor'
28429270 Tests: Delay RunCMake.ExternalProject case checks
2015-04-21 08:44:54 -04:00
Stephen Kelly fcf9cf6cd8 Tests: Make a CTest test deterministic.
The test expect sub-test not to run in parallel.
2015-04-21 00:31:02 +02:00
Brad King da65528c36 Merge topic 'stable-xcode-projects'
6693590f Xcode: Refine quoting rules for Strings
a6331eb8 Xcode: Let PrintComment decide if the comment is non-empty
6e8952c1 Xcode: PrintComment will prepend a whitespace itself before the comment
4bd2544b Xcode: Do not add whitespace after attribute group opening brace
5cb4c838 Xcode: Properly indent PBXFileReference and PBXBuildFile
a723427b Xcode: Remove extra space in PBXProject comment
2fe8bca5 Xcode: Add comment after root object
2e0e205e Xcode: Indent using tabs
7b68c8df Xcode: Sort Xcode objects by Id
2015-04-20 14:02:48 -04:00
Brad King 2842927019 Tests: Delay RunCMake.ExternalProject case checks
Use RunCMake "-check.cmake" scripts to check the generated initial cache
file content so that the full generation process is completed.
2015-04-20 10:27:19 -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
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
Brad King 85c2626bab Deprecate Visual Studio 6 generator
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:08:57 -04:00
Brad King 92d6179893 Merge topic 'cmake-cleanups'
07d44d63 cmake: Remove confusing duplication.
ea819b29 cmMakefile: Remove unused method.
6ad86c7f cmMakefile: Remove bad comment.
fca2b542 cmMakefile: Internalize setting of CMakeInstance on Properties.
7bb4e3db cmMakefile: Out-of-line Home directory accessors.
6241253a cmake: Out-of-line Home and Start directory methods.
0ee3ccb3 cmake: Fix variable name bugs.
57dd094e Use vector, not list for cmCommand storage.
6deb43e6 Remove some files which do not need to be in BootstrapCommands.
ecdb1b3b Add some missing includes.
04b307b9 cmake: Simplify CommandExists method.
0f1f324b cmake: Rename oddly named variables.
275185ac cmake: Constify GetCommand method.
c57f086a cmake: Don't lower-case a string needlessly.
23368c9b cmake: Use make_pair instead of Foo::value_type.
14c70b8c cmake: out-of-line try compile state methods.
...
2015-04-13 11:38:20 -04:00
Brad King 1862b39868 Merge topic 'cmake-G-print-generators'
588dcb33 cmake: Provide guidance when an invalid -G option is given
2015-04-13 09:05:16 -04:00
Brad King 341b8953b1 Merge topic 'move-command-line-tests'
4e039a9a Tests: Move more command line tests into RunCMake.CommandLine
2015-04-13 09:05:14 -04:00
Brad King 9d1ba6d0f5 Merge topic 'emulator-property'
c9e9c31c Tests: Create pseudo_emulator output dir for Xcode 2.x
2015-04-13 09:05:10 -04:00
Stephen Kelly 6fb306ea3b Test expected value of DEBUG_CONFIGURATIONS global property. 2015-04-12 20:08:46 +02:00
Gerald Combs 588dcb33b7 cmake: Provide guidance when an invalid -G option is given
Print a list of generators if no generator or an invalid one is
supplied.

Signed-off-by: Gerald Combs <gerald@wireshark.org>
2015-04-10 15:14:34 -04:00
Brad King 4e039a9a98 Tests: Move more command line tests into RunCMake.CommandLine
Port most CMakeTestBadCommandLines test cases to RunCMake.CommandLine
and drop the former test.  Add validation of expected results, which was
not done by the old test.
2015-04-10 14:56:41 -04:00
Brad King c9e9c31c53 Tests: Create pseudo_emulator output dir for Xcode 2.x
Apply the workardound from commit v2.8.2~598 (Create CMakeLibTests
output dir for Xcode, 2009-12-09) to the pseudo_emulator tool.
2015-04-10 12:42:49 -04:00
Nils Gladitz 6c4781baa9 Tests: Consolidate, refactor and extend -E tar tests 2015-04-10 08:32:32 -04:00
Nils Gladitz d2cc580704 cmake: Teach "-E tar" command a "--format=" option
Allows specifying a libarchive defined archive format currently restricted to
7zip, gnutar, pax, paxr and zip.

The default is "paxr" (pax restricted).
2015-04-10 08:32:31 -04:00
Brad King 1a1bdbfd87 Merge topic 'link-implicit-libs-full-path'
882f48e5 Link libraries by full path even in implicit directories
318cd370 Help: Add link target for Find Modules section of cmake-developer.7
1535dcd8 Tests: Teach RunCMake to optionally merge command output to stdout
2015-04-09 11:32:31 -04:00
Brad King 882f48e5ba Link libraries by full path even in implicit directories
When CMP0003 was first introduced we wanted to link all libraries by
full path.  However, some projects had problems on platforms where
find_library would find /usr/lib/libfoo.so when the project really
wanted to link to /usr/lib/<arch>/libfoo.so and had been working by
accident because pre-CMP0003 behavior used -lfoo to link.

We first tried to address that in commit v2.6.0~440 (Teach find_library
to avoid returning library paths in system directories, 2008-01-23) by
returning just "foo" for libraries in implicit link directories.  This
caused problems for projects expecting find_library to always return a
full path.  We ended up using the solution in commit v2.6.0~366 (...
switch library paths found in implicit link directories to use -l,
2008-01-31).  However, the special case for libraries in implicit link
directories has also proven problematic and confusing.

Introduce policy CMP0060 to switch to linking all libraries by full path
even if they are in implicit link directories.  Explain in the policy
documentation the factors that led to the original approach and now to
this approach.
2015-04-09 11:29:18 -04:00
Brad King 977796e307 Merge topic 'emulator-property'
1975d53a Help: Add notes for topic 'emulator-property'
9160d6c2 TestGenerator: Add CROSSCOMPILING_EMULATOR support.
e942526b try_run: Use CMAKE_CROSSCOMPILING_EMULATOR.
579c4bec Properties: Add CROSSCOMPILING_EMULATOR target property.
2015-04-08 09:07:03 -04:00
Brad King 710968e371 Merge topic 'xcode-quote-path'
dfd6f1f2 Xcode: Also quote strings containing // (#15487)
2015-04-08 09:06:59 -04:00
Matt McCormick 9160d6c241 TestGenerator: Add CROSSCOMPILING_EMULATOR support.
Prefix test commands with the CROSSCOMPILING_EMULATOR property
for target executables. This allows test suites to be run on the host
when crosscompiling.
2015-04-08 09:06:22 -04:00
Matt McCormick e942526b3d try_run: Use CMAKE_CROSSCOMPILING_EMULATOR.
If the CMAKE_CROSSCOMPILING_EMULATOR variable is defined, and
CMAKE_CROSSCOMPILING is TRUE, then use CMAKE_CROSSCOMPILING_EMULATOR to run
the try_run executables. This prevents the need to populate
TryRunResults.cmake when cross compiling.
2015-04-08 09:06:22 -04:00
Matt McCormick 579c4bec6e Properties: Add CROSSCOMPILING_EMULATOR target property.
Add CROSSCOMPILING_EMULATOR target property for executables. This is used by
subsequent patches to run exectuables created for the target system when
crosscompiling. The property is initialized by the
CMAKE_CROSSCOMPILING_EMULATOR variable when defined.
2015-04-07 13:33:34 -04:00
Brad King 1535dcd894 Tests: Teach RunCMake to optionally merge command output to stdout
Some tests may need to read "cmake --build" output passed through from
native build tools and do not know if it will be on stdout or stderr.
Optionally use the same variable for the execute_process output so
that it merges them and we can always match using expected stdout.
2015-04-07 09:08:39 -04:00
Brad King 0e6b00ee49 Merge topic 'cpack-one-component-only'
0ffd3534 CPack single component packaging
2015-04-06 09:11:34 -04:00
Brad King b9c1eb4dcc Merge topic 'makefile-depscan-BOM'
af924827 Makefile: Tolerate a BOM while scanning source dependencies (#15493)
2015-04-06 08:58:17 -04:00
Brad King 9ddbacdb74 Merge topic 'test_cpack_symlinks'
5f686b8a Tests: Add case for CPack source package with symlinks
aca1d93b cpack: Disable CMake Cygwin legacy warning while packaging
2015-04-06 08:58:14 -04:00
Bill Hoffman 5f686b8a6b Tests: Add case for CPack source package with symlinks 2015-04-06 08:52:54 -04:00
Domen Vrankar 0ffd35340e CPack single component packaging
RPM, DEB and archive packages were not created
in cases when CPACK_<generator>_COMPONENT_INSTALL
was set to ON and a single component existed.
Patch also changes CPackRPM test to implicitly
test for this case.
2015-04-05 22:49:41 +02:00
Gregor Jasny dfd6f1f290 Xcode: Also quote strings containing // (#15487)
Otherwise those will be interpreted as start of a comment

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-04-04 22:13:45 +02:00
Brad King af92482712 Makefile: Tolerate a BOM while scanning source dependencies (#15493)
Otherwise an #include directive on the first line of a source file is
ignored if the file contains a Byte-Order-Mark.

Suggested-by: Aleksey Konovalov <konovalov.aleks@gmail.com>
2015-04-03 13:04:57 -04:00
Stephen Kelly 06f61c26cf Do not treat DEFINITIONS as a built-in directory property
Add policy CMP0059 to cover this change.  The property has been
deprecated since CMake 2.4 anyway.

This will help clean up cmMakefile -- the DefineFlagsOrig member should
not need to exist.
2015-04-02 13:00:48 -04:00
Brad King 0c69ca831b Merge topic 'ctest-repeat-until-fail'
b687d672 Tests: Fix RunCMake.CTestCommandLine expected output time matching
2015-04-01 13:19:39 -04:00
Brad King b687d67281 Tests: Fix RunCMake.CTestCommandLine expected output time matching
When matching ctest command-line output, we must account for the
formatting of times that take 10 seconds or more.  The values are
right-justified, so use " +" to match any amount of space before them.
2015-03-31 16:04:29 -04:00
Brad King c117c2bb5e Merge topic 'add_dependencies-INTERFACE-libraries'
ac14cbf0 Allow add_dependencies() on INTERFACE libraries (#15414)
817d31db Help: Format add_dependencies documentation
2015-03-30 09:27:53 -04:00
Brad King ac14cbf017 Allow add_dependencies() on INTERFACE libraries (#15414)
Revert commit v3.0.0-rc1~175^2~20 (add_dependencies: Disallow use with
INTERFACE_LIBRARY, 2013-12-25).  Teach our dependency analysis to
transitively follow INTERFACE target utility dependencies as was done or
IMPORTED targets in commit v2.8.6~127^2~1 (Allow add_dependencies() on
imported targets, 2010-11-19).  Extend the InterfaceLibrary test with a
case to cover header generation for a header-only INTERFACE library via
a custom target.
2015-03-27 16:25:09 -04:00
Brad King 230f2d6e70 ExternalData: Add option to recursively match under directories
Extend the ``DATA{Dir/,...}`` syntax with a new ``RECURSE:`` option
to enable recursive matching of associated files.  This will allow
an entire directory tree of data to be referenced at once.
2015-03-27 14:44:54 -04:00
Brad King 64e97edad7 Merge topic 'ninja-require-byproducts'
bd9c7f9b Ninja: Add policy to require explicit custom command byproducts
ed8e30b0 cmGlobalNinjaGenerator: Optimize handling of known build outputs
ad094f43 cmGlobalNinjaGenerator: Fix spelling of "unknown"
82a37d3c cmGlobalNinjaGenerator: Drop unused member
2015-03-23 09:48:07 -04:00
Brad King cc8b8cdc75 Merge topic 'ctest-repeat-until-fail'
6bce0276 Help: Add notes for topic 'ctest-repeat-until-fail'
fde70a1b ctest: Add a new --repeat-until-fail option
2015-03-23 09:18:26 -04:00