summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Move CTestTestMemcheck cases into a RunCMake.CTestMemcheck testBrad King2014-12-1871-256/+311
| | | | | | | | 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
|
* Tests: Fix OS X version check to use component-wise testBrad King2014-12-121-1/+1
| | | | | | | Otherwise 10.10 may be considered to be less than 10.4 and the tests for CPack will not run. Reported-by: Sean McBride <sean@rogue-research.com>
* 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 'custom-command-multiple-outputs'Brad King2014-12-082-0/+41
|\ | | | | | | | | | | | | | | 6c67b816 Makefile: Workaround Borland Make bug with multiple outputs 65ea5eb7 Tests: Cover rebuild with multiple custom command outputs (#15116) 644b4688 Makefile: Fix rebuild with multiple custom command outputs (#15116) 8a4c6d2d Xcode: Fix rebuild with multiple custom command outputs (#15116)
| * Tests: Cover rebuild with multiple custom command outputs (#15116)Brad King2014-12-052-0/+41
| | | | | | | | | | | | | | | | Extend the BuildDepends test with a case covering multiple custom command outputs with the second one consumed by another rule. With the old "multiple output pair" infrastructure used in the Makefile and Xcode generators this did not work. Now that it is fixed, test the case explicitly.
* | Merge topic 'ExternalProject_TEST_EXCLUDE_FROM_MAIN'Brad King2014-12-081-0/+25
|\ \ | | | | | | | | | | | | 636f0c1d ExternalProject: Add TEST_EXCLUDE_FROM_MAIN option
| * | ExternalProject: Add TEST_EXCLUDE_FROM_MAIN optionDaniele E. Domenichelli2014-12-051-0/+25
| |/ | | | | | | | | | | | | | | | | | | | | If this option is enabled, the test step is created with the EXCLUDE_FROM_MAIN option, and if TEST_BEFORE_INSTALL is enabled, the install step does not depend on the test step. This means that the test step is never executed, unless the test target is explicitly created by calling ExternalProject_Add_StepTarget, or by passing it with the STEP_TARGETS option, or with the EP_STEP_TARGETS directory property.
* | 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 'vs-phone-store-deployment-location'Brad King2014-12-044-12/+17
|\ \ \ | |_|/ |/| | | | | | | | 352f246f VS: Add source file property to specify Windows App deployment location
| * | VS: Add source file property to specify Windows App deployment locationGilles Khouzam2014-12-034-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a VS_DEPLOYMENT_LOCATION source file property to specify where to put files that are part of the package. For example: set_property(SOURCE ${ASSET_FILES} PROPERTY VS_DEPLOYMENT_LOCATION "assets") Without this, sources marked with VS_DEPLOYMENT_CONTENT cannot be located properly.
* | | 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.
* | | Merge topic 'icase-source-file-prop'Brad King2014-12-034-0/+40
|\ \ \ | | | | | | | | | | | | | | | | b7d760ae test: test source file properties with case-insensitivity
| * | | test: test source file properties with case-insensitivityBen Boeckel2014-12-024-0/+40
| |/ / | | | | | | | | | | | | Some filesystems are case insensitive, so when setting properties on the files, this should be respected (modulo a policy decision).
* | | Merge topic 'vs-hlsl-settings'Brad King2014-12-033-2/+8
|\ \ \ | | |/ | |/| | | | | | | 2a224b4c VS: Add source file properties to set the hlsl shader entry point and model
| * | VS: Add source file properties to set the hlsl shader entry point and modelCedric Perthuis2014-12-033-2/+8
| | | | | | | | | | | | | | | | | | Create properties VS_SHADER_ENTRYPOINT and VS_SHADER_MODEL. Without these many .hlsl source files may not be possible to use. Extend the VSWinStorePhone test project to cover them.
* | | 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-0114-5/+41
|\ \ | | | | | | | | | | | | | | | | | | 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-298-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 topic 'fix-transitive-OBJECT_SOURCES-context'Brad King2014-12-011-1/+4
|\ \ \ | | | | | | | | | | | | | | | | 672f1001 Genex: Fix evaluation context propagation for TARGET_OBJECTS.
| * | | Genex: Fix evaluation context propagation for TARGET_OBJECTS.Stephen Kelly2014-11-261-1/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extract a new method to encapsulate the requirements of evaluating dependent-expressions, namely, propagation of the EvaluateForBuildsystem setting, which is missing from the getLinkedTargetsContent implementation. Commit v3.1.0-rc1~688^2 (Genex: Only evaluate TARGET_OBJECTS to determine target sources., 2014-03-20) introduced an error case for use of TARGET_OBJECTS outside of the context of generating the buildsystem, as the path to object files may be dependent on buildsystem variables (See bug #15226). Commit v3.1.0-rc1~314^2 (Allow INTERFACE_SOURCES to specify $<TARGET_OBJECTS> (#14970), 2014-07-09) made it possible to propagate such content to dependent targets. While that commit propagated the EvaluateForBuildsystem setting for the case of a TARGET_PROPERTY expression, as generated for direct dependencies of a target in cmTargetInternals::AddInterfaceEntries, it did not add propagation for content from further transitive target dependencies, as determined by getLinkedTargetsContent.
| * | Merge branch 'C-features-Wundef' into releaseBrad King2014-11-262-0/+14
| |\ \
* | \ \ 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>
* | | | | Merge topic 'WCDH-multi-file'Brad King2014-11-2614-23/+115
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 4cf5179c WCDH: Make it possible to generate multiple files.
| * | | | | WCDH: Make it possible to generate multiple files.Stephen Kelly2014-11-2414-23/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the write_compiler_detection_header interface to allow specifying a location for supplementary files, and getting the list of resulting files as a variable.
* | | | | | Merge topic 'C-features-Wundef'Brad King2014-11-262-0/+14
|\ \ \ \ \ \ | |_|/ / / / |/| | | / / | | |_|/ / | |/| | | d0af0fae WCDH: Make the header -Wundef safe for the C language.
| * | | | WCDH: Make the header -Wundef safe for the C language.Stephen Kelly2014-11-252-0/+14
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The __STDC_VERSION__ macro may be defined or not depending on the implementation dialect of C. Test that it is defined before testing its value. The CXX tests do not need such a change because they define __cplusplus in all dialects.
* | | | Merge topic 'default-lang-dialect-for-master'Brad King2014-11-255-42/+101
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f327a9fd Merge branch 'default-lang-dialect' into step2 36bb100e Fix the test for running the CxxDialog unit test. a3d0ae17 Features: Fix the default C dialect for Clang and GNU. 49e2b689 Features: Fix references to CXX compiler version in Clang-C.cmake. 7565ab2c Features: Test the CXX compiler only if it has features.
| * \ \ \ Merge branch 'default-lang-dialect' into step2Stephen Kelly2014-11-205-42/+101
| |\ \ \ \ | | |_|/ / | |/| | / | | | |/ | | |/| Conflicts: Modules/Compiler/Clang-C.cmake
| | * | Fix the test for running the CxxDialog unit test.Stephen Kelly2014-11-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing versions have been used since commit v3.1.0-rc1~635^2~8 (cmTarget: Add CXX_STANDARD and CXX_EXTENSION target properties., 2013-10-13), but further discussions since then increased the initial minimum compiler versions this feature is available for.
| | * | Features: Fix the default C dialect for Clang and GNU.Stephen Kelly2014-11-204-12/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang 3.4 uses C99 by default, and Clang 3.6 uses C11 by default: http://thread.gmane.org/gmane.comp.compilers.clang.devel/39379 GNU 4.9 uses C90 by default, and GNU 5.0 uses C11 by default: https://gcc.gnu.org/gcc-5/changes.html Test that the default compiler settings result in the expected dialect macros being defined for both C and CXX. Remove the unused main.c file from the CompileFeatures unit test.
| | * | Features: Test the CXX compiler only if it has features.Stephen Kelly2014-11-181-28/+30
| | |/ | | | | | | | | | | | | If using different C and CXX compilers, we might not have a feature-full CXX compiler at this point.
* | | Merge topic 'file-GENERATE-rerun'Brad King2014-11-254-0/+38
|\ \ \ | | | | | | | | | | | | | | | | 26e98c34 file(GENERATE): Re-run cmake when appropriate.
| * | | file(GENERATE): Re-run cmake when appropriate.Stephen Kelly2014-11-184-0/+38
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-run if the input file changes or if the output file is removed. This only works with the Makefile generators currently. The limitation of the Ninja generator is tracked as issue #15256. The IDE generators will need larger refactoring as they currently rely on being able to determine the depends and output files at the start of generate-time, which is too early for the file(GENERATE) case.
* | | Merge topic 'custom-command-byproducts'Brad King2014-11-2524-0/+201
|\ \ \ | |/ / |/| | | | | | | | | | | 557aef0b ExternalProject: Add options to specify BYPRODUCTS (#14963) e15a7075 Add an option for explicit BYPRODUCTS of custom commands (#14963)
| * | ExternalProject: Add options to specify BYPRODUCTS (#14963)Brad King2014-11-174-0/+31
| | | | | | | | | | | | | | | | | | | | | The external project's build process may generate byproducts on which other rules in the driving project's build later depend. Provide a way for the driving project to specify what byproducts it expects to be made available by the custom commands that drive the external project.
| * | Add an option for explicit BYPRODUCTS of custom commands (#14963)Brad King2014-11-1422-0/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A common idiom in CMake-based build systems is to have custom commands that generate files not listed explicitly as outputs so that these files do not have to be newer than the inputs. The file modification times of such "byproducts" are updated only when their content changes. Then other build rules can depend on the byproducts explicitly so that their dependents rebuild when the content of the original byproducts really does change. This "undeclared byproduct" approach is necessary for Makefile, VS, and Xcode build tools because if a byproduct were listed as an output of a rule then the rule would always rerun when the input is newer than the byproduct but the byproduct may never be updated. Ninja solves this problem by offering a 'restat' feature to check whether an output was really modified after running a rule and tracking the fact that it is up to date separately from its timestamp. However, Ninja also stats all dependencies up front and will only restat files that are listed as outputs of rules with the 'restat' option enabled. Therefore an undeclared byproduct that does not exist at the start of the build will be considered missing and the build will fail even if other dependencies would cause the byproduct to be available before its dependents build. CMake works around this limitation by adding 'phony' build rules for custom command dependencies in the build tree that do not have any explicit specification of what produces them. This is not optimal because it prevents Ninja from reporting an error when an input to a rule really is missing. A better approach is to allow projects to explicitly specify the byproducts of their custom commands so that no phony rules are needed for them. In order to work with the non-Ninja generators, the byproducts must be known separately from the outputs. Add a new "BYPRODUCTS" option to the add_custom_command and add_custom_target commands to specify byproducts explicitly. Teach the Ninja generator to specify byproducts as outputs of the custom commands. In the case of POST_BUILD, PRE_LINK, and PRE_BUILD events on targets that link, the byproducts must be specified as outputs of the link rule that runs the commands. Activate 'restat' for such rules so that Ninja knows it needs to check the byproducts, but not for link rules that have no byproducts.
* | | Merge topic 'ninja-minor-refactoring'Brad King2014-11-171-5/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | 67bd514a Ninja: Refactor restat to be a string internally ef42e57d Ninja: Use a TARGET_FILE variable to hold the link output file 592644c4 Tests/BuildDepends: Drop unneeded help for Ninja
| * | Tests/BuildDepends: Drop unneeded help for NinjaBrad King2014-11-141-5/+1
| | | | | | | | | | | | | | | The extra post-modification invocations of 'ninja' does not seem to be needed anymore for the BuildDepends test to pass.
* | | Merge topic 'console-pool'Brad King2014-11-179-0/+37
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | 2d75d7e5 Help: Add notes for topic 'console-pool' f42d86f0 Ninja: Implement USES_TERMINAL using the console pool if available f281ae01 Ninja: Remove unused declaration d5eae556 Ninja: factor out the test for console pool support 4d1fedf4 Give the interactive cache editor the USES_TERMINAL property fe5d6e8c Add USES_TERMINAL option for custom commands ad6ee426 Rename doing_verbatim to doing_nothing