Commit Graph

582 Commits

Author SHA1 Message Date
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
Bill Hoffman fde70a1b26 ctest: Add a new --repeat-until-fail option
This option tells ctest to run each test N times until the test fails or
the N times have run. This is useful for finding random failing tests.
2015-03-23 09:08:22 -04:00
Brad King bd9c7f9b2c Ninja: Add policy to require explicit custom command byproducts
Add policy CMP0058 to avoid generating 'phony' ninja rules for unknown
custom command dependencies.  This requires projects to specify their
custom command byproducts explicitly.  With this requirement we no
longer have to assume that unknown custom command dependencies are
generated and can instead simply assume they are source files expected
to exist when the build starts.  This is particularly important in
in-source builds.  It is also helpful for out-of-source builds to allow
Ninja to diagnose missing files before running custom command rules that
depend on them.
2015-03-20 17:40:12 -04:00
Domen Vrankar a2c068a7ce file: Teach GLOB to list directories optionally
GLOB lists directories by default and GLOB_RECURSE does not.
LIST_DIRECTORIES enables user to control the behavior explicitly for
consistently for both GLOB and GLOB_RECURSE.
2015-03-20 09:45:25 -04:00
Raffi Enficiaud 49c8dcf7bb FindMatlab: Rewrite module and provide a usage API
Implement a brand new FindMatlab module:

- Add support for versions and components.
- Find Matlab and its version in a more precise and multiplatform way.
- Add API to create a new mex extension with documentation.
- Add API to add matlab unit tests (with or without the unit test framework).
- Find as much as possible based on a single Matlab_ROOT_DIR cache entry
  and allow the user to change it to re-find everything.
