summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* export(): Process the export() command at generate time.Stephen Kelly2013-10-113-4/+4
| | | | | | | | | | | | Make the API for adding targets string based so that it can easily use cmGeneratorTarget. Teach the cmIncludeCommand to generate the exported file at configure-time instead if it is to be include()d. The RunCMake.ExportWithoutLanguage test now needs a dummy header.h file as expected error from export() is now reported after the missing file error.
* CMP0024: Store the fact of included export in global generator.Stephen Kelly2013-10-106-13/+12
| | | | | Storing it in the makefile means that the policy does not trigger when include and export are in differing directories.
* Merge topic 'deprecation-message'Brad King2013-10-0914-2/+33
|\ | | | | | | | | | | | | f973737 GenerateExportHeader: Port to use message(DEPRECATION) f69606d Qt4Macros: Port to use message(DEPRECATION) 509c142 message: Add a DEPRECATION mode
| * Qt4Macros: Port to use message(DEPRECATION)Stephen Kelly2013-10-082-2/+2
| |
| * message: Add a DEPRECATION modeStephen Kelly2013-10-0812-0/+31
| | | | | | | | | | | | 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 'apple-clang-id'Brad King2013-10-091-0/+3
|\ \ | |/ |/| | | | | | | | | 1763c31 Set policy CMP0025 to NEW while building CMake itself aa53ee5 Add policy CMP0025 for Apple Clang compiler id compatibility ab65862 Clang: Add separate "AppleClang" compiler id
| * Set policy CMP0025 to NEW while building CMake itselfBrad King2013-10-081-0/+3
| | | | | | | | | | | | | | | | | | | | CMake is aware of the policy's NEW behavior and the AppleClang compiler id. Set the policy to NEW explicitly to avoid the warning and get the NEW behavior. Also teach the RunCMake test infrastructure to build tests with -DCMAKE_POLICY_DEFAULT_CMP0025=NEW to avoid the policy warning in test output that must match specific regular expressions.
* | Merge topic 'export-policy'Brad King2013-10-088-0/+58
|\ \ | |/ | | | | | | 904ff9f export: Add policy CMP0024 to disallow include() of export files
| * export: Add policy CMP0024 to disallow include() of export filesStephen Kelly2013-10-078-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, export() is executed at configure-time. One problem with this is that certain exported properties like the link interface may not be complete at the point the export() is encountered leading to an incorrect or incomplete exported representation. Additionally, the generated IMPORTED_LOCATION property may even be incorrect if commands following the export() have an effect on it. Another problem is that it requires the C++ implementation of cmake to be capable of computing the exported information at configure time. This is a limitation on the cleanup and maintenance of the code. At some point in the future, this limitation will be dropped and more implementation will be moved from cmTarget to cmGeneratorTarget.
* | Merge topic 'INTERFACE_LIBRARY-target-type'Brad King2013-10-0819-0/+133
|\ \ | | | | | | | | | | | | | | | | | | 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.
| * | export: Add support for INTERFACE_LIBRARY targetsStephen Kelly2013-10-082-0/+8
| | |
| * | Add the INTERFACE_LIBRARY target type.Stephen Kelly2013-10-0719-0/+125
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge topic 'CheckStructHasMember_CXX'Brad King2013-10-0819-0/+73
|\ \ | | | | | | | | | | | | 73d28d2 CheckStructHasMember: Add support for C++
| * | CheckStructHasMember: Add support for C++Daniele E. Domenichelli2013-10-0819-0/+73
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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>])
* | Merge topic 'RunCMake-ignore-valgrind-lines'Brad King2013-10-071-0/+1
|\ \ | | | | | | | | | | | | 4953330 Tests/RunCMake: Tolerate valgrind lines in CMake output
| * | Tests/RunCMake: Tolerate valgrind lines in CMake outputBrad King2013-09-161-0/+1
| |/ | | | | | | | | | | When RunCMake tests run during dynamic analysis, valgrind may add lines of the form "==[0-9]+==..." to the output. Remove such lines from the actual output before matching it against the expected output.
* | genex: Test preprocessing incomplete expressions.Stephen Kelly2013-09-132-0/+24
|/
* 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