summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'policy-CMP0022-fixes' into policy-CMP0022-fixes-for-masterBrad King2013-11-0313-12/+50
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve conflict in Source/cmTarget.cxx by integrating the changes to the internal copy constructor from both sides. Also resolve a logical conflict by dropping the special case for INTERFACE_LIBRARY targets. Since cmTarget::SetMakefile already forces CMP0022 to NEW for such targets we need no special handling. Resolve conflict in Source/cmTargetLinkLibrariesCommand.h by dropping the documentation change. We will make the same change in the new location of the same documentation in a separate commit. Resolve conflicts in Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt Tests/RunCMake/CMP0022/RunCMakeTest.cmake by taking the side from the 'policy-CMP0022-fixes' branch.
| * CMP0022: Warn about a given target at most onceBrad King2013-11-036-1/+16
| | | | | | | | | | | | | | | | | | | | | | Since cmTarget::ComputeLinkInterface is called separately for each "head" target that links a target, the warning we produce when CMP0022 is not set could be repeated. Add explicit logic to allow the warning to appear at most once. Multiple copies of the warning for the same target are almost always identical and therefore redundant. In the rare case that two copies of the warning are different, the second can appear in a future run after the first is fixed.
| * Do not export INTERFACE_LINK_LIBRARIES from non-linkable targetsBrad King2013-11-023-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When cmExportFileGenerator::SetImportLinkInterface exports the old LINK_INTERFACE_LIBRARIES property values it skips doing so for non-linkable targets because target->GetLinkInterface returns NULL for such targets. Since cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty looks at the INTERFACE_LINK_LIBRARIES property directly instead of using the computed link interface, teach it to skip exporting the property if target->IsLinkable returns false. Extend the RunCMake.CMP0022 test with a case covering this. Simply export an executable target that links to a library that is not exported.
| * CMP0022: Plain target_link_libraries must populate link interfaceBrad King2013-11-027-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CMP0022 NEW behavior is that the INTERFACE_LINK_LIBRARIES property exactly defines the link interface. The plain target_link_libraries signature says linking is transitive by default, so it should populate the property. Teach the target_link_libraries plain signature to populate the INTERFACE_LINK_LIBRARIES regardless of the CMP0022 setting. Refactor the cmTarget::ComputeLinkInterface checks that warn when the policy is not set to compare the new property to either the explicitly set old link interface properties or the link implementation fallback for all linkable target types, not just static libraries. This fixes a regression in 2.8.12.0 that caused target_link_libraries to not implement transitive linking in the plain signature once the policy CMP0022 is set to NEW.
| * CMP0022: Add unit test for null pointer check and message.Stephen Kelly2013-11-024-0/+29
| |
| * Merge branch 'output-CMP0022-entries' into policy-CMP0022-fixesBrad King2013-11-021-0/+9
| |\
* | \ Merge topic 'object-library-no-TARGET_FILE'Brad King2013-11-025-0/+35
|\ \ \ | | | | | | | | | | | | | | | | d960589 Genex: Reject $<TARGET_FILE:...> for object libraries (#14532)
| * | | Genex: Reject $<TARGET_FILE:...> for object libraries (#14532)Brad King2013-11-015-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach the cmGeneratorExpressionEvaluator filesystem artifact logic to reject OBJECT_LIBRARY targets since they have no main artifact. Without the explicit rejection evaluation falls through to an internal CMake error message in cmTarget::GetOutputInfo. Extend the RunCMake.GeneratorExpression test to cover these cases.
* | | | Merge topic 'object-library-missing-source'Brad King2013-11-024-0/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | 5a2fc3d Check for OBJECT_LIBRARY source files at start of generation
| * | | | 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.
* | | | Merge topic 'add-CMAKE_FIND_NO_INSTALL_PREFIX'Brad King2013-11-0110-0/+46
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | fe057ab Allow disabling adding the install prefix to the prefix search path.
| * | | | Allow disabling adding the install prefix to the prefix search path.Stephen Kelly2013-10-3110-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In certain scenarios, it is preferable to keep a 'dirty' install prefix than to clear it, and to expect that content will not be found there. Add a CMAKE_FIND_NO_INSTALL_PREFIX variable that can be set to disable searching the install prefix.
* | | | | Test foreach/function/macro handling of bracket argumentsBrad King2013-10-307-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bracket arguments recorded in command invocations inside foreach, function, and macro blocks should not have any replacements done when the arguments are replayed later. Teach the RunCMake.Syntax test to cover these cases.
* | | | | Add to RunCMake.Syntax test \-escape casesBrad King2013-10-293-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an Escape1 test case covering \-escape cases inside bracket, quoted, and unquoted arguments. Also cover comments immediately after quoted and unquoted arguments on lines containing \# escapes.
* | | | | Add to RunCMake.Syntax test comments not separated by spacesBrad King2013-10-291-0/+5
|/ / / / | | | | | | | | | | | | | | | | Extend the BracketComment5 test case to cover both bracket comments and line comments starting immediately after a bracket comment closes.
* | | | Merge topic 'enable-language-require-compiler'Brad King2013-10-2824-4/+124
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3e04946 Require CMAKE_<LANG>_COMPILER to be found as a full path 6007f7c CMakeDetermineCompilerId: Always use compiler detected from IDE 332771c CMakeDetermine*Compiler: Remove temporary cache entry
| * | | | Require CMAKE_<LANG>_COMPILER to be found as a full pathBrad King2013-10-2824-4/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All generators now support detection of the full path to the compiler, so require it to be so. This will allow CMake<LANG>Information.cmake and other logic to assume the full path to the compiler tool is available. The Makefile generators already rejected CMAKE_<LANG>_COMPILER values that did not name an existing compiler. Extend this error message to all generators, make it occur as early as possible, and improve the message with advice about how to set the compiler. If the full path to the compiler is not known, finish enabling languages with a fatal error so configuration does not continue. For now, allow the RC language compiler to not be a full path. Later we will need to detect the full path to "rc" under the VS IDE. Add a RunCMake.CompilerNotFound test to cover failure cases. Fix the RunCMake.CompilerChange test EmptyCompiler case to work when configuration does not continue past enable_language.
* | | | | Merge topic 'handle-CMP0024-in-tests'Brad King2013-10-263-17/+0
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 310aef9 Make ExportLanguages a subtest of the ObjectLibrary test 30ff6cf Refactor the Plugin test.
| * | | | | Make ExportLanguages a subtest of the ObjectLibrary testStephen Kelly2013-10-243-17/+0
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge topic 'remove-pre-2.4-compatibility'Brad King2013-10-2611-0/+32
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7d47c69 Drop compatibility with CMake < 2.4 c7c44fc CTestTest*: Update minimum required CMake to 2.4
| * | | | | Drop compatibility with CMake < 2.4Brad King2013-10-2311-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop all behavior activated by setting CMAKE_BACKWARDS_COMPATIBILITY to a value lower than 2.4, and generate an error when projects or the user attempt to do so. In the error suggest using a CMake 2.8.x release. Teach cmake_minimum_required to warn about projects that do not require at least CMake 2.4. They are not supported by CMake >= 3.0. Replace the documentation of CMAKE_BACKWARDS_COMPATIBILITY with a reference to policy CMP0001.
* | | | | | Merge topic 'fix-tll-static-private'Brad King2013-10-261-1/+5
|\ \ \ \ \ \ | | |_|_|/ / | |/| | | | | | | | | | | | | | | | 239b0c6 Don't add invalid content to static lib INTERFACE_LINK_LIBRARIES.
| * | | | | Don't add invalid content to static lib INTERFACE_LINK_LIBRARIES.Stephen Kelly2013-10-261-1/+5
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only valid target names or generator expressions may appear in the target field of a LINK_ONLY expression. Other content like link flags should still be added to that property (wrapped in config-specific generator expressions), but not wrapped in LINK_ONLY. Otherwise undue warnings would be issued for the policy CMP0022. The LINK_ONLY expression only has an effect for actual target names anyway, so there is no logical deficit.
* | | | | Merge topic 'remove-old-commands-by-policy'Brad King2013-10-261-1/+1
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | 4ea27bc Cygwin: Avoid legacy warnings in RunCMake.DisallowedCommands test
| * | | | Cygwin: Avoid legacy warnings in RunCMake.DisallowedCommands testBrad King2013-10-251-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.
* | | | | 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-2314-0/+64
|\ \ \ | |/ / |/| | | | | | | | | | | e6cec64 CheckTypeSize: Add unit tests 07a2342 CheckTypeSize: Add support for C++
| * | CheckTypeSize: Add unit testsDaniele E. Domenichelli2013-10-2114-0/+64
| | |
* | | 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-2213-0/+43
|\ \ \ | |/ / |/| | | | | | | | 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-2113-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | 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 '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