Commit Graph

3427 Commits

Author SHA1 Message Date
Brad King 6a0a4079ef Merge topic 'shorten-test-paths'
70c50962 Tests: Shorten paths in ExternalProjectLocal
539c5c25 Tests: Shorten paths in RunCMake.CompileFeatures
494f6e8d Tests: Shorten paths in CompileDefinitions
2015-01-28 09:33:38 -05:00
Brad King a47b904db2 Merge topic 'file-strings-utf-16'
1f77a700 file: Teach STRINGS to support UTF-16 and UTF-32 encodings
2015-01-27 11:36:45 -05:00
Justin Borodinsky 1f77a7001b file: Teach STRINGS to support UTF-16 and UTF-32 encodings 2015-01-27 11:30:26 -05:00
Brad King c1f5d6e6f5 Merge topic 'test-features-enforce-expectation'
67e76e82 Features: Fix test to reject missing expectation definitions
3046be77 Features: Emit a test failure if 'override' is present but not expected
2015-01-27 11:22:12 -05:00
Brad King af9cf04647 Merge topic 'cmake-E-tar-files-from'
44fd71de cmake: Teach "-E tar" command a "--files-from=" option
2015-01-27 11:22:08 -05:00
Brad King 33daec1ae9 Merge topic 'test-rerun-cmake'
7f2dc8dc configure_file: Test that CMake re-runs on input change or output missing
daf95a38 try_compile: Test that CMake re-runs on input change
2015-01-27 11:22:06 -05:00
Brad King 34ce0dd22f Merge topic 'tests-RunCMake-normalize-newlines'
bf05938b Tests/RunCMake: Normalize newlines before checking actual output
2015-01-27 11:22:04 -05:00
Brad King 7f2dc8dc54 configure_file: Test that CMake re-runs on input change or output missing
With the Makefile generators we expect that touching or modifying the
input file of a configure_file, or removing its output, will cause CMake
to re-run on the next build.  Extend the RunCMake.configure_file test
with a case covering this.  Also check that CMake does not re-run if
nothing has changed.
2015-01-27 11:18:37 -05:00
Brad King bf05938b8f Tests/RunCMake: Normalize newlines before checking actual output
We read the expected output with file(STRINGS) which converts CRLF
newlines to LF.  Do the same with the actual output before comparing.
2015-01-27 11:18:36 -05:00
Brad King daf95a3827 try_compile: Test that CMake re-runs on input change
With the Makefile and Ninja generators we expect that touching the input
source file for a try_compile will cause CMake to re-run on the next
build.  Extend the RunCMake.try_compile test with a case covering this.
Also check that CMake does not re-run if nothing has changed.
2015-01-27 11:18:36 -05:00
Brad King 70c50962fb Tests: Shorten paths in ExternalProjectLocal
Use a shorter name for the external project base directory to
allow longer CMake build tree directory names on Windows.
2015-01-27 08:57:57 -05:00
Brad King 67e76e82df Features: Fix test to reject missing expectation definitions
Whenever feature support is added to a compiler, the CompileFeatures
test needs to be updated to set expected availability of features.
Add #error directives to ensure the test fails if expectations are
not set.

Suggested-by: Stephen Kelly <steveire@gmail.com>
2015-01-26 14:41:33 -05:00
Stephen Kelly 3046be7784 Features: Emit a test failure if 'override' is present but not expected 2015-01-26 14:41:33 -05:00
Brad King 44fd71decb cmake: Teach "-E tar" command a "--files-from=" option
Read file names from the lines of a specified file.  Reject input lines
starting in '-' to leave room for option parsing to be added later.  Add
just '--add-file=' now to allow files starting in '-' to be specified.
2015-01-26 13:28:31 -05:00
Brad King 19e57a48cd Merge topic 'tests-RunCMake-make-program'
23bf98fc Tests/RunCMake: Honor CMAKE_MAKE_PROGRAM
2015-01-26 10:28:30 -05:00
Brad King 8def82585c Merge topic 'try-run-link-libraries'
d0adcccb try_run: Add tests for LINK_LIBRARIES with mock libraries.
223c5cb7 try_run: Add test for bad link libraries.
e2b1f058 try_run: Add support for LINK_LIBRARIES option.
2015-01-26 10:28:25 -05:00
Matt McCormick d0adcccbf4 try_run: Add tests for LINK_LIBRARIES with mock libraries.
Extend the ExportImport test to try using an imported library with
try_run.
2015-01-26 10:05:59 -05:00
Matt McCormick 223c5cb70b try_run: Add test for bad link libraries.
Based off the corresponding try_compile test.
2015-01-26 10:05:30 -05:00
Matt McCormick e2b1f0583f try_run: Add support for LINK_LIBRARIES option.
Most functionality is already implemented in Source/cmCoreTryCompile.{h,cxx}.
Document and improve argument parsing.

This functionality is already being used by a number of modules, like
CheckCSourceCompiles.cmake, but it is not documented.
2015-01-26 10:05:26 -05:00
Brad King 539c5c252e Tests: Shorten paths in RunCMake.CompileFeatures
Shorten the NotAFeature_OriginDebug_target_compile_features case name to
avoid creating really long paths that fail with some tools on Windows.
2015-01-26 08:30:57 -05:00
Brad King 494f6e8d5b Tests: Shorten paths in CompileDefinitions
Shorten the add_definitions command test directory and target names to
avoid creating really long paths that fail with some tools on Windows.
While at it, remove unnecessary project() command calls.
2015-01-25 08:12:12 -05:00
Brad King 23bf98fc04 Tests/RunCMake: Honor CMAKE_MAKE_PROGRAM
If tests are using an explicit make program, pass it through to RunCMake
tests so that any that actually do build use the expected tool.
2015-01-24 07:35:44 -05:00
Brad King 154bf8da99 Merge topic 'INTERFACE_SYSTEM_INCLUDE_DIRECTORIES-update'
85857e6d Help: Clarify INTERFACE_SYSTEM_INCLUDE_DIRECTORIES documentation.
ee38062b IncludeDirectories: Respect SYSTEM flag when using CONFIG genex.
2015-01-23 10:50:31 -05:00
Brad King 103f77e512 Merge topic 'test-complex-remove-bad-indentation'
560b3e9f Tests: Remove incorrect indentation from Complex test comment
2015-01-23 10:50:28 -05:00
Brad King 9f559a2608 Merge topic 'GNU-4.4-compile-features'
374a66b5 Features: Blacklist raw string literals test for GNU 4.4
2015-01-23 10:50:22 -05:00
Stephen Kelly ee38062be8 IncludeDirectories: Respect SYSTEM flag when using CONFIG genex.
Update the Makefile and Ninja generators to use the config when
requesting the include flags.
2015-01-23 00:08:18 +01:00
Brad King 560b3e9f1d Tests: Remove incorrect indentation from Complex test comment 2015-01-22 14:11:46 -05:00
Brad King c0298947ff Merge topic 'cdash_upload_file_mode'
f3e0b6f1 CTestCoverageCollectGCOV: Add module to run gcov
6dd980e0 ctest_submit: Make CDASH_UPLOAD mode arguments more strict
5dc33f89 ctest_submit: Add CDASH_UPLOAD mode to upload files to CDash
2015-01-22 11:16:45 -05:00
Brad King 529293e344 Merge topic 'WriteCompilerDetectionHeader-tests'
3c0996c1 WCDH: Test that no C compiler features are defined for CXX compiler.
8dc0c976 WCDH: Fix the C_STANDARD property in the tests.
2015-01-22 09:50:38 -05:00
Brad King be2a74dbcb Merge topic 'GNU-4.4-compile-features'
965a50dc Features: Fix GNU 4.4 and 4.5 C standard level flags
7f4154a4 Features: Fix CompileFeatures non-feature tests for space in path
f40c19b5 Features: Fix CompileFeatures test for C non-features
2015-01-22 09:50:36 -05:00
Brad King 374a66b58c Features: Blacklist raw string literals test for GNU 4.4
RedHat gcc 4.4.7-11 supports raw string literals, so simply blacklist
the test for its rejection.
2015-01-22 09:39:35 -05:00
Brad King afd998373d Merge topic 'test-ctest_submit-fail-with-RunCMake'
ef97cd85 Tests: Fix obscure RunCMake.CTestSubmit 'drop' case failures
76f7eb2e Tests: Extend RunCMake.CTestSubmit test to cover 'drop' failures
2015-01-21 16:36:20 -05:00
Brad King ef97cd8587 Tests: Fix obscure RunCMake.CTestSubmit 'drop' case failures
When curl is given a URL of the form '<something>://' it tries to
resolve '<something>' as a host name.  If the host happens to exist and
have a server then the drop might actually appear to work.  Instead use
an explicit '-no-site-' host to ensure it cannot connect.

Reported-by: Gilles Khouzam <Gilles.Khouzam@microsoft.com>
2015-01-21 16:34:42 -05:00
Brad King 7f4154a4aa Features: Fix CompileFeatures non-feature tests for space in path
Fix the <lang>_non_features try_compile calls to work correctly when
there is a space in the path.  Otherwise they all fail due to the space
instead of the lack of a feature.
2015-01-21 15:42:08 -05:00
Brad King f40c19b543 Features: Fix CompileFeatures test for C non-features
Add a "feature_test.c" file corresponding to "feature_test.cpp" but for
the C language.  This source will be needed by C_non_features entries.
2015-01-21 15:40:47 -05:00
Brad King 6dd980e0ef ctest_submit: Make CDASH_UPLOAD mode arguments more strict
Disallow mixing of arguments from different command signatures.
Extend the RunCMake.CTestSubmit test to cover such error cases.
2015-01-20 09:33:21 -05:00
Brad King 1ef4e3ab45 Merge topic 'cmake-E-tar-mtime'
3a60c899 cmake: Teach "-E tar" command a "--mtime=" option
90f9c427 cmake: Teach "-E tar" to report file name on failure to read from disk
2015-01-20 09:20:12 -05:00
Brad King 3a60c899fc cmake: Teach "-E tar" command a "--mtime=" option
Add an option to set the mtime of entries in a tarball so that one can
create a tarball with a consistent content hash (e.g. MD5) for a given
set of files regardless of their current timestamps on disk.  This will
be useful for submission of tarballs to CDash, which tracks content
hashes to avoid duplication.

Inspired-by: Bill Hoffman <bill.hoffman@kitware.com>
2015-01-19 14:16:19 -05:00
Stephen Kelly 3c0996c135 WCDH: Test that no C compiler features are defined for CXX compiler.
This amends commit 54156d72 (WCDH: Generate per-language files
in multi-file mode., 2015-01-17).
2015-01-19 20:03:23 +01:00
Stephen Kelly 8dc0c97666 WCDH: Fix the C_STANDARD property in the tests.
The CXX_STANDARD property validates the values allowed for it,
and '90' is not a valid value for it.  However, the validation is only
done for languages enabled for the target, and as C_undefined has no
CXX files, that language is not enabled for it.

This amends commit v3.1.0-rc3~23^2 (WCDH: Make the header -Wundef
safe for the C language., 2014-11-24).
2015-01-19 19:57:54 +01:00
Brad King 813ace90e4 Merge topic 'GNU-4.4-compile-features'
004e1540 Features: Record for GNU 4.4.
2a5ca650 Features: Wrap failure-test in UNIX condition.
1ae2c6b2 Features: Blacklist cxx_constexpr test for GNU 4.5.
c66e3317 Features: Use a more-common feature in cycle-test.
c43a6dc5 Features: Update comment in test to match the code.
78259135 Features: Test presence of cxx_auto_type with genex.
7b9fc88b Features: Remove outdated comment.
2015-01-19 13:55:31 -05:00
Brad King 137a15bf1d Merge topic 'SolarisStudio-compile-features'
00194ea7 Help: Add notes for topic 'SolarisStudio-compile-features'
bcb04783 Features: Record for SolarisStudio 12.4.
536c535c Features: Adjust cxx_variadic_templates unit test for SolarisStudio.
5d57970d Features: Use variable in cxx_inheriting_constructors test.
69182ce4 Features: Ensure that the cxx_auto_type test is correct.
2015-01-19 13:55:29 -05:00
Brad King 2e71d92ef2 Merge topic 'test-ctest_submit-fail-with-RunCMake'
352de1d7 Tests: Add RunCMake.CTestSubmit cases covering ctest_submit failures
2015-01-19 10:03:12 -05:00
Brad King 76f7eb2e4a Tests: Extend RunCMake.CTestSubmit test to cover 'drop' failures
Replace the TODO comment with calls to run_ctest_submit_FailDrop.  For
now leave curl errors out of expected stderr.  They can be ported over
from CTestTestFailedSubmit-* tests later.
2015-01-19 09:56:38 -05:00
Brad King 352de1d749 Tests: Add RunCMake.CTestSubmit cases covering ctest_submit failures
Cover command invocation argument errors.  Prepare infrastructure
to cover failed 'drop' cases, but do not cover them yet because
we need to collect error messages from each platform.
2015-01-19 09:53:57 -05:00
Brad King 5803ae3e88 Merge topic 'add-FindJsonCpp'
0aebeb9c FindJsonCpp: Add module to find JsonCpp package
2015-01-19 09:43:12 -05:00
Brad King 0aebeb9c84 FindJsonCpp: Add module to find JsonCpp package 2015-01-19 09:34:03 -05:00
Stephen Kelly 2a5ca650c9 Features: Wrap failure-test in UNIX condition.
The use of GNU on non-UNIX for 'compile features' is not
tested and is not well defined.
2015-01-18 15:01:14 +01:00
Stephen Kelly 1ae2c6b2c9 Features: Blacklist cxx_constexpr test for GNU 4.5. 2015-01-18 14:46:55 +01:00
Stephen Kelly c66e331749 Features: Use a more-common feature in cycle-test.
We require that the $<$<COMPILE_FEATURES:cxx_feature>:empty2> generates
a '1' when CXX11 is enabled.  GNU 4.4 does not support cxx_nullptr, but
does support cxx_auto_type.
2015-01-18 14:46:45 +01:00