summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* 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.
| * | | | Handle targets in the LINK_LIBRARIES of try_compile.Stephen Kelly2013-02-222-0/+23
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Imported targets are re-exported so that they can be used by the try_compile generated code with target_link_libraries. This makes the use of the cmake_expand_imported_targets macro obsolete. The macro is not able to expand the generator expressions which may appear in the IMPORTED_LINK_INTERFACE_LIBRARIES content. Instead it just sees them as 'not a target'.
* | | | Merge topic 'fix-automoc-linker-language'Brad King2013-02-253-0/+16
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | 79568f9 automoc: Add source file to target early to set the linker language
| * | | automoc: Add source file to target early to set the linker languageStephen Kelly2013-02-223-0/+16
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, GetIncludeDirectories was called before calling target->AddSourceFile(mocCppSource). Since commit a1c4905f (Use the link information as a source of compile definitions and includes., 2013-02-12), the include directories are determined by the link information. Valid link information requires that the linker language can be determined, which depends on the source files languages and the dependent targets languages. In the case of the no_link_languages target in the unit test, there are no dependencies and the additional source file no_link_languages_automoc.cpp is added to the target at generate-time. That file can be used to determine the linker language, but it must be added to the target before calling GetIncludeDirectories.
* | | ExternalData: Test content link with a space in its nameBrad King2013-02-224-0/+13
| | | | | | | | | | | | | | | | | | Extend the Module.ExternalData test to cover a DATA{} reference whose name contains a space. Skip the case when the native build tool does not support spaces.
* | | Tests: Generalize decision for 'make' tool supporting spacesBrad King2013-02-221-16/+22
| | | | | | | | | | | | | | | | | | Some make tools do not support spaces inside the source tree paths. Decide early whether to add tests that depend on support for spaces so we can use the result in a decision for any test.
* | | Tests: Replace exec_program with execute_processBrad King2013-02-221-6/+5
| |/ |/| | | | | | | Drop use of the old exec_program command from CMake's own CMakeLists.txt files.
* | Merge topic 'compiler-change-cleanup'Brad King2013-02-2014-2/+98
|\ \ | |/ |/| | | | | | | | | | | e83e6a1 Test Unix Makefiles generator support for changing compilers c307e1c Tests/RunCMake: Allow tests to control build tree behavior 2963c98 Merge branch 'empty-compiler-crash' into compiler-change-cleanup 1df09e5 Delete entire CMakeFiles directory when deleting CMakeCache.txt (#13756)
| * Test Unix Makefiles generator support for changing compilersBrad King2013-02-2013-0/+92
| | | | | | | | | | | | Add RunCMake.CompilerChange test to cover use of -DCMAKE_C_COMPILER=cc to change the compiler of an existing build tree. Also test for proper failure with -DCMAKE_C_COMPILER="" and no CC in the environment.
| * Tests/RunCMake: Allow tests to control build tree behaviorBrad King2013-02-181-2/+6
| | | | | | | | | | Teach the run_cmake to allow tests to set a custom test build directory. Also add an option to skip removing the build directory.
* | Revert "Add a way to exclude INTERFACE properties from exported targets."Stephen Kelly2013-02-134-76/+0
| | | | | | | | | | | | | | | | This reverts commit 2c3654c3de718fe822f8960063373774fc019494. The removal of some tests added in commit 77cecb77 (Add includes and compile definitions with target_link_libraries., 2012-11-05) are also squashed into this commit.
* | Revert "Add the $<LINKED:...> generator expression."Stephen Kelly2013-02-138-39/+0
| | | | | | | | | | | | | | | | | | This reverts commit 0b92602b816e2584db3781b120a1e5200da72ada. Conflicts: Source/cmGeneratorExpressionEvaluator.cxx Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt Tests/CMakeCommands/target_include_directories/CMakeLists.txt
* | Don't populate INTERFACE includes and defines properties in tll.Stephen Kelly2013-02-132-7/+12
| | | | | | | | | | | | | | | | | | This is a partial revert of commit 77cecb77 (Add includes and compile definitions with target_link_libraries., 2012-11-05). As the interface includes and defines are now determined by the link closure, there is no need to populate the corresponding properties explicitly.
* | Revert "Don't allow utility or global targets in the LINKED expression."Stephen Kelly2013-02-135-18/+0
| | | | | | | | This reverts commit 9712362b4580fb92394ecf8ff57be186571f4319.
* | Don't use LINKED where not needed.Stephen Kelly2013-02-123-3/+3
| |
* | Merge topic 'minor-fixes'Brad King2013-02-1132-12/+242
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ba48e63 Generate config-specific interface link libraries propeties. deb51a7 Remove unused forward declarations. 9712362 Don't allow utility or global targets in the LINKED expression. faa927e Make sure INTERFACE properties work with OBJECT libraries. 510fdcb Whitelist target types in target_{include_directories,compile_definitions} 4de7178 Ensure that the build interface includes have been added. df74bc3 Only append build interface include dirs to particular targets. d4e5c67 Don't keep track of content determined by target property values. 1fb545a Move a special case for PIC from the genex to the cmTarget code. 57175d5 Only use early evaluation termination for transitive properties. 4cf161a Fix determination of evaluating link libraries. 3a298c0 Fix generation of COMPILE_DEFINITIONS in DependInfo.cmake. 655e98b Ensure type specific compatible interface properties do not intersect. 46e2896 The COMPATIBLE_INTERFACE does not affect the target it is set on. 5f926a5 Test printing origin of include dirs from tll(). 7c0ec75 De-duplicate validation of genex target names. ...
| * Don't allow utility or global targets in the LINKED expression.Stephen Kelly2013-02-085-0/+18
| | | | | | | | | | | | The LINKED expression is exclusively for handling INTERFACE content and it does not make sense for utility targets to have INTERFACE content.
| * Make sure INTERFACE properties work with OBJECT libraries.Stephen Kelly2013-02-084-6/+23
| |