summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * | Add USES_TERMINAL option for custom commandsPeter Collingbourne2014-11-149-0/+37
| | | | | | | | | | | | | | | | | | Teach the add_custom_command and add_custom_target commands a new USES_TERMINAL option. Use it to tell the generator to give the command direct access to the terminal if possible.
* | | Merge topic 'test-custom-command-errors'Brad King2014-11-1729-0/+85
|\ \ \ | |/ / | | | | | | | | | 39baf728 Tests: Test add_custom_command and add_custom_target error cases
| * | Tests: Test add_custom_command and add_custom_target error casesBrad King2014-11-1429-0/+85
| | | | | | | | | | | | | | | Add RunCMake.add_custom_command and RunCMake.add_custom_target tests to cover the error messages for these commands.
* | | Merge topic 'string-SUBSTRING-truncate'Brad King2014-11-172-6/+9
|\ \ \ | |/ / |/| | | | | | | | 474bbb9d string: Tolerate SUBSTRING length exceeding end index
| * | string: Tolerate SUBSTRING length exceeding end indexDomen Vrankar2014-11-132-6/+9
| | | | | | | | | | | | | | | | | | string SUBSTRING command now ignores length if it points past end of string and uses end of string instead. String SUBSTRING tests now cover more corner cases.
* | | Merge topic 'fix-config-dependent-tests'Brad King2014-11-141-3/+6
|\ \ \ | |/ / |/| | | | | | | | 0854d45b Tests: Build config-dependent tests in the same config they run
| * | Tests: Build config-dependent tests in the same config they runBrad King2014-11-131-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | The CPackComponentsForAll-*, GeneratorExpression, and TestsWorkingDirectory tests all build binaries that they later need to run or package for the tested configuration. Tell the 'ctest --build-and-test' call to use the same configuration for driving the build process.
* | | Merge topic 'file-GENERATE-source'Brad King2014-11-1314-0/+85
|\ \ \ | | | | | | | | | | | | | | | | | | | | b80557c7 file(GENERATE): Evaluate early to allow generating source files 0019d54b Genex: Fix whitespace issue.
| * | | file(GENERATE): Evaluate early to allow generating source filesStephen Kelly2014-11-1214-0/+85
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The evaluation files must be known before cmTargetTraceDependencies attempts to find them, but we must actually generate the files after cmTargetTraceDependencies, as that can add to target SOURCES. The limitation is that the generated output name must not depend on the SOURCES of a target if the generated file is used by that target. Mark the output files as GENERATED so that trace dependencies does not expect them to already exist in the filesystem. Move the invokation of ForceLinkerLanguage in the Generate logic to after the generated file names are known. ForceLinkerLanguage tries to determine the sources of a target (in order to determine an already-known language) and otherwise fails to get information about the generated file. Test that the output of file(GENERATE) can be used as a target source file and that accessing the target SOURCES in the name of the output file is an error. Accessing the TARGET_OBJECTS would be a similar error if it was legal to use that generator expression in this context. That is not currently possible and is a different error condition, so test the current error output as a reminder to change the expected output if that becomes possible in the future. Test that generated rule files resulting from cmTargetTraceDependencies appear in the SOURCES generated in the output file.
* | | Merge topic 'ExternalProject_UPDATE_DISCONNECTED'Brad King2014-11-132-0/+108
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 3c497f11 Help: Add notes for topic 'ExternalProject_UPDATE_DISCONNECTED' aba5cec6 ExternalProject: Add unit tests for UPDATE_DISCONNECTED 3f606fa7 ExternalProject: Add UPDATE_DISCONNECTED option c0b749cf ExternalProject: Always add a command to a step
| * | ExternalProject: Add unit tests for UPDATE_DISCONNECTEDDaniele E. Domenichelli2014-11-062-0/+108
| | |
* | | Merge topic 'fix_link-line-dedup_regression'Brad King2014-11-115-0/+37
|\ \ \ | | |/ | |/| | | | | | | 4db31095 Fix link line order when shared libraries are de-duplicated