2015-03-17 09:47:04 -04:00
Brad King 7b185d5017 Merge topic 'main_dependency_diagnostic'
242c3966 add_custom_command: Diagnose MAIN_DEPENDENCY limitation.
2015-03-12 15:26:26 -04:00
Brad King ad6fbb88bb Merge topic 'target-language-genex'
232a6883 Help: Add release notes for target-language-genex.
9e168941 File(GENERATE): Process genex evaluation files for each language.
b734fa44 Genex: Allow COMPILE_LANGUAGE when processing include directories.
0b945ea9 Genex: Allow COMPILE_LANGUAGE when processing compile definitions.
5c559f11 Genex: Enable use of COMPILE_LANGUAGE for compile options.
e387ce7d Genex: Add a COMPILE_LANGUAGE generator expression.
4a0128f4 VS6: Compute CMAKE_*_FLAGS and COMPILE_DEFINITIONS* only when needed
2015-03-10 09:12:34 -04:00
Brad King fa4617b7ea Merge topic 'configure_file-NEWLINE_STYLE-no-warn'
024e25e4 Tests: Add more signature tests to RunCMake.configure_file test
3ef776fc configure_file: Do not warn about newline style arguments
2015-03-10 09:12:24 -04:00
Stephen Kelly 9e1689413f File(GENERATE): Process genex evaluation files for each language. 2015-03-09 20:49:17 +01:00
Stephen Kelly b734fa4471 Genex: Allow COMPILE_LANGUAGE when processing include directories.
Issue an error if this is encountered by an IDE generator.
2015-03-09 20:49:17 +01:00
Stephen Kelly 0b945ea9a6 Genex: Allow COMPILE_LANGUAGE when processing compile definitions.
Issue an error if this is encountered by an IDE generator.
2015-03-09 20:49:16 +01:00
Stephen Kelly 5c559f1113 Genex: Enable use of COMPILE_LANGUAGE for compile options.
Follow-ups will allow the use of the generator expression
for compile definitions and include directories for non-IDE
generators.
2015-03-09 20:48:57 +01:00
Brad King 024e25e485 Tests: Add more signature tests to RunCMake.configure_file test
Move the test cases from Tests/CMakeTests/ConfigureFileTest.cmake.in
over to use the RunCMake.configure_file infrastructure.  This does much
more robust verification of CMake output for each test case, and would
have caught the regression fixed in our parent commit.
2015-03-09 09:17:59 -04:00
Nils Gladitz 242c396656 add_custom_command: Diagnose MAIN_DEPENDENCY limitation.
The new policy CMP0057 diagnoses reuse of the same MAIN_DEPENDENCY across
multiple custom commands.
2015-03-09 12:45:38 +01:00
Stephen Kelly e387ce7d68 Genex: Add a COMPILE_LANGUAGE generator expression. 2015-03-07 13:19:45 +01:00
Brad King 17b4423c45 Merge topic 'fix-crash-on-bad-LANG_STANDARD'
00d66557 Diagnose invalid <LANG>_STANDARD value instead of crashing (#15426)
2015-03-02 08:36:24 -05:00
Brad King 00d66557d4 Diagnose invalid <LANG>_STANDARD value instead of crashing (#15426) 2015-02-28 12:14:42 -05:00
Brad King 29b5ca108e Merge topic 'remove_error_read_script'
6bf13097 CTest: Drop "Error in read script" message at end of testing
2015-02-27 10:34:38 -05:00
Zack Galbreath 6bf130979e CTest: Drop "Error in read script" message at end of testing
A more-specific error message is always displayed earlier in the
output if any real error occurred.  This final summary message
is distracting to readers searching through the output for the
word "error".  Simply drop it.
2015-02-27 10:31:02 -05:00
Brad King d1082448a8 Tests: Extend RunCMake.CommandLine to cover 'cmake --build' for 'ninja -v' 2015-02-26 10:21:09 -05:00
Brad King f7f4ca55bd ExternalData: Add support for custom algorithm-to-URL mapping
Allow URL templates to contain a %(algo:<key>) placeholder that is
replaced by mapping the canonical hash algorithm name through a map
defined by the <key>.

Extend the Module.ExternalData test to cover the behavior.
Extend the RunCMake.ExternalData test to cover error cases.
2015-02-25 08:28:05 -05:00
Brad King 41a16f07c3 Merge topic 'osx-framework-search-platform-SDKs'
0ee2a004 OS X: Add platform-specific Frameworks search path
2015-02-24 09:12:45 -05:00
Brad King 13f9f848de Merge topic 'FeatureSummary-no-duplicates'
38ef2b73 FeatureSummary: Print each feature info only once
2015-02-24 09:12:43 -05:00
Brad King 206ce77781 Merge topic 'ctest-output-options'
ff1ddd2a ctest_upload: Add QUIET option
0b87b2a3 ctest_memcheck: Add QUIET option
fc58bdb9 ctest_coverage: Add QUIET option
876a680d ctest_test: Add QUIET option
49ba4545 ctest_build: Add QUIET option
f999dc0b ctest_configure: Add QUIET option
645ad117 ctest_update: Add QUIET option
19d1a559 ctest_start: Add QUIET option
1643b905 ctest_submit: Add QUIET option
12db1139 CTest: Add cmCTestOptionalLog macro
2015-02-24 09:12:33 -05:00
Brad King 8366b1bd4f Merge topic 'test-RunCMake-refactor-ctest'
e2b9e7f7 Tests: Drop unnecessary stderr matching from RunCMake.ctest_memcheck
7ce9f6e2 Tests: Teach RunCMake to tolerate 'Error kstat returned' lines in test output
69de0f7e Tests: Teach RunCMake to tolerate Guard Malloc lines in test output
57f2aa7c Tests: Teach RunCMake to tolerate BullseyeCoverage lines in test output
b04c8ec3 Tests: Match curl error in RunCMake.ctest_submit FailDrop-* cases
1d82105e Tests: Rename RunCMake.{CTestMemcheck => ctest_memcheck}
d7662141 Tests: Rename RunCMake.{CTestSubmit => ctest_submit}
9b50388b Tests: Split RunCTest helper out of RunCMake.CTest(Submit|Memcheck)
76e7c22b Tests: Rename RunCMake.CTestMemcheck internals to match CTestSubmit
2015-02-24 09:12:31 -05:00
Gregor Jasny 0ee2a004e7 OS X: Add platform-specific Frameworks search path
Otherwise find_library is unable to lookup the XCTest framework which
is not located in the SDK serach path:

In the 10.10 SDK the SDK frameworks are located here:

  $DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks

whereas the Platform SDKs are located here:

  $DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/Library/Frameworks

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-02-23 13:10:52 -05:00
Gregor Jasny 38ef2b7363 FeatureSummary: Print each feature info only once
If a feature is added multiple times via ADD_FEATURE_INFO it should
appear only once in FEATURE_SUMMARY.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-02-23 11:39:17 -05:00
Brad King cc3611023d Merge topic 'use-algorithms'
bb9d71b4 Replace loops with algorithms.
4afe6c26 cmAlgorithms: Add cmReverseRange adaptor.
a3a0a8c2 cmAlgorithms: Add cmFindNot algorithm.
8c74a41f cmRST: Replace two erase with a rotate and larger erase.
61fe1919 cmAlgorithms: Update concept requirement to FowardIterator
09d6125b cmAlgorithms: Move cmRotate out of 'implementation detail' namespace.
8ed6ecac cmRST: Move two algorithms beside each other.
dfe49c20 cmRST: Use std::min where appropriate.
21b0654a cmGlobalGenerator: Convert set insert algorithm to vector algorithms.
416df93a Convert some raw loops to cmWrap.
37b88d34 cmAlgorithms: Add cmWrap.
a2818093 Use cmJoin where possible.
76207b08 cmCacheManager: Replace loop with algorithm.
60c3bb73 cmGlobalGenerator: Replace loop with algorithm.
05fec779 cmTarget: Port loop to algorithm.
9c225767 cmGlobalGenerator: Replace set::insert algorithm with cmRemoveDuplicates.
...
2015-02-23 10:26:38 -05:00
Zack Galbreath ff1ddd2a73 ctest_upload: Add QUIET option 2015-02-23 10:02:00 -05:00
Zack Galbreath 0b87b2a339 ctest_memcheck: Add QUIET option 2015-02-23 10:02:00 -05:00
Zack Galbreath fc58bdb9ad ctest_coverage: Add QUIET option 2015-02-23 10:02:00 -05:00
Zack Galbreath 876a680d48 ctest_test: Add QUIET option 2015-02-23 10:01:59 -05:00
Zack Galbreath 49ba4545c2 ctest_build: Add QUIET option 2015-02-23 10:01:59 -05:00
Zack Galbreath f999dc0bbf ctest_configure: Add QUIET option 2015-02-23 10:01:59 -05:00
Zack Galbreath 19d1a5599a ctest_start: Add QUIET option
This suppresses all non-error messages that would have otherwise
been printed by this function.
2015-02-23 10:01:59 -05:00
Brad King e2b9e7f7bc Tests: Drop unnecessary stderr matching from RunCMake.ctest_memcheck
The Dummy*-stderr.txt files were needed only to match platform-specific
memcheck tooling output and verify that stderr is otherwise empty.  Now
that the RunCMake infrastructure knows how to strip such lines before
matching, we can simply drop these files and use the default empty
string match.
2015-02-23 10:01:58 -05:00
Zack Galbreath 1643b905e0 ctest_submit: Add QUIET option
Specifying this option prevents CTest from printing any non-error
messages to the console for this call to ctest_submit().
2015-02-23 10:01:58 -05:00
Brad King 7ce9f6e29e Tests: Teach RunCMake to tolerate 'Error kstat returned' lines in test output
When RunCMake tests run on Solaris, the output may contain unexpected
lines of the form "Error kstat returned...".  These lines are printed by
SystemInformationImplementation::RunProcess when called from
SystemInformationImplementation::ParseValueFromKStat (see issue #12066).
Until someone investigates why kstat returns values outside the range it
documents, simply remove such lines from the actual output before
matching it against the expected output.
2015-02-23 10:01:58 -05:00
Brad King 69de0f7ea4 Tests: Teach RunCMake to tolerate Guard Malloc lines in test output
When RunCMake tests run under Xcode Guard Malloc, Guard Malloc may add
lines of the form "<tool>(<pid>) malloc:..." to the output.  Remove such
lines from the actual output before matching it against the expected
output.
2015-02-23 10:01:57 -05:00
Brad King 57f2aa7c37 Tests: Teach RunCMake to tolerate BullseyeCoverage lines in test output
When RunCMake tests run under dynamic analysis, Bullseye may add lines
of the form "BullseyeCoverage..." to the output.  Remove such lines from the
actual output before matching it against the expected output.
2015-02-23 10:01:57 -05:00
Brad King b04c8ec3f8 Tests: Match curl error in RunCMake.ctest_submit FailDrop-* cases
Port the regexes over from the CTestTestFailedSubmit tests for ftp,
http, and https.  No such match is needed for the other protocols.
2015-02-23 10:01:57 -05:00
Stephen Kelly 21b0654ace cmGlobalGenerator: Convert set insert algorithm to vector algorithms.
Adjust test for new error output.
2015-02-20 21:36:57 +01:00
Brad King 1d82105e29 Tests: Rename RunCMake.{CTestMemcheck => ctest_memcheck}
Follow the convention of naming tests after the command they test.
2015-02-19 11:35:51 -05:00
Brad King d7662141a7 Tests: Rename RunCMake.{CTestSubmit => ctest_submit}
Follow the convention of naming tests after the command they test.
2015-02-19 11:33:32 -05:00
Brad King 9b50388b09 Tests: Split RunCTest helper out of RunCMake.CTest(Submit|Memcheck)
Provide the "run_ctest" macro for use in other tests that also
want to cover running "ctest" scripts.
2015-02-19 11:26:44 -05:00
Brad King 76e7c22b3c Tests: Rename RunCMake.CTestMemcheck internals to match CTestSubmit 2015-02-19 11:26:43 -05:00