summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Add infrastructure for policies that disallow commandsBrad King2013-10-221-0/+1
| | | | | | | | Add cmCommand::Disallowed helper to check the setting of a policy that disallows the command. Add a RunCMake.DisallowedCommands test placeholder. Add a Help/policy/DISALLOWED_COMMAND.txt file for inclusion by each policy document to avoid duplication of the common text.
* Merge topic 'string-CONCAT-command'Brad King2013-10-221-0/+1
|\ | | | | | | | | 4e184a2 string: Add CONCAT sub-command
| * string: Add CONCAT sub-commandBrad King2013-10-211-0/+1
| | | | | | | | | | | | Add a string(CONCAT) command to simply concatenate input arguments together. This will be useful for combining strings from different quoting syntaxes. Add a RunCMake.string test covering these cases.
* | Consider targets with double colons to be IMPORTED or ALIAS targets.Stephen Kelly2013-10-211-0/+1
|/ | | | | | | | Introduce a policy to control the behavior. The AliasTargets unit test already tests that using a double-semicolon in the name is not an error. Change the ExportImport test to use a namespace with a double-semicolon too.
* Handle genexes when evaluating INTERFACE_INCLUDE_DIRECTORIES errors.Stephen Kelly2013-10-181-0/+1
|
* cmTarget: Deprecate the LOCATION target property with a policy.Stephen Kelly2013-10-111-0/+1
| | | | | | | | | | | | The final location and name of a build-target is not determined until generate-time. However, reading the LOCATION property from a target is currently allowed at configure time. Apart from creating possibly-erroneous results, this has an impact on the implementation of cmake itself, and prevents some major cleanups from being made. Disallow reading LOCATION from build-targets with a policy. Port some existing uses of it in CMake itself to use the TARGET_FILE generator expression.
* message: Add a DEPRECATION modeStephen Kelly2013-10-081-0/+1
| | | | | | By default, the message is not issued. If CMAKE_ERROR_DEPRECATED is on, the message is fatal. If CMAKE_WARN_DEPRECATED is on, the message is a warning.
* Merge topic 'INTERFACE_LIBRARY-target-type'Brad King2013-10-081-0/+1
|\ | | | | | | | | | | | | ce0c303 install: Teach EXPORT option to handle INTERFACE_LIBRARY targets 435c912 export: Add support for INTERFACE_LIBRARY targets fe73226 Add the INTERFACE_LIBRARY target type.
| * Add the INTERFACE_LIBRARY target type.Stephen Kelly2013-10-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This target type only contains INTERFACE_* properties, so it can be used as a structural node. The target-specific commands enforce that they may only be used with the INTERFACE keyword when used with INTERFACE_LIBRARY targets. The old-style target properties matching LINK_INTERFACE_LIBRARIES_<CONFIG> are always ignored for this target type. The name of the INTERFACE_LIBRARY must match a validity generator expression. The validity is similar to that of an ALIAS target, but with the additional restriction that it may not contain double colons. Double colons will carry the meaning of IMPORTED or ALIAS targets in CMake 2.8.13. An ALIAS target may be created for an INTERFACE library. At this point it can not be exported and does not appear in the buildsystem and project files are not created for them. That may be added as a feature in a later commit. The generators need some changes to handle the INTERFACE_LIBRARY targets returned by cmComputeLinkInterface::GetItems. The Ninja generator does not use that API, so it doesn't require changes related to that.
* | CheckStructHasMember: Add support for C++Daniele E. Domenichelli2013-10-081-0/+1
|/ | | | | | | | | | | | | | Previously if headers required to check if a struct has a member can be compiled with C++ compiler only, the check would fail because the C compiler fails. As a consequence, the result variable would be set to false, even if the struct has that particular member. Teach CHECK_STRUCT_HAS_MEMBER to accept a new optional argument LANGUAGE that allows one to explicitly set the compiler to use. The new signature is therefore: CHECK_STRUCT_HAS_MEMBER (<struct> <member> <header> <variable> [LANGUAGE <language>])
* Add RunCMake.Syntax test to cover argument parsingBrad King2013-08-081-0/+1
| | | | | | | Test basic unquoted and quoted argument parsing cases including failure on an unterminated string and an unterminated command invocation. Also cover arguments not separated by any spaces, which is accidentally allowed by the current parser.
* Add the ALIAS target concept for libraries and executables.Stephen Kelly2013-08-021-0/+1
| | | | | | | | | | | | | | | | | * The ALIAS name must match a validity regex. * Executables and libraries may be aliased. * An ALIAS acts immutable. It can not be used as the lhs of target_link_libraries or other commands. * An ALIAS can be used with add_custom_command, add_custom_target, and add_test in the same way regular targets can. * The target of an ALIAS can be retrieved with the ALIASED_TARGET target property. * An ALIAS does not appear in the generated buildsystem. It is kept separate from cmMakefile::Targets for that reason. * A target may have multiple aliases. * An ALIAS target may not itself have an alias. * An IMPORTED target may not have an alias. * An ALIAS may not be exported or imported.
* Merge topic 'dev/export-target-without-language'Brad King2013-07-251-0/+1
|\ | | | | | | | | 5837f19 export: Error when exporting a target without a language
| * export: Error when exporting a target without a languageBen Boeckel2013-07-251-0/+1
| | | | | | | | | | | | | | | | First, it prevents a NULL dereference and second it reiterates that targets without languages are not supported by CMake. Add a RunCMake.ExportWithoutLanguage test exporting a library without a languages.
* | Merge topic 'doc-RunCMake-strips-expected'Brad King2013-07-251-1/+1
|\ \ | |/ |/| | | | | c80a4f9 Tests/RunCMake: Document stripping of expected output
| * Tests/RunCMake: Document stripping of expected outputBen Boeckel2013-07-251-1/+1
| | | | | | | | | | Document that trailing newlines are stripped from the -stdout.txt and -stderr.txt content before using as a regular expression.
* | target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signatureStephen Kelly2013-07-241-0/+1
|/ | | | | | | Add a new signature to help populate INTERFACE_LINK_LIBRARIES and LINK_LIBRARIES cleanly in a single call. Add policy CMP0023 to control whether the keyword signatures can be mixed with uses of the plain signatures on the same target.
* Merge topic 'obsolete-qt4-macros'Brad King2013-07-161-0/+4
|\ | | | | | | | | cb7f32f Mark qt4_use_modules and qt4_automoc as obsolete.
| * Mark qt4_use_modules and qt4_automoc as obsolete.Stephen Kelly2013-07-141-0/+4
| | | | | | | | | | The QT_QMAKE_EXECUTABLE has to be passed through the cmake calls because the executable may not be in the PATH.
* | Merge topic 'target-policies'Brad King2013-07-151-0/+1
|\ \ | | | | | | | | | | | | 484bb88 Genex: Make CMP0021 and CMP0022 usable with TARGET_POLICY
| * | Genex: Make CMP0021 and CMP0022 usable with TARGET_POLICYStephen Kelly2013-07-111-0/+1
| | | | | | | | | | | | | | | | | | Use preprocessor loops and add a unit test for the appropriate policies. All policies whose value is recorded at target creation time should be part of this list.
* | | Merge topic 'INTERFACE_LINK_LIBRARIES-prop'Brad King2013-07-151-0/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | 3e30d9e TLL: Don't populate old link interface if CMP0022 is NEW. 574fec9 Export: Generate INTERFACE_LINK_LIBRARIES property on targets. d0a76ea Introduce the INTERFACE_LINK_LIBRARIES property. ddde61c Introduce the LINK_ONLY generator expression. 5aa9731 GenexEval: Add abstracted access to link interface for a target.
| * | Introduce the INTERFACE_LINK_LIBRARIES property.Stephen Kelly2013-07-081-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This property replaces the properties which match (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?, and is enabled for IMPORTED targets, and for non-IMPORTED targets only with a policy. For static libraries, the INTERFACE_LINK_LIBRARIES property is also used as the source of transitive usage requirements content. Static libraries still require users to link to all entries in their LINK_LIBRARIES, but usage requirements such as INCLUDE_DIRECTORIES COMPILE_DEFINITIONS and COMPILE_OPTIONS can be restricted to only certain interface libraries. Because the INTERFACE_LINK_LIBRARIES property is populated unconditionally, we need to compare the evaluated result of it with the link implementation to determine whether to issue the policy warning for static libraries. For shared libraries, the policy warning is issued if the contents of the INTERFACE_LINK_LIBRARIES property differs from the contents of the relevant config-specific old LINK_INTERFACE_LIBRARIES property.
* | cmake: On configure error suggest looking at CMake*.log filesBrad King2013-07-091-0/+1
|/ | | | | | | | | | When CMake reports failure to configure a project, especially when the toolchain does not initialize properly, the true reason may be clear from reading the CMakeFiles/CMake(Output|Error).log files. Advise users to look at these files if they exist when configuration fails. Add RunCMake.Configure test to check that the log files are mentioned when configuration fails.
* Merge topic 'VISIBILITY_PRESET-property'Brad King2013-06-051-0/+16
|\ | | | | | | | | | | cd1fa53 Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property. 0e9f4bc Introduce target property <LANG>_VISIBILITY_PRESET
| * Introduce target property <LANG>_VISIBILITY_PRESETStephen Kelly2013-06-021-0/+16
| | | | | | | | | | | | This is initialized by CMAKE_<LANG>_VISIBILITY_PRESET. The target property is used as the operand to the -fvisibility= compile option with GNU compilers and clang.
* | variable_watch: Add test for MODIFIED_ACCESS reportBrad King2013-06-031-0/+1
| | | | | | | | Add a RunCMake.variable_watch watch test to cover the basic use case.
* | try_compile: Add test for bad call error casesBrad King2013-05-311-0/+1
| | | | | | | | | | Add a RunCMake.try_compile test to cover cases of bad invocation of the try_compile command.
* | Merge topic 'fix-FileIsDirectory-SEGV'Brad King2013-05-301-0/+1
|\ \ | | | | | | | | | | | | | | | | | | 7378792 if: Add test for IS_DIRECTORY 4ab10e0 Merge branch 'master' into fix-FileIsDirectory-SEGV 045d6ae KWSys: Fix SystemTools::FileIsDirectory with long paths (#14176)
| * | if: Add test for IS_DIRECTORYBrad King2013-05-281-0/+1
| |/ | | | | | | | | | | Add a RunCMake.if test to cover if() command behavior. Start with a test for IS_DIRECTORY cases with an existing directory and a long path, both with a trailing slash.
* | Merge topic 'genex-generate-file'Brad King2013-05-281-0/+2
|\ \ | |/ |/| | | | | b983a58 file: Add GENERATE command to produce files at generate time
| * file: Add GENERATE command to produce files at generate timeStephen Kelly2013-05-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea is to write to a temp file which contains generator expressions, and at generate time, evaluate the generator expressions, and write the result to a file. Because executables on Windows are limited in the length of command line it is possible to use, it is common to write command line arguments to a file instead and specify the file as a source of arguments. This new FILE(GENERATE) subcommand allows the use of generator expressions to create such files so that they can be used with add_custom_command for example.
* | get_filename_component: Add explicit unit testsBrad King2013-04-161-0/+1
|/ | | | | Add test RunCMake.get_filename_component to cover cases of the command. Remove redundant coverage of these cases from the "complex" tests.
* add_dependencies: Distinguish target v. file dependencies in error (#14050)Brad King2013-03-291-0/+1
| | | | | | | 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.
* 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.
* FindQt4: Set the INTERFACE_QT_MAJOR_VERSION for Qt4::QtCoreStephen Kelly2013-03-181-0/+6
| | | | | | | 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)
* CTest: Fail early without PROJECT_BINARY_DIR (#14005)Brad King2013-03-121-0/+1
| | | | | | 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.
* FPHSA: Convert FOUND_VAR failure test to RunCMakeBrad King2013-02-221-0/+1
| | | | | | 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.
* Test Unix Makefiles generator support for changing compilersBrad King2013-02-201-0/+3
| | | | | | 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: Add generator toolset supportBrad King2013-02-071-0/+1
| | | | | 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-071-0/+3
|\ | | | | | | We need the latest Tests/CMakeLists.txt so we can refactor all tests.
| * ExternalData: Add tests covering interfaces and errorsBrad King2013-01-301-0/+1
| | | | | | | | | | | | | | | | 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.
| * Merge topic 'qt4-autolink-qtmain'Brad King2013-01-231-0/+1
| |\ | | | | | | | | | | | | | | | e3b5eb6 Automatically link to the qtmain library when linking to QtCore. 6c8d8af Add the $<TARGET_POLICY> expression
| | * Add the $<TARGET_POLICY> expressionStephen Kelly2013-01-171-0/+1
| | | | | | | | | | | | | | | | | | 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-201-0/+1
| |/ | | | | | | | | The properties are evaluated as link-dependent interface properties when evaluating the generator expressions.
* | Xcode: Implement generator toolset selection (#9831, #13802)Brad King2013-02-071-0/+5
| | | | | | | | | | Implement generator toolset selection (cmake -T) for Xcode > 2.0 by adding the GCC_VERSION build setting to project files.
* | CMake: Add -T option to choose a generator toolsetBrad King2013-02-071-0/+1
|/ | | | | | | | | | | | 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-101-0/+3
| | | | | | | | | 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-081-1/+0
|\ | | | | | | | | 09a0da7 Revert "load_command: Deprecate and document pending removal"
| * Revert "load_command: Deprecate and document pending removal"Brad King2013-01-071-1/+0
| | | | | | | | | | This reverts commit d2d43986e7f5013465473a71c393fc3897cecbac. We will add a policy to remove the command more gracefully.