summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* Check for OBJECT_LIBRARY source files at start of generationBrad King2013-11-014-0/+12
| | | | | | | Teach cmGlobalGenerator::CheckTargets to include OBJECT_LIBRARY targets in the check for source file existence. Extend the RunCMake.ObjectLibrary test to cover this case.
* Add differing target property content to policy CMP0022 warningStephen Kelly2013-09-112-0/+18
| | | | | List the contents of the INTERFACE_LINK_LIBRARIES and the old-style property.
* Merge topic 'fix-RunCMake.Configure-FailCopyFileABI-newlines'Brad King2013-08-261-1/+2
|\ | | | | | | | | 2dce48f Fix RunCMake.Configure test expectation newline matching
| * Fix RunCMake.Configure test expectation newline matchingBrad King2013-08-161-1/+2
| | | | | | | | | | Teach FailCopyFileABI-check.cmake to convert CRLF to LF in the regular expression read literally from its own source.
* | Merge topic 'cmake-syntax'Brad King2013-08-154-0/+6
|\ \ | | | | | | | | | | | | 9040ec9 Do not warn about left paren not separated by a space
| * | Do not warn about left paren not separated by a spaceBrad King2013-08-154-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 58e52416 (Warn about arguments not separated by whitespace, 2013-02-16) we warn about arguments not separated by spaces. Loosen the warning to not complain about left parens not separated by spaces from the preceding token. This is common in code like "if(NOT(X))". Teach the RunCMake.Syntax test to cover cases of left parens not separated by spaces and check that no warning appears.
* | | Cygwin: Avoid legacy warnings in RunCMake.* testsBrad King2013-08-1336-36/+36
| | | | | | | | | | | | | | | | | | Set the minimum required version of CMake high enough to avoid the warning for CMAKE_LEGACY_CYGWIN_WIN32. The warning appears on stderr and breaks the expected output matching.
* | | Merge branch 'dev/fix-variable-watch-crash' into cmake-syntaxBrad King2013-08-083-0/+14
|\ \ \ | |/ / |/| | | | | | | | Resolve conflict in Source/cmVariableWatchCommand.cxx by integrating the changes from both sides.
| * | variable_watch: Add test for watching a variable multiple timesBen Boeckel2013-08-083-0/+14
| | |
* | | Warn about unquoted arguments that look like long bracketsBrad King2013-08-084-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | In the future CMake will introduce Lua-style long bracket syntax. Warn about unquoted arguments that in the future will be treated as opening long brackets. Teach the RunCMake.Syntax test to cover such cases and ensure that the warning appears.
* | | Warn about arguments not separated by whitespaceBrad King2013-08-081-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach the lexer to return tokens for whitespace. Teach the parser to tolerate the space tokens where whitespace is allowed. Also teach the parser to diagnose and warn about cases of quoted arguments followed immediately by another argument. This was accidentally allowed previously, so we only warn. Update the RunCMake.Syntax test case StringNoSpace expected stderr to include the warnings.
* | | Add RunCMake.Syntax test cases for command invocation stylesBrad King2013-08-0816-0/+74
| | | | | | | | | | | | | | | Cover commands with whitespace present in allowed combinations. Also cover command error cases such as two on one line.
* | | cmListFileLexer: Fix line number after backslash in stringBrad King2013-08-084-0/+12
| | | | | | | | | | | | | | | | | | If a line inside a string ends in a backslash count the following newline character as a line increment. Add a test covering this case to verify that subsequent line numbers are correct.
* | | Add RunCMake.Syntax test to cover argument parsingBrad King2013-08-0819-0/+53
| | | | | | | | | | | | | | | | | | | | | 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-0258-0/+248
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Export: Process generator expressions from INCLUDES DESTINATION.Stephen Kelly2013-07-314-0/+13
| | | | | | | | Configuration sensitive expressions are not permitted.
* | Merge topic 'install-interface-includes'Brad King2013-07-314-10/+0
|\ \ | | | | | | | | | | | | 72d13ff install: Remove error condition using INCLUDES DESTINATION without EXPORT.
| * | install: Remove error condition using INCLUDES DESTINATION without EXPORT.Stephen Kelly2013-07-294-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 650e61f8 (Add a convenient way to add the includes install dir to the INTERFACE., 2013-01-05) introduced an error case for using the install(TARGETS) command with specified INCLUDES DESTINATION, but no specified EXPORT set. It is convenient to use a variable to set the various destinations for different outputs (as KDE does), and some targets such as executables are installed but not exported. This was triggering the error case, but as it is a common case, remove the error.
* | | Merge topic 'minor-cleanups'Brad King2013-07-293-4/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b8dc7fa Genex: Disallow LINKER_LANGUAGE only when used on a static library. c8a10ba cmTarget: Fix iface libraries and languages for static libraries. f94bdb3 cmTarget: Remove duplicates when printing traces of tll signatures ff3d5fa Export: Fix typo of LINK_INTERFACE_LIBRARIES. 79a7a81 Docs: Document variables for default visibility values. 6f6391b Docs: Generalize and de-duplicate VISIBILITY_PREFIX docs. d8cb47f Docs: Trim trailing whitespace in generated doc. f10e648 Docs: Document existing target property debugging options. 4f4d69f Qt4Macros: Simplify some variable population. a413a40 Qt4Macros: Remove undefined varible use. b60a29e Qt4Macros: Remove unneeded generate CONDITION. e454cba Docs: Document file(GENERATE) CONDITION as optional.
| * | | Genex: Disallow LINKER_LANGUAGE only when used on a static library.Stephen Kelly2013-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | For shared libraries and executables, the linker_language is indepenedent of the linked libraries.
| * | | Export: Fix typo of LINK_INTERFACE_LIBRARIES.Stephen Kelly2013-07-262-2/+2
| | | | | | | | | | | | | | | | Refer correctly to the old property, not the new one.
* | | | Merge topic 'install-interface-includes'Brad King2013-07-264-0/+10
|\ \ \ \ | |/ / / |/| / / | |/ / | | | 650e61f Add a convenient way to add the includes install dir to the INTERFACE.
| * | Add a convenient way to add the includes install dir to the INTERFACE.Stephen Kelly2013-07-244-0/+10
| | | | | | | | | | | | | | | | | | | | | Export the INCLUDES DESTINATION without appending to the INTERFACE_INCLUDE_DIRECTORIES of the target itself. That way, a target can be exported multiple times with different INCLUDES DESTINATION without unintended cross-pollution of export sets.
* | | Merge topic 'dev/export-target-without-language'Brad King2013-07-256-0/+16
|\ \ \ | | | | | | | | | | | | | | | | 5837f19 export: Error when exporting a target without a language
| * | | export: Error when exporting a target without a languageBen Boeckel2013-07-256-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2422-0/+150
| | | | | | | | | | | | | | | | | | | | | 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 'remove-LINK_LANGUAGE-genex'Brad King2013-07-242-3/+4
|\ \ \ | |/ / |/| | | | | | | | 4f6bd70 Remove the LINK_LANGUAGE generator expression.
| * | Remove the LINK_LANGUAGE generator expression.Stephen Kelly2013-07-242-3/+4
| |/ | | | | | | | | | | | | | | | | | | | | It accepted an optional argument to test for equality, but no way to get the linker language of a particular target. TARGET_PROPERTY provides this flexibility and STREQUAL provides the necessary API for equality test. Extend the CompileDefinitions test to cover accessing the property of another target.
* | Teach compiler ABI check to tolerate try_compile COPY_FILE failureBrad King2013-07-175-0/+26
|/ | | | | | | | | | | | | | | | | In CMakeDetermineCompilerABI we use try_compile with the COPY_FILE option to get a copy of the compiled binary used to detect the ABI information. We already tolerate the case when compilation fails. However, when compilation appears to succeed but does not produce the expected executable the try_compile command immediately reports an error because the COPY_FILE fails. Tolerate COPY_FILE failure without stopping the overall configuration process by using the try_compile COPY_FILE_ERROR option to capture the error message. Log the full error to CMakeError.log and simply report failure to detect the ABI as if compilation had failed. Teach the RunCMake.Configure test to cover this case and verify that the messages show up as expected both in stdout and in CMakeError.log.
* Merge topic 'obsolete-qt4-macros'Brad King2013-07-1610-0/+47
|\ | | | | | | | | cb7f32f Mark qt4_use_modules and qt4_automoc as obsolete.
| * Mark qt4_use_modules and qt4_automoc as obsolete.Stephen Kelly2013-07-1410-0/+47
| | | | | | | | | | 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-157-0/+36
|\ \ | | | | | | | | | | | | 484bb88 Genex: Make CMP0021 and CMP0022 usable with TARGET_POLICY
| * | Genex: Make CMP0021 and CMP0022 usable with TARGET_POLICYStephen Kelly2013-07-117-0/+36
| | | | | | | | | | | | | | | | | | 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-1528-0/+145
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | 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.
| * | TLL: Don't populate old link interface if CMP0022 is NEW.Stephen Kelly2013-07-089-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always populate the INTERFACE_LINK_LIBRARIES for interface entries. Don't populate the old interface properties matching (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)? if CMP0022 is NEW. Because the INTERFACE_LINK_LIBRARIES property is now populated by the target_link_libraries when operating on a static library, make an equivalent change which populates the property with the same value when the old link_libraries() command is used. This silences the policy warning in that case.
| * | Export: Generate INTERFACE_LINK_LIBRARIES property on targets.Stephen Kelly2013-07-087-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This property is generated only for targets which have recorded policy CMP0022 as NEW, and a compatibility mode is added to additionally export the old interfaces in that case too. If the old interfaces are not exported, the generated export files require CMake 2.8.12. Because the unit tests use a version which is not yet called 2.8.12, temporarily require a lower version.
| * | Introduce the INTERFACE_LINK_LIBRARIES property.Stephen Kelly2013-07-0814-0/+69
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge topic 'try_compile-COPY_FILE_ERROR'Brad King2013-07-157-0/+16
|\ \ | | | | | | | | | | | | c28715b try_compile: Add COPY_FILE_ERROR option to capture failure
| * | try_compile: Add COPY_FILE_ERROR option to capture failureBrad King2013-07-157-0/+16
| |/ | | | | | | | | | | | | | | | | | | | | When the COPY_FILE operation fails optionally capture the error message with a COPY_FILE_ERROR option instead of reporting the error immediately. This gives callers a chance to do something else or report the error. Teach the RunCMake.try_compile test to cover bad argument combinations involving COPY_FILE_ERROR. Teach the TryCompile test to cover the case of a COPY_FILE error message captured by COPY_FILE_ERROR.
* | cmake: On configure error suggest looking at CMake*.log filesBrad King2013-07-097-0/+18
|/ | | | | | | | | | 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 branch 'master' into vs12-generatorBrad King2013-06-28109-4/+461
|\ | | | | | | | | Resolve conflicts in Tests/Preprocess/CMakeLists.txt by keeping the side from 'master'.
| * Genex: Report error if a target file is needed to evaluate link libraries.Stephen Kelly2013-06-246-0/+21
| | | | | | | | | | | | | | | | Constructs such as target_link_libraries(foo $<$<STREQUAL:$<TARGET_FILE:foo>,foo.so>:bar>) segfault before this patch.
| * Genex: Make LINK_LANGUAGE report an error when evaluating link libraries.Stephen Kelly2013-06-245-0/+19
| |
| * Merge topic 'add-whitespace'Brad King2013-06-241-1/+1
| |\ | | | | | | | | | | | | 2331b57 Add whitespace after colons in error messages.
| | * Add whitespace after colons in error messages.Stephen Kelly2013-06-211-1/+1
| | |
| * | try_compile: Add signature to allow multiple SOURCESBrad King2013-06-0610-0/+41
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the signature try_compile(RESULT_VAR <bindir> <srcfile> ...) to allow multiple sources as try_compile(RESULT_VAR <bindir> SOURCES <srcfile>... ...) Process the sources to generate a CMakeLists.txt that enables all needed languages. Teach the TryCompile test to try cases with two sources of the same language and of mixed languages. Teach RunCMake.try_compile to cover error cases for the signature.
| * Merge topic 'fix-path-root-dot-dot'Brad King2013-06-051-0/+5
| |\ | | | | | | | | | | | | d26800b get_filename_component: Test ABSOLUTE of .. after root component
| | * get_filename_component: Test ABSOLUTE of .. after root componentBrad King2013-06-041-0/+5
| | | | | | | | | | | | | | | Teach the RunCMake.get_filename_component test to verify that ".." does not remove the root filename component.