summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Make ExportLanguages a subtest of the ObjectLibrary testStephen Kelly2013-10-247-16/+32
| | | | | | It was a subtest of the RunCMake.ObjectLibrary test. However, we need to test a build with ExternalProject after running CMake, which RunCMake tests do not do.
* Refactor the Plugin test.Stephen Kelly2013-10-242-30/+42
| | | | | | | Policy CMP0024 was introduced to disallow the include() of a file generated by export(). Use ExternalProject to test the plugins after building.
* cmRST: Teach cmake-module directive to scan bracket commentsBrad King2013-10-232-0/+13
| | | | | | | | | | | | | | | | When scanning CMake module files for .rst comments, recognize bracket comments starting in ".rst:" too. For example: #[[.rst: Include the bracket comment content terminated by the closing bracket. Exclude the line containing the bracket if it starts in "#". Teach the CMakeLib.testRST test to cover multiple bracket lengths and ending brackets on lines with and without "#". Update the cmake-developer.7 manual to document the bracket-comment syntax for .rst documentation.
* Add \-continuation to CMake language quoted argumentsBrad King2013-10-2310-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | Teach the CMake language lexer to treat the \-LF pair terminating a line ending in an odd number of backslashes inside a quoted argument as a continuation. Drop the pair from the returned quoted argument token text. This will allow long lines inside quoted argument strings to be divided across multiple lines in the source file. It will also allow quoted argument text to start on the line after the opening quote. For example, the code: set(x "\ ...") sets variable "x" to the value "..." with no opening newline. Previously an odd number of backslashes at the end of a line inside a quoted argument would put a \-LF pair (or a \-CR pair) literally in the argument. Then the command-argument evaluator would complain that the \-escape sequence is invalid. Therefore this syntax is available to use without changing behavior of valid existing code. Teach the RunCMake.Syntax test to cover cases of quoted arguments with lines ending in \, \\, and \\\. Odd counts are continuations.
* Merge topic 'output-CMP0022-entries'Brad King2013-10-231-0/+9
|\ | | | | | | | | 0b3b336 CMP0022: Output link interface mismatch for static library warning
| * CMP0022: Output link interface mismatch for static library warningStephen Kelly2013-10-231-0/+9
| | | | | | | | | | | | Other warnings for the same policy already have similar output since commit 81d2793e (Add differing target property content to policy CMP0022 warning, 2013-09-11).
* | Merge topic 'remove-old-commands-by-policy'Brad King2013-10-2373-0/+234
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6c91944 Add policy CMP0036 to disallow build_name 3969bb2 Add policy CMP0035 to disallow variable_requires 178b9af Add policy CMP0034 to disallow utility_source 248d1dc Add policy CMP0033 to disallow export_library_dependencies 6865c8f Add policy CMP0032 to disallow output_required_files aa76518 Add policy CMP0031 to disallow load_command 97268cf Add policy CMP0030 to disallow use_mangled_mesa 9f64fbf Add policy CMP0029 to disallow subdir_depends 882c0f0 Add infrastructure for policies that disallow commands
| * | Add policy CMP0036 to disallow build_nameBrad King2013-10-2210-0/+29
| | |
| * | Add policy CMP0035 to disallow variable_requiresBrad King2013-10-2210-0/+29
| | |
| * | Add policy CMP0034 to disallow utility_sourceBrad King2013-10-2210-0/+29
| | |
| * | Add policy CMP0033 to disallow export_library_dependenciesBrad King2013-10-2210-0/+29
| | |
| * | Add policy CMP0032 to disallow output_required_filesBrad King2013-10-2210-0/+29
| | |
| * | Add policy CMP0031 to disallow load_commandBrad King2013-10-2210-0/+29
| | |
| * | Add policy CMP0030 to disallow use_mangled_mesaBrad King2013-10-2210-0/+29
| | |
| * | Add policy CMP0029 to disallow subdir_dependsBrad King2013-10-228-0/+19
| | |
| * | Add infrastructure for policies that disallow commandsBrad King2013-10-223-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | 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 'CheckTypeSize_CXX'Brad King2013-10-2318-1/+287
|\ \ \ | |/ / |/| | | | | | | | | | | e6cec64 CheckTypeSize: Add unit tests 07a2342 CheckTypeSize: Add support for C++
| * | CheckTypeSize: Add unit testsDaniele E. Domenichelli2013-10-2118-1/+287
| | |
* | | Merge topic 'rst-literal-blocks'Brad King2013-10-222-0/+39
|\ \ \ | | | | | | | | | | | | | | | | | | | | 2d0287d cmRST: Process literal blocks after paragraphs ending in '::' 7b9ae40 cmRST: Do not process inline markup in code-block literals
| * | | cmRST: Process literal blocks after paragraphs ending in '::'Brad King2013-10-212-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach cmRST to recognize non-markup lines ending in '::' followed by a blank line as starting a literal block. Record the whole block as if it were a literal block directive and print it just like a code block. Extend the CMakeLib.testRST test to cover such cases.
| * | | cmRST: Do not process inline markup in code-block literalsBrad King2013-10-212-0/+5
| |/ / | | | | | | | | | | | | | | | | | | | | | Move the ProcessDirectiveParsedLiteral and ProcessDirectiveCodeBlock method internals into an OutputMarkupLines helper. Pass through it a new "inlineMarkup" parameter and teach OutputLine to understand it. When false, do not process inline markup. Extend the CMakeLib.testRST test to cover the two cases.
* | | Merge topic 'string-CONCAT-command'Brad King2013-10-227-0/+33
|\ \ \ | | | | | | | | | | | | | | | | 4e184a2 string: Add CONCAT sub-command
| * | | string: Add CONCAT sub-commandBrad King2013-10-217-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge topic 'double-colon-is-imported'Brad King2013-10-2215-11/+54
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | f063c45 Consider targets with double colons to be IMPORTED or ALIAS targets.
| * | | | Consider targets with double colons to be IMPORTED or ALIAS targets.Stephen Kelly2013-10-2115-11/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge topic 'remove-cmake-i-wizard'Brad King2013-10-222-57/+4
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | a8226e9 cmake: Drop support for "-i" wizard mode
| * | | | cmake: Drop support for "-i" wizard modeBrad King2013-10-182-57/+4
| |/ / / | | | | | | | | | | | | | | | | Tell users to pass cache values with the -D option on the command line or use cmake-gui or ccmake.
* | | | Merge topic 'INTERFACE_LIBRARY-build-targets'Brad King2013-10-214-0/+40
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | b04f3b9 Create make rules for INTERFACE_LIBRARY targets. dba4962 Makefile: Always create clean target command
| * | | Create make rules for INTERFACE_LIBRARY targets.Stephen Kelly2013-10-214-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The result is that the depends of the target are created. So, add_library(somelib foo.cpp) add_library(anotherlib EXCLUDE_FROM_ALL foo.cpp) add_library(extra EXCLUDE_FROM_ALL foo.cpp) target_link_libraries(anotherlib extra) add_library(iface INTERFACE) target_link_libraries(iface INTERFACE anotherlib) Executing 'make iface' will result in the anotherlib and extra targets being made. Adding a regular executable to the INTERFACE of an INTERFACE_LIBRARY will not result in the executable being built with 'make iface' because of the logic in cmComputeTargetDepends::AddTargetDepend. So far, this is implemented only for the Makefile generator. Other generators will follow if this feature is possible for them. Make INTERFACE_LIBRARY targets part of the all target by default. Test this by building the all target and making the expected library EXCLUDE_FROM_ALL.
* | | | Merge topic 'cmake-syntax-updates'Brad King2013-10-2187-39/+272
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | daa0f6f Add Lua-style long brackets and long comments to CMake language a8c6523 cmListFileLexer: Convert CRLF -> LF newlines explicitly dbd9333 cmListFileLexer: Allow a leading UTF-8 Byte-Order-Mark (#11137) 5645783 cmListFileLexer: Allow command names with one letter (#14181)
| * | | | Add Lua-style long brackets and long comments to CMake languageBrad King2013-10-1769-39/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach the CMake language parser to recognize Lua-style "long bracket" arguments. These start with two '[' separated by zero or more '=' characters e.g. "[[" or "[=[" or "[==[". They end with two ']' separated by the same number of '=' as the opening bracket. There is no nesting of brackets of the same level (number of '='). No escapes, variable expansion, or other processing is performed on the content between such brackets so they always represent exactly one argument. Also teach CMake to parse and ignore "long comment" syntax. A long comment starts with "#" immediately followed by an opening long bracket. It ends at the matching close long bracket. Teach the RunCMake.Syntax test to cover long bracket and long comment cases.
| * | | | cmListFileLexer: Convert CRLF -> LF newlines explicitlyBrad King2013-10-174-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Read input files in binary mode instead of text mode and convert CRLF newlines to LF newlines explicitly in our own buffer. This is necessary to read CMake source files with CRLF newlines on platforms whose C runtime libraries do not transform newlines in text mode. For example, a Cygwin or Linux binary may not transform CRLF -> LF in files read from a Windows filesystem. Perform the conversion ourselves to ensure that multi-line string literals in CMake source files have LF newlines everywhere.
| * | | | cmListFileLexer: Allow a leading UTF-8 Byte-Order-Mark (#11137)Brad King2013-10-1715-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach the lexer to read a UTF-8, UTF-16 BE/LE, or UTF-32 BE/LE Byte-Order-Mark from the start of a file if any is present. Report an error on files using UTF-16 or UTF-32 and accept a UTF-8 or missing BOM.
| * | | | cmListFileLexer: Allow command names with one letter (#14181)Brad King2013-10-173-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach the lexer to treat a single letter as an identifier instead of an unquoted argument. Outside of a command invocation, the parser treats an identifier as a command name and an unquoted argument as an error. Inside of a command invocation, the parser treats an identifier as an unquoted argument. Therefore this change to the lexer will make what was previously an error case work with no other behavioral change.
* | | | | Merge topic 'target-LOCATION-policy'Brad King2013-10-201-1/+1
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | abfebef Cygwin: Avoid legacy warnings in RunCMake.CMP0026 test
| * | | | Cygwin: Avoid legacy warnings in RunCMake.CMP0026 testBrad King2013-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Handle genexes when evaluating INTERFACE_INCLUDE_DIRECTORIES errors.Stephen Kelly2013-10-1813-0/+84
| | | | |
* | | | | target_link_libraries: Allow repeated use of LINK_{PRIVATE,PUBLIC} keywords.Stephen Kelly2013-10-171-3/+3
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | This has not been allowed since they were introduced in commit 91438222 (target_link_libraries: Add LINK_(PUBLIC|PRIVATE) options, 2011-10-07), but allowing this form makes it more compatible with the newer PUBLIC and PRIVATE keywords.
* | | | CMP0022: Add unit test for null pointer check and message.Stephen Kelly2013-10-164-0/+29
| |/ / |/| |
* | | get_property: Drop test for builtin property documentationBrad King2013-10-161-11/+0
| | | | | | | | | | | | | | | Property documentation is no longer builtin, so the get_property command will be unable to return the documentation. Drop the test for it.
* | | Add class cmRST to do basic reStructuredText processingBrad King2013-10-169-0/+246
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a cmRST class to perform just enough reStructuredText processing to support display of Help documents in human-readable text format. This will be used to implement --help-* command-line options. Support directives "include", "replace", "parsed-literal", "toctree" (Sphinx), and "cmake-module" (CMake Sphinx Extension to scan .cmake modules). Support inline CMake Sphinx Domain roles to convert cross-references to corresponding title text. Support inline substitutions defined by the "replace" directive, but keep it simple by requiring replacements to be defined before use. Add a CMakeLib "testRST" case to cover processing of supported constructs and compare results against expected output.
* | | Drop CMAKE_STRICT modeBrad King2013-10-153-43/+0
| | | | | | | | | | | | | | | | | | | | | With our modern development workflow it is less likely a property will be added to C++ code without documentation. This mode only existed to support the DocTest which had very limited coverage of the properties anyway.
* | | Merge topic 'target-LOCATION-policy'Brad King2013-10-1515-3/+74
|\ \ \ | |/ / | | | | | | | | | e4e5b28 cmTarget: Deprecate the LOCATION target property with a policy.
| * | cmTarget: Deprecate the LOCATION target property with a policy.Stephen Kelly2013-10-1115-3/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge topic 'export-at-generate-time'Brad King2013-10-153-4/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | a4263c9 export(): Handle multiple dependent export sets. 66b290e export(): Process the export() command at generate time. 5fe5c32 export(): Set a Makefile on the cmExportBuildFileGenerator. e383555 cmExportInstallFileGenerator: Fix comment to match reality.
| * | | 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.
* | | | Merge topic 'fix-CMP0024-multiple-directories'Brad King2013-10-156-13/+12
|\ \ \ \ | |/ / / | | | | | | | | | | | | af1f698 CMP0024: Store the fact of included export in global generator.
| * | | 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 'bump-required-cmake-version'Brad King2013-10-152-28/+11
|\ \ \ | | | | | | | | | | | | | | | | 920ffbf Require CMake 2.8.4 or greater to build CMake
| * | | Require CMake 2.8.4 or greater to build CMakeStephen Kelly2013-10-152-28/+11
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the use of the $<TARGET_FILE:...> generator expression as a replacement for the use of the LOCATION target property. The use of the LOCATION target property is now deprecated for in-build targets. Also drop other checks for older CMake versions: * Simplify cmake_set_target_folder macro. * Use find_package(LibArchive) unconditionally. * Simplify condition for running testVisualStudioSlnParser test. * Convert two macros to functions. * Unconditionally run the CTestTestRerunFailed test.