summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'test-ctest_submit-fail-with-RunCMake'Brad King2015-01-2120-1/+43
|\ | | | | | | | | | | ef97cd85 Tests: Fix obscure RunCMake.CTestSubmit 'drop' case failures 76f7eb2e Tests: Extend RunCMake.CTestSubmit test to cover 'drop' failures
| * Tests: Fix obscure RunCMake.CTestSubmit 'drop' case failuresBrad King2015-01-212-0/+2
| | | | | | | | | | | | | | | | | | 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>
| * Tests: Extend RunCMake.CTestSubmit test to cover 'drop' failuresBrad King2015-01-1919-1/+41
| | | | | | | | | | | | 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.
* | Merge topic 'cmake-E-tar-mtime'Brad King2015-01-207-0/+14
|\ \ | | | | | | | | | | | | | | | 3a60c899 cmake: Teach "-E tar" command a "--mtime=" option 90f9c427 cmake: Teach "-E tar" to report file name on failure to read from disk
| * | cmake: Teach "-E tar" command a "--mtime=" optionBrad King2015-01-197-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge topic 'GNU-4.4-compile-features'Brad King2015-01-191-3/+3
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Features: Use a more-common feature in cycle-test.Stephen Kelly2015-01-181-2/+2
| | | | | | | | | | | | | | | | | | 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.
| * | Features: Update comment in test to match the code.Stephen Kelly2015-01-181-1/+1
| | | | | | | | | | | | | | | After commit f13a2eb1 (Features: Adjust the RunCMake test to use more-common features., 2015-01-15).
* | | Merge topic 'test-ctest_submit-fail-with-RunCMake'Brad King2015-01-1913-0/+81
|\ \ \ | |/ / |/| / | |/ | | 352de1d7 Tests: Add RunCMake.CTestSubmit cases covering ctest_submit failures
| * Tests: Add RunCMake.CTestSubmit cases covering ctest_submit failuresBrad King2015-01-1913-0/+81
| | | | | | | | | | | | 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.
* | Merge topic 'GNU-4.6-compile-features'Brad King2015-01-162-6/+6
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 770ba876 Help: Add notes for topic 'GNU-4.6-compile-features' b15c008f Features: Record for GNU 4.6. f13a2eb1 Features: Adjust the RunCMake test to use more-common features. 1f19ac4d Features: Adjust cxx_variadic_templates unit test for GNU < 4.7. 0798d1e5 Features: Extend the generalized_initializers test for GNU < 4.7. 938bd94e Features: Test __GXX_EXPERIMENTAL_CXX0X__ macro for GNU < 4.7 compatibility. 462c630b Features: Don't test __cplusplus value for CXX98 on GNU. 222ec86f Features: Test an old value of __STDC_VERSION__ for GNU < 4.7 compatibility. 6e909035 Features: Record C/CXX dialect flags for GNU 4.6. bfc995cc Features: Remove wrong content from else() condition. 1532b921 Features: Make cxx_noexcept available from GNU 4.6. 1f4649e6 Features: Update the default_dialect test for old GNU-like compilers. a60027a6 Features: Ensure appropriate return value from feature test macros.
| * Features: Adjust the RunCMake test to use more-common features.Stephen Kelly2015-01-152-6/+6
| |
* | Merge topic 'tests-RunCMake-report-command'Brad King2015-01-161-0/+4
|\ \ | | | | | | | | | | | | 6c121924 Tests: Teach RunCMake to report command-line on failure
| * | Tests: Teach RunCMake to report command-line on failureBrad King2015-01-151-0/+4
| | | | | | | | | | | | | | | When a test sets RunCMake_TEST_COMMAND, report the command line on failure to make it easier to run by hand for debugging.
* | | ExternalData: Add support for custom download scriptsBrad King2015-01-1513-0/+61
| |/ |/| | | | | | | | | | | | | Add support for a special URL template to map the fetch operation to a project-specified .cmake script insead of using file(DOWNLOAD). Extend the Module.ExternalData test to cover the behavior. Extend the RunCMake.ExternalData test to cover error cases.
* | Merge topic 'fix-LOCATION-with-TARGET_OBJECTS'Brad King2015-01-154-0/+20
|\ \ | | | | | | | | | | | | 23f3798c cmTarget: Compute link language of TARGET_OBJECTS with CMP0026 OLD (#15338)
| * | cmTarget: Compute link language of TARGET_OBJECTS with CMP0026 OLD (#15338)Stephen Kelly2015-01-134-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit v3.1.0-rc1~297^2~5 (cmTarget: Drop 'head' argument from GetSourceFiles, 2014-07-10) exposed a dormant bug in source file computation, causing the test case to regress. After that commit, the source file computation and caching finds an existing container of source files. Prior to that patch, the GetSourceFiles method was called with either a null pointer for the head cmTarget, or it was called with the this pointer. The processSources method is eventually called, which normalizes the difference between the null pointer and the this pointer for the head target. However, the cache key depends on the actual pre-normalized pointer. The change in that commit caused the entry to be found in the cache where it was not before, which resulted in incorrect behavior. Prior to that commit, the test case also fails if the GetSourceFiles overload taking a vector<cmSourceFile*> is changed to normalize the head target at the beginning of the method: cmTarget const* head = head_ ? head_ : this; Such a construct was correctly used in other locations where similar caching was in place, before being removed in commit v3.1.0-rc1~310^2~25 (cmTarget: Remove 'head' argument from GetLinkInformation, 2014-06-12), but is not neccessary anymore. Commit v3.1.0-rc1~674^2~2 (cmTarget: Cache the cmSourceFiles in GetSourceFiles., 2014-04-05) introduced the caching, but fails the test case for an unrelated reason. That unrelated error was introduced in commit v3.1.0-rc1~688^2~5 (cmTarget: Allow any generator expression in SOURCES property., 2014-03-18) and fixed in commit v3.1.0-rc1~561^2~1 (cmTarget: Fix listing of source files at configure-time., 2014-04-13). All commits which fail the test case in the testable way do so when such a cached version of the source files is found and returned at generate time. In the test case, the cached content is populated at configure-time through the use of the deprecated LOCATION property with CMP0026 OLD. The cached content is an empty container for the bar target in the test case, because its source file 'foo.cpp.o' is not known until generate-time. That means that no source files are available to compute the link language and the reported error is issued. The actual problem is that the SourceFilesMap should be cleared after configure time by cmTarget::ClearLinkMaps. Clear it there now.
* | | Merge topic 'revert-feature_record_msvc'Brad King2015-01-152-8/+3
|\ \ \ | |_|/ |/| | | | | | | | | | | 4ce110bb Tests: Revert workaround for COMPILE_FEATURES genex bug 0b7e7e27 Revert topic 'feature_record_msvc'
| * | Tests: Revert workaround for COMPILE_FEATURES genex bugBrad King2015-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | The second hunk of commit 07d1f6fc (Features: Properly evaluate if the compiler supports cxx_final, 2014-12-31) was a workaround for a bug in the COMPILE_FEATURES generator expression that caused it never to return 0. Revert the workaround so we can fix the bug instead.
| * | Revert topic 'feature_record_msvc'Brad King2015-01-141-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commits: 2d738ce3 Help: Add notes for topic 'feature_record_msvc' f73718c9 Features: Enable writing of MSVC compiler feature header. 64c30bdc Features: Record for MSVC C++ 2015 and MSVC C 2010-2015. 225c0ef8 Features: Record for MSVC 2010-2013. This topic was merged to master prematurely, so remove it.
* | | Merge topic 'tests-encoding'Brad King2015-01-111-1/+1
|\ \ \ | | | | | | | | | | | | | | | | 9a8ab866 Encoding: Modify tests to work using non-ascii paths.
| * | | Encoding: Modify tests to work using non-ascii paths.Clinton Stimpson2015-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For complex*, CustomCommand and OutDir tests, non-ascii paths are avoided in test code by using relative paths, and setting the working when running the test. This also avoids the need to internationalize the test code. For RunCMake.GeneratorExpression, use a UTF-8 encoding in file(STRINGS) to retrieve the compiled absolute path correctly.
* | | | Merge topic 'feature_record_msvc'Brad King2015-01-111-2/+7
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | 2d738ce3 Help: Add notes for topic 'feature_record_msvc' f73718c9 Features: Enable writing of MSVC compiler feature header. 64c30bdc Features: Record for MSVC C++ 2015 and MSVC C 2010-2015. 225c0ef8 Features: Record for MSVC 2010-2013.
| * | | Features: Enable writing of MSVC compiler feature header.Robert Maynard2015-01-111-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: VS2015 and above are the only MSVC versions to support cxx_final, so remove usages from the tests, and instead only test for cxx_override. VS2012 and above to conform to cxx_decltype_incomplete_return_types proposal, but without support for auto return types the dcl.type.simple example in the proposal doesn't compile. VS2013 and above to conform to the updated cxx_contextual_conversions proposal, but VS2010 and above pass the test. Compilers such as MSVC have no explicit flags to enable C++11 mode, it just is always on. So only run the link tests with compilers that require a flag to specify the language version.
* | | | Merge topic 'refactor-CompileFeatures-test'Brad King2015-01-111-2/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a15675ef Features: Quote all compiler names when comparing with COMPILER_ID 07d1f6fc Features: Properly evaluate if the compiler supports cxx_final. 6296192d Features: Add a comment explaining part of test. c13656e7 Features: Test nullptr as a side-effect activation of static_assert. 3e34e833 Features: Test feature propagation with more-common features. b3e86f4e Features: Test an expectation of whether OVERRIDE_CONTROL is expected
| * | | Features: Properly evaluate if the compiler supports cxx_final.Robert Maynard2015-01-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Previously we expanded HAVE_FINAL to determine what the copied_file number would be, but when we don't have cxx_final than HAVE_FINAL is not defined. What we really want is to use expected_result.
* | | | Merge topic 'fix-empty-target-property-queries'Brad King2015-01-1117-0/+161
|\ \ \ \ | |_|/ / |/| | / | | |/ | |/| | | | | | | | | | c6d03a10 tests: add tests for querying properties 76ff92e0 set_tests_properties: fix documentation 28214862 get_test_property: clarify the documentation 34a99094 get_target_property: discern empty from undefined properties (#15333)
| * | tests: add tests for querying propertiesBen Boeckel2015-01-1117-0/+161
| | |
* | | RunCMake: Expect empty output by default.Stephen Kelly2014-12-319-4/+17
| |/ |/| | | | | | | | | | | | | | | | | | | Expect tests to specify stderr content if it is present. Fix the CMP0019 test, which has only been testing the WARN status until now. Specify in the CommandLine and FPHSA tests that content is at least one character. Set policies in the Language and CheckModules tests, which have empty test output, modulo unrelated policies on some platforms.
* | Tests: Fix RunCMake.CompileFeatures test NonValidTarget2 caseBrad King2014-12-221-0/+2
| | | | | | | | | | | | | | Mark the generated source file with the GENERATED property explicitly since it is not marked automatically as the output of any custom command. Mark both the 0 and 1 variants so it works no matter the outcome of the generator expression.
* | Tests: Move CTestTestMemcheck cases into a RunCMake.CTestMemcheck testBrad King2014-12-1870-0/+546
| | | | | | | | | | | | | | | | The CTestTestMemcheck test cases all try to check the ctest output with a regular expression. They fail intermittently due to ordering of the portions of the output that come from stdout and stderr being mixed. Convert all the test cases to use the RunCMake infrastructure to match stdout and stderr separately.
* | Tests: Allow RunCMake expected result code to be a regexBrad King2014-12-161-1/+1
| | | | | | | | | | This will allow the '-result.txt' files to specify a regex matching different results on different platforms.
* | Tests: Simplify RunCMake test extra argument passingBrad King2014-12-151-2/+2
| | | | | | | | | | Allow add_RunCMake_test calls to pass non-optional arguments immediately.
* | Tests: Allow RunCMake tests to pass generator expressionsBrad King2014-12-151-1/+1
| |
* | find_library: Fix repeat call after changing directory content (#15293)Brad King2014-12-085-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | We use cmGlobalGenerator::GetDirectoryContent to avoid repeating directory listings. However, GetDirectoryContent loads content from disk at most once. This breaks find_library calls that occur when disk content has changed since preceding find_library calls. Teach cmGlobalGenerator::GetDirectoryContent to save the directory modification time when content is loaded and re-load content if it changes. Create a RunCMake.find_library test with a case covering this.
* | Merge topic 'try_compile-link-flags'Brad King2014-12-084-0/+86
|\ \ | | | | | | | | | | | | | | | 88eb5824 try_compile: Pass linker flags into test project (#14066) a4f9b6f0 CMakeDetermineCompilerABI: Use normal linker flags in ABI project
| * | try_compile: Pass linker flags into test project (#14066)Brad King2014-12-034-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Copy CMAKE_EXE_LINKER_FLAGS into the test project generated by try_compile, just like we already copy CMAKE_<LANG>_FLAGS. Add CMake Policy CMP0056 to activate this behavior in a compatible way, but do not warn by default when the policy is not set since it will affect all try_compile calls. Extend the RunCMake.try_compile test with a case covering this behavior for each policy setting.
* | | Merge topic 'cached-regex-clear-fixed'Brad King2014-12-045-0/+116
|\ \ \ | |/ / |/| | | | | | | | | | | ceecd790 cmMakefile: store the number of last matches in a CMake var 7878d061 test: add a test for clearing regex results
| * | test: add a test for clearing regex resultsBen Boeckel2014-12-035-0/+116
| | |
* | | Merge topic 'file-LOCK-command'Brad King2014-12-0345-0/+196
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 93017828 Help: Add notes for topic 'file-LOCK-command' e6db4c5a file: Add LOCK subcommand to do file and directory locking 05d6531c cmSystemTools: Add StringToInt helper
| * | | file: Add LOCK subcommand to do file and directory lockingRuslan Baratov2014-12-0345-0/+196
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Provide options to fail without blocking or to block up to a timeout. Provide options to specify the scope containing the lock so it can be released automatically at the end of a function, file, or process. Extend the RunCMake.file test with cases covering the file(LOCK) command usage and error cases.
* | | continue: Add a new CMake language command for loop continuation (#14013)Gregor Jasny2014-12-0119-0/+100
|/ / | | | | | | | | Inspired-by: Doug Barbieri Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
* | Merge topic 'target-sources-error-conditions'Brad King2014-12-0112-1/+35
|\ \ | |/ | | | | | | | | | | 8a75c7ef Help: Document the export limitation of INTERFACE_SOURCES. e1348056 Export: Disallow export of targets with INTERFACE_SOURCES bb5905bb cmTarget: Don't allow relative paths in INTERFACE_SOURCES
| * Export: Disallow export of targets with INTERFACE_SOURCESStephen Kelly2014-11-297-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can be allowed in the next release, but it needs to have some features present and tested such as * Ensuring that relative paths do not appear in the generated property. * Ensuring that paths to the source or build directories do not appear. * Generating a check in the file for CMake 3.1 or later so that the resulting property will be consumed. * Ensuring that any referenced targets are part of an export set and generating a check for them. * INSTALL_INTERFACE and BUILD_INTERFACE content. All of these checks are already done for INTERFACE_INCLUDE_DIRECTORIES, but it is too late to add them for INTERFACE_SOURCES for CMake 3.1. As the checks introduce some new error conditions, it is better to disallow exporting fully for this case and introduce proper error conditions later instead of policies.
| * cmTarget: Don't allow relative paths in INTERFACE_SOURCESStephen Kelly2014-11-296-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the pattern of checks that are made for INTERFACE_INCLUDE_DIRECTORIES. Existence is already checked by cmSourceFile::GetFullPath. Add a check to disallow relative paths in source directories. Otherwise code such as target_sources(lib1 INTERFACE foo.cpp) would fail if consumed by a target in a different directory. Unlike the INTERFACE_INCLUDE_DIRECTORIES behavior, we don't care whether the entry comes from an IMPORTED target or not. In the include directories case, the directory for a non-imported target might not exist yet but might be created. In the sources case, a file which does not yet exist in the filesystem must be explicitly marked with the GENERATED property. Adjust existing tests and add a new test for the error.
| * Merge branch 'revert-definition-map-lookup' into releasev3.1.0-rc1Brad King2014-10-245-0/+266
| |\
* | \ Merge topic 'break-command-strictness'Brad King2014-11-2621-0/+73
|\ \ \ | | | | | | | | | | | | | | | | | | | | d54617d0 break: Add policy CMP0055 to check calls strictly bae604d9 Track nested loop levels in CMake language with a stack of counters
| * | | break: Add policy CMP0055 to check calls strictlyGregor Jasny2014-11-2521-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | Reject break() without loop scope or any arguments. Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
* | | | Merge topic 'return-test-foreach'Brad King2014-11-265-0/+18
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | d124c411 return: Add test for returning inside a foreach loop
| * | | | return: Add test for returning inside a foreach loopGregor Jasny2014-11-255-0/+18
| |/ / / | | | | | | | | | | | | Signed-off-by: Gregor Jasny <gjasny@googlemail.com>