summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* VS12: Add Visual Studio 12 generator (#14251)Brad King2013-06-281-1/+1
| | | | | | | | | | | | | | Copy cmGlobalVisualStudio11Generator to cmGlobalVisualStudio12Generator and update version numbers accordingly. Add the VS12 enumeration value. Add module CMakeVS12FindMake to find MSBuild. Look for MSBuild in its now-dedicated Windows Registry entry. Teach the platform module Windows-MSVC to set MSVC12 and document the variable. Teach module InstallRequiredSystemLibraries to look for the VS 12 runtime libraries. Teach tests CheckCompilerRelatedVariables, Preprocess, VSExternalInclude, and RunCMake.GeneratorToolset to treat VS 12 as they do VS 10 and 11. Inspired-by: Minmin Gong <minmin.gong@gmail.com>
* 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.
* | 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.
* 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-2611-0/+56
| | | | | | | | | | 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.
* 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)
* 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.
* | ExternalData: Preserve escaped semicolons during argument expansionBrad King2013-03-127-0/+46
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* FPHSA: Convert FOUND_VAR failure test to RunCMakeBrad King2013-02-227-0/+24
| | | | | | 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.
* 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 the $<LINKED:...> generator expression."Stephen Kelly2013-02-134-16/+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.
* | Merge topic 'minor-fixes'Brad King2013-02-1115-3/+62
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Whitelist target types in target_{include_directories,compile_definitions}Stephen Kelly2013-02-084-0/+12
| | | | | | | | | | Setting include directories or compile definitions on a target created with add_custom_target does not make sense.
| * Ensure type specific compatible interface properties do not intersect.Stephen Kelly2013-02-074-0/+16
| | | | | | | | | | Before, the boolean version would always win, and the string one would be ignored.
| * Test printing origin of include dirs from tll().Stephen Kelly2013-02-072-3/+16
| |
* | Tests: Add generator toolset supportBrad King2013-02-073-6/+9
| | | | | | | | | | Propagate CMAKE_GENERATOR_TOOLSET through the test hierarchy so that all tests can build with the selected generator toolset, if any.
* | Merge branch 'master' into generator-toolsetBrad King2013-02-07120-15/+670
|\ \ | |/ | | | | We need the latest Tests/CMakeLists.txt so we can refactor all tests.
| * Merge topic 'tll-includes-defines'Brad King2013-02-058-0/+30
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e48d842 Cache context-independent includes on evaluation. 089fe1c Optimize genex evaluation for includes and defines. 179f495 find_package: Reword <package>_NO_INTERFACES documentation e7b579b Test workaround of bad interface include directories from depends. 77cecb7 Add includes and compile definitions with target_link_libraries. 0b92602 Add the $<LINKED:...> generator expression. 0fa7f69 Add API to check if we're reading a includes or defines property. 2c3654c Add a way to exclude INTERFACE properties from exported targets. d4297d5 Export targets to a targets file, not a Config file. df4d2b2 Make it an error for INSTALL_PREFIX to be evaluated. 7ceeba9 Advance more when preprocessing exported strings. 30268b4 Handle reading empty properties defined by the link interface.
| | * Add the $<LINKED:...> generator expression.Stephen Kelly2013-01-314-0/+16
| | | | | | | | | | | | | | | | | | This is both a short form of using a TARGET_DEFINED expression together with a TARGET_PROPERTY definition, and a way to strip non-target content from interface properties when exporting.
| | * Make it an error for INSTALL_PREFIX to be evaluated.Stephen Kelly2013-01-314-0/+14
| | | | | | | | | | | | | | | | | | An empty string is not likely going to produce expected results in any evaluation context. It is replaced by preprocessing currently.
| * | Merge topic 'add-ExternalData-module'Brad King2013-02-0571-0/+431
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5484c60 Merge branch 'vs6-rule-files' into add-ExternalData-module 1fd8d01 ExternalData: Attach download rules to content links in IDEs a6d3ffc Fix Module.ExternalData test on VS 6 aed590a Fix Module.ExternalData test on Cygwin 06e8ded Merge branch 'fix-atomic-rename-on-Windows' into add-ExternalData-module e2e0d2e ExternalData: Collapse ../ components in DATA{} paths ee2abfd ExternalData: Add support for SHA 1 and 2 hash algorithms aa8b228 ExternalData: Generalize hash algo/ext handling 9e518a8 ExternalData: Allow DATA{} syntax to reference directories 175ed02 ExternalData: Allow ()-groups in series match regex 4befecc ExternalData: Add tests covering interfaces and errors bcd2580 ExternalData: Improve series matching using an explicit syntax c0cebcb ExternalData: Remove unused private interface 5275993 ExternalData: Cleanup stray TODO and typo in comments 7bb8344 ExternalData: Do not match directory names when resolving DATA{} 00d801f ExternalData: Remove compatibility with CMake < 2.8.5 ...
| | * ExternalData: Collapse ../ components in DATA{} pathsBrad King2013-01-302-2/+13
| | | | | | | | | | | | | | | Relative path components need to be normalized out even if they appear in the middle of a caller-supplied string.
| | * ExternalData: Add support for SHA 1 and 2 hash algorithmsBrad King2013-01-303-0/+26
| | | | | | | | | | | | | | | Update the Module.ExternalData and RunCMake.ExternalData tests to cover some of them.
| | * ExternalData: Allow DATA{} syntax to reference directoriesBrad King2013-01-309-2/+38
| | | | | | | | | | | | | | | | | | | | | Use a trailing slash to reference a directory. Require that a list of associated files be specified to select from within the directory. One may simply use DATA{Dir/,REGEX:.*} to reference all files but get a directory passed on the command line.
| | * ExternalData: Add tests covering interfaces and errorsBrad King2013-01-3062-0/+358
| | | | | | | | | | | | | | | | | | | | | | | | Add a Module.ExternalData test to verify data retrieval and test argument DATA{} references. Add a RunCMake.ExternalData test to verify error handling and automatic transformation of a raw data to a content link and staged object.
| * | Add the COMPATIBLE_INTERFACE_STRING property.Stephen Kelly2013-01-2413-0/+64
| |/
| * Merge topic 'clean-include-dirs-debugging'Brad King2013-01-231-15/+8
| |\ | | | | | | | | | | | | | | | | | | | | | 6063fef Output include directories as LOG messages, not warnings. aa66748 Specify the target whose includes are being listed. d70204a Only output includes once after the start of 'generate-time' when debugging. 0d46e9a Store includes from the same include_directories call together.
| | * Output include directories as LOG messages, not warnings.Stephen Kelly2013-01-211-4/+4
| | |
| | * Specify the target whose includes are being listed.Stephen Kelly2013-01-211-4/+4
| | |
| | * Store includes from the same include_directories call together.Stephen Kelly2013-01-211-7/+0
| | | | | | | | | | | | | | | | | | Otherwise, we get a separate IncludeDirectoriesEntry for each include, and that causes unnecessary and confusing splitting in the output when debugging the INCLUDE_DIRECTORIES property.
| * | Merge topic 'qt4-autolink-qtmain'Brad King2013-01-2314-0/+62
| |\ \ | | | | | | | | | | | | | | | | | | | | e3b5eb6 Automatically link to the qtmain library when linking to QtCore. 6c8d8af Add the $<TARGET_POLICY> expression
| | * | Add the $<TARGET_POLICY> expressionStephen Kelly2013-01-1714-0/+62
| | |/ | | | | | | | | | | | | | | | This new expression allows checking how a policy was set when a target was created. That information is only recorded for a subset of policies, so a whitelist is used.
| * | Make INTERFACE determined properties readable in generator expressions.Stephen Kelly2013-01-2016-0/+75
| |/ | | | | | | | | The properties are evaluated as link-dependent interface properties when evaluating the generator expressions.
* | Xcode: Implement generator toolset selection (#9831, #13802)Brad King2013-02-072-1/+6
| | | | | | | | | | Implement generator toolset selection (cmake -T) for Xcode > 2.0 by adding the GCC_VERSION build setting to project files.
* | VS: Implement generator toolset selection (#10722, #13774)Brad King2013-02-074-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | Implement generator toolset selection (cmake -T) for VS >= 10 by setting the PlatformToolset. Extend the RunCMake.GeneratorToolset test case to verify CMAKE_GENERATOR_TOOLSET when the generator supports -T. Since commit 485a940e (VS: Simplify MSVC version reporting, 2012-08-23) all MSVC version information is detected during the compiler id step from the actual compiler invoked by generated build systems rather than hard-coded in VS generators. Therefore we can set the PlatformToolset in VS >= 10 project files and support toolsets from other VS versions.
* | CMake: Add -T option to choose a generator toolsetBrad King2013-02-0713-0/+46
|/ | | | | | | | | | | | Reject the option by default. It will be implemented on a per-generator basis. Pass the setting into try_compile project generation. Add cache entry CMAKE_GENERATOR_TOOLSET and associated variable documentation to hold the value persistently. Add a RunCMake.GeneratorToolset test to cover basic "-T" option cases. Verify that CMAKE_GENERATOR_TOOLSET is empty without -T, that -T is rejected when the generator doesn't support it, and that two -T options are always rejected.
* Process the INTERFACE_PIC property from linked dependenciesStephen Kelly2013-01-1013-0/+62
| | | | | | | | | This allows a dependee to inform a target that it should have its POSITION_INDEPENDENT_CODE property set to ON, or OFF. The value of the POSITION_INDEPENDENT_CODE property, if set, must be consistent with any INTERFACE_POSITION_INDEPENDENT_CODE properties on dependees. Add a test covering the consistency checks on platforms where they run.
* Merge topic 'deprecate-load_command'Brad King2013-01-085-14/+0
|\ | | | | | | | | 09a0da7 Revert "load_command: Deprecate and document pending removal"
| * Revert "load_command: Deprecate and document pending removal"Brad King2013-01-075-14/+0
| | | | | | | | | | This reverts commit d2d43986e7f5013465473a71c393fc3897cecbac. We will add a policy to remove the command more gracefully.
* | Add the TARGET_NAME generator expression.Stephen Kelly2013-01-054-0/+13
| | | | | | | | It will be used as a preprocessing marker.