summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'ExternalData-no-re-stage' into releaseBrad King2013-05-313-0/+43
|\
| * ExternalData: Do not re-stage staged object filesBrad King2013-05-243-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | The ExternalData_LINK_CONTENT option tells ExternalData to convert real data files it finds into content links and to "stage" the original content in a ".ExternalData_<algo>_<hash>" file. However, after a data object has been staged it is possible that a user-provided pattern in the "REGEX:" option will later match the staged object file. We must not process staged object files even when a user pattern matches them. Fix the implementation to not match a staged object file as a normal data file for conversion. Extend the RunCMake.ExternalData test to cover this case.
* | GenexEval: Test evaluation of INCLUDE_DIRECTORIES target property.Stephen Kelly2013-05-303-0/+33
|/
* Fix clearing of the INCLUDE_DIRECTORIES DIRECTORY property.Stephen Kelly2013-04-101-0/+11
| | | | | This was broken by commit 18a3195a (Keep track of INCLUDE_DIRECTORIES as a vector of structs., 2012-11-19).
* add_dependencies: Distinguish target v. file dependencies in error (#14050)Brad King2013-03-296-0/+18
| | | | | | | When called with a non-existent LHS target name the user may be trying to add file-level dependencies. Clarify the error message to explain the difference between target-level and file-level dependencies. Point the reader at the commands and options needed for the latter.
* Merge topic 'fix-Qt5-incompatibility-check-version'Brad King2013-03-281-1/+1
|\ | | | | | | | | 535e53c Fix the Qt 5 version required to run the IncompatibleQt test.
| * Fix the Qt 5 version required to run the IncompatibleQt test.Stephen Kelly2013-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | The commit to add the INTERFACE_QT_MAJOR_VERSION in qtbase.git is 14054d45 (Set the INTERFACE_QT_MAJOR_VERSION to 5., 2013-03-16) which will be part of Qt 5.1.0. If there is a Qt 5.0.3 release, there is no guarantee it will contain that commit. Make sure such a Qt version does not fail with this test if not.
* | Merge topic 'error-on-exported-missing-include-dir'Brad King2013-03-284-0/+15
|\ \ | |/ |/| | | | | 634bb33 Error if linked target has relative paths in INTERFACE_INCLUDE_DIRECTORIES
| * Error if linked target has relative paths in INTERFACE_INCLUDE_DIRECTORIESStephen Kelly2013-03-264-0/+15
| | | | | | | | | | | | | | | | | | We can do this check only if the TargetName is non-empty, which means that we're evaluating INTERFACE_INCLUDE_DIRECTORIES from a linked dependency which was set using target_link_libraries. It is possible to have relative paths in INCLUDE_DIRECTORIES already in CMake 2.8.10.2, so that part will require a policy to fix.
* | Merge topic 'error-on-exported-missing-include-dir'Brad King2013-03-2616-4/+96
|\ \ | |/ | | | | | | | | 28051f1 Report an error on IMPORTED targets with a faulty INTERFACE af81a3c install(EXPORT): Ensure clean INTERFACE_INCLUDE_DIRECTORIES
| * Report an error on IMPORTED targets with a faulty INTERFACEStephen Kelly2013-03-265-2/+24
| | | | | | | | | | | | | | | | | | | | It is considered an error if the INTERFACE_INCLUDE_DIRECTORIES contains a directory which does not exist, which indicates a programmer error by the upstream, or a packaging error. One of the RunCMake.CompatibleInterface tests also needs to be updated due to this change. Non-existant includes were used in the test, but are not needed.
| * install(EXPORT): Ensure clean INTERFACE_INCLUDE_DIRECTORIESStephen Kelly2013-03-2612-2/+72
| | | | | | | | | | | | | | | | | | | | Check that source and binary directories are not part of the INTERFACE_INCLUDE_DIRECTORIES for installed IMPORTED targets. This is limited to directories which do not contain generator expressions to evaluate. Such paths can only be checked at time of use of the imported target, which will be done in a follow up patch.
* | Merge topic 'fix-COMPILE_DEFINITIONS-config'Brad King2013-03-266-3/+92
|\ \ | |/ |/| | | | | | | 1703b00 Test evaluation of per-config COMPILE_DEFINITIONS (#14037) a6286e9 Fix the evaluation of per-config COMPILE_DEFINITIONS (#14037)
| * Test evaluation of per-config COMPILE_DEFINITIONS (#14037)Brad King2013-03-256-3/+92
| | | | | | | | | | Teach the CompileDefinitions test to cover evaluation of config-specific generator expressions.
* | Rename variable for including current directory in interfacesBrad King2013-03-196-6/+6
|/ | | | | | | | | Rename the variable added by commit 9ce1b9ef (Add CMAKE_BUILD_INTERFACE_INCLUDES build-variable, 2012-11-25) to CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE to be more consistent with the existing CMAKE_INCLUDE_CURRENT_DIR variable. Suggested-by: Alex Neundorf <neundorf@kde.org>
* Merge topic 'fix-genex-preprocess'Brad King2013-03-191-0/+4
|\ | | | | | | | | 7a619fa Fix cmGeneratorExpression::Preprocess for interleaved inputs.
| * Fix cmGeneratorExpression::Preprocess for interleaved inputs.Stephen Kelly2013-03-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't find both preprocessing expressions at once, because then the BUILD_INTERFACE will always be favored if both are present, even if INSTALL_INTERFACE appears first. This was affecting the behavior of install(EXPORT) because the INTERFACE_INCLUDE_DIRECTORIES contained entries like /foo/include;$<INSTALL_INTERFACE:/bar/include> As the INSTALL_INTERFACE always evaluates to '0', it always needs to be preprocessed properly.
* | FindQt4: Set the INTERFACE_QT_MAJOR_VERSION for Qt4::QtCoreStephen Kelly2013-03-187-0/+30
|/ | | | | | | With a similar commit in Qt 5, this will error at CMake time if an attempt is made to use target_link_libraries(foo Qt4::QtCore Qt5::Core)
* Configure Tests/CMakeTests only with BUILD_TESTING ONBrad King2013-03-131-2/+2
| | | | | | | | | Since commit e03f83f3 (ProcessorCount test: fix path to cmsysTestsCxx executable, 2013-01-24) the directory references a target that is not built when BUILD_TESTING is OFF. It makes no sense to add tests without BUILD_TESTING anyway. While at it, use add_subdirectory instead of subdirs to add CMakeTests.
* Merge topic 'cleanup-early-include-CTest-failure'Brad King2013-03-1315-60/+104
|\ | | | | | | | | | | | | d90f49b CTest: Fail early without PROJECT_BINARY_DIR (#14005) 2e1c2bd build_command: Fail early without CMAKE_MAKE_PROGRAM (#14005) 4e5cb37 Refactor RunCMake.build_command test to allow more cases
| * CTest: Fail early without PROJECT_BINARY_DIR (#14005)Brad King2013-03-126-0/+20
| | | | | | | | | | | | Do not use PROJECT_BINARY_DIR before it is defined. If it is not defined when needed, fail with an error message suggesting that the project() command be invoked first.
| * build_command: Fail early without CMAKE_MAKE_PROGRAM (#14005)Brad King2013-03-125-1/+15
| | | | | | | | | | | | If CMAKE_MAKE_PROGRAM is not set fail with an error message instead of crashing. Suggest calling project() or enable_language() first to ensure that CMAKE_MAKE_PROGRAM is set.
| * Refactor RunCMake.build_command test to allow more casesBrad King2013-03-125-59/+69
| | | | | | | | | | | | Move the ErrorsOFF/ON common logic from CMakeLists.txt into an ErrorsCommon file to allow other test cases to be added that do not use the Errors test logic.
* | Merge topic 'fix-automoc-no-qt'Brad King2013-03-133-0/+21
|\ \ | | | | | | | | | | | | | | | a223a3b Automoc: Don't create automoc targets if Qt is not used (#13999) 65b5c1e Merge branch 'property-link-depends-no-crash' into fix-automoc-no-qt
| * | Automoc: Don't create automoc targets if Qt is not used (#13999)Stephen Kelly2013-03-123-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 79568f95 (automoc: Add source file to target early to set the linker language, 2013-02-20) changed automoc initialization to a two step process. In the first step, the generated source file was added to the target, which allows the link language to be determined. However, this bypassed the check for the availability of Qt itself. At build-time the automoc file could not be generated because the moc tool was not available to create it. The solution is to only add the automoc file to the target if Qt is found.
* | | Merge topic 'genex-SEMICOLON'Brad King2013-03-132-0/+4
|\ \ \ | | | | | | | | | | | | | | | | 7f3bb8b Add $<SEMICOLON> generator expression.
| * | | Add $<SEMICOLON> generator expression.Jean-Christophe Fillion-Robin2013-03-122-0/+4
| | |/ | |/| | | | | | | | | | This expression is useful to put a ';' in a command line argument without dividing the argument during CMake list expansion.
* | | Merge topic 'ExternalData-escape-semicolons'Brad King2013-03-139-0/+57
|\ \ \ | |/ / |/| | | | | | | | 1823ab4 ExternalData: Preserve escaped semicolons during argument expansion
| * | ExternalData: Preserve escaped semicolons during argument expansionBrad King2013-03-129-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CMake language implicitly flattens lists so a ";" in a list element must be escaped with a backslash. List expansion removes backslashes escaping semicolons to leave raw semicolons in the values. Teach ExternalData_Add_Test and ExternalData_Expand_Arguments to re-escape semicolons found in list elements so the resulting argument lists work as if constructed directly by the set() command. For example: ExternalData_Add_Test(Data NAME test1 COMMAND ... "a\\;b") ExternalData_Expand_Arguments(Data args2 "c\\;d") add_test(NAME test2 COMMAND ... ${args2}) should be equivalent to set(args1 "a\\;b") add_test(NAME test1 COMMAND ... ${args1}) set(args2 "c\\;d") add_test(NAME test2 COMMAND ... ${args2}) which is equivalent to add_test(NAME test1 COMMAND ... "a;b") add_test(NAME test2 COMMAND ... "c;d") Note that it is not possible to make ExternalData_Add_Test act exactly like add_test when quoted arguments contain semicolons because the CMake language flattens lists when constructing function ARGN values. This re-escape approach at least allows test arguments to have semicolons. While at it, teach ExternalData APIs to not transform "DATA{...;...}" arguments because the contained semicolons are non-sensical. Suggested-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
* | | Merge topic 'fix-transitive-target-names'Brad King2013-03-122-0/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | 1bdd167 Restore support for target names with '+' (#13986) 254687d Only process transitive interface properties for valid target names.
| * | | Restore support for target names with '+' (#13986)Stephen Kelly2013-03-122-0/+8
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Extend the range of valid target names with the + sign. This character can commonly be used for target names, such as those containing 'c++'. Add a test but skip it for Borland and Watcom tools which do not support the character. Suggested-By: Benjamin Kloster
* | | Remove unused parameters from target_link_libraries tests.Stephen Kelly2013-03-063-3/+3
|/ /
* | Merge topic 'FixPreLinkTest'Brad King2013-03-051-1/+1
|\ \ | | | | | | | | | | | | 5ab1259 Use PRE_LINK instead of PRE_BUILD when testing PRE_LINK.
| * | Use PRE_LINK instead of PRE_BUILD when testing PRE_LINK.James Bigler2013-03-041-1/+1
| | |
* | | Merge topic 'GetPrerequisites-objdump'Brad King2013-03-041-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 12fb50d GetPrerequisites: Add documentation for objdump 8eb2fe9 GetPrerequisites: Enable test for BundleUtilities on MinGW 33c94c8 GetPrerequisites: Add support for objdump 5260a86 GetPrerequisites: Move tool search paths up
| * | | GetPrerequisites: Enable test for BundleUtilities on MinGWMichael Tänzer2013-03-011-0/+1
| |/ / | | | | | | | | | Signed-off-by: Michael Tänzer <neo@nhng.de>
* | | Merge topic 'ctest_update-Git-HEAD'Brad King2013-03-041-4/+6
|\ \ \ | | | | | | | | | | | | | | | | 78b81b7 CTest: Fix ctest_update with 'HEAD' file in source tree
| * | | CTest: Fix ctest_update with 'HEAD' file in source treeBrad King2013-02-281-4/+6
| |/ / | | | | | | | | | | | | Add the '--' command-line separator to make the HEAD reference unambiguous. Extend the CTest.UpdateGIT test to cover this case.
* | | Merge topic 'remove-TARGET_DEFINED-genex'Brad King2013-03-045-18/+8
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | cbf0756 Revert "Add the TARGET_DEFINED generator expression" 21a342c Remove use of TARGET_DEFINED from the target_link_libraries test. 47b8d32 Remove use of TARGET_DEFINED from the ExportImport test. 2e39d21 Remove use of TARGET_DEFINED from target_include_directories test.
| * | Revert "Add the TARGET_DEFINED generator expression"Stephen Kelly2013-02-252-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2bee6f5ba5b3f33817cc00e056a7df60d05c9399. This expression is not used, and has a semantic which is not completely optimal (namely considering utility targets to be targets, though usually we are interested in linkable targets). Remove it so that we have more freedom to define better expressions in the future. Conflicts: Source/cmGeneratorExpressionEvaluator.cxx Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt Tests/CMakeCommands/target_compile_definitions/consumer.cpp
| * | Remove use of TARGET_DEFINED from the target_link_libraries test.Stephen Kelly2013-02-251-4/+4
| | | | | | | | | | | | | | | | | | Update the unit test introduced in commit 57175d55 (Only use early evaluation termination for transitive properties., 2013-02-07) to not use the expression, but still test the appropriate code.
| * | Remove use of TARGET_DEFINED from the ExportImport test.Stephen Kelly2013-02-251-1/+1
| | | | | | | | | | | | | | | | | | Update the unit test introduced in commit 5daaa5c4 (Fix TARGET_PROPERTY target extractions., 2013-01-26) to not use the expression, but still test the appropriate code.
| * | Remove use of TARGET_DEFINED from target_include_directories test.Stephen Kelly2013-02-251-3/+3
| | | | | | | | | | | | | | | | | | | | | Change the unit test introduced in commit 24dcf0c0 (Make sure generator expressions can be used with target_include_directories., 2013-01-16) to not use the expression, but still test the appropriate code.
* | | Merge topic 'interface-property-external-read'Brad King2013-02-253-1/+40
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8dfdf1c Fix the tests for evaluating includes and defines. 98a6725 Fix constness of accessors. 7e70744 Expand includes and defines transitively in 'external' genexes. d1a2729 Fix DAG checker finding cycling dependencies. e72eaad Workaround broken code where a target has itself in its link iface. ec2c67b Strip stray semicolons when evaluating generator expressions.
| * | | Fix the tests for evaluating includes and defines.Stephen Kelly2013-02-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should also check whether the INTERFACE_ variant of a property is being read, and in the case of the compile definitions, we should test the _<CONFIG> suffixed variants. That is already available through the use of the methods. This way, we use the ALREADY_SEEN optimization when evaluating the includes of a target in 'external' generator expressions, ie, those used in a add_custom_command invokation, as opposed to evaluating the INCLUDE_DIRECTORIES of a target itself via GetIncludeDirectories.
| * | | Expand includes and defines transitively in 'external' genexes.Stephen Kelly2013-02-233-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This means that we can use expressions of the form $<TARGET_PROPERTY:foo,INTERFACE_INCLUDE_DIRECTORIES> to get a list of the interface include directories of foo, including those coming from dependencies. We can't have a test of a target which has a single include directory in its INCLUDE_DIRECTORIES because the shell on the MSYS platforms transforms a single include directory to include a prefix, which is not what the test expects. We test a target with two directories instead as a means to test a target with no link dependencies.
* | | | Merge topic 'FPHSA_FOUND_VAR_OPTION'Brad King2013-02-2510-0/+46
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f17711c FPHSA: Convert FOUND_VAR failure test to RunCMake c1f5780 FPHSA: improve documentation 7bb1abe FPHSA: Add FOUND_VAR option to specify _FOUND variable name
| * | | | FPHSA: Convert FOUND_VAR failure test to RunCMakeBrad King2013-02-228-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the Tests/FPHSA_InvalidFOUND_VAR test case over to a new RunCMake.FPHSA test with a BadFoundVar case. The RunCMake tests are built to cover failure cases easily and robustly.
| * | | | FPHSA: Add FOUND_VAR option to specify _FOUND variable nameAlex Neundorf2013-02-226-0/+36
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | In the new mode FPHSA now accepts a FOUND_VAR option, which can be set either to ExactCase_FOUND or UPPERCASE_FOUND, no other values are accepted. Also add tests for that, including failure. Alex
* | | | Merge topic 'try_compile-targets'Brad King2013-02-252-0/+23
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 236133e Handle targets in the LINK_LIBRARIES of try_compile. 1c0597c Add a new Export generator for IMPORTED targets. f2ab17d Keep track of all targets seen while evaluating a genex